fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
867946468
master
1# localization: tier1 2 3function suspend --description'Suspend the current shell.' 4set -l options h/help f/force 5argparse -n suspend --max-args=1$options --$argv 6or return 7 8if set -q _flag_help 9__fish_print_help suspend 10return 0 11end 12 13if not set -q _flag_force 14and status is-login 15and status is-interactive 16 17echo 2>&1 'Refusing to suspend interactive login shell.' 18echo 2>&1 'Use --force to override. This might hang your terminal.' 19return 1 20end 21 22if status is-interactive 23echo -ns'Suspending ' $fish_pid ': run' 24echo -n( set_color --bold) 'kill -CONT' $fish_pid ( set_color --reset) 25echo 'from another terminal to resume' 26end 27 28# XXX always causes a zombie until one fg's when we do this: 29kill -STOP$fish_pid 30end