mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-03-10 05:25:14 +08:00

Fish is deprecating `^` as a shortcut for stderr redirection. Replace with the more common and compatible `2>`. Fixes #609
19 lines
506 B
Fish
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
|