oh-my-fish/pkg/omf/functions/cli/omf.cli.reload.fish
Itzik Ephraim a6a67be60b Use posix stderr redirection (2> instead of ^)
Fish is deprecating `^` as a shortcut for stderr redirection.
Replace with the more common and compatible `2>`.

Fixes #609
2018-06-09 01:23:32 +03:00

19 lines
506 B
Fish

function omf.cli.reload
if not contains -- --force $argv
if count (jobs) >/dev/null 2>&1
__omf.cli.reload.job_warning
return 1
end
end
omf.reload
end
function __omf.cli.reload.job_warning
echo (set_color -u)"Reload aborted. There are background jobs:"(set_color normal)
echo
jobs
echo
echo "For your safety, finish all background jobs before reloading Oh My Fish."
echo "If you are absolutely sure of what you are doing, you can bypass this check using --force."
end