fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
1e858eae3
master
1#RUN: %fish %s 2 3# Verify the '--on-job-exit caller' misfeature. 4function make_call_observer -a type 5function observer_ $type --on-job-exit caller --inherit-variable type 6echo "Observed exit of $type " 7end 8end 9 10command echo"echo ran 1" ( make_call_observer external) 11#CHECK: echo ran 1 12#CHECK: Observed exit of external 13 14builtin echo"echo ran 2" ( make_call_observer builtin) 15#CHECK: echo ran 2 16#CHECK: Observed exit of builtin 17 18function func_echo 19builtin echo$argv 20end 21 22func_echo "echo ran 3" ( make_call_observer function) 23#CHECK: echo ran 3 24#CHECK: Observed exit of function 25 26# They should not fire again. 27# TODO: We don't even clean up the functions! 28 29command echo"echo ran 4" 30builtin echo"echo ran 5" 31func_echo "echo ran 6" 32#CHECK: echo ran 4 33#CHECK: echo ran 5 34#CHECK: echo ran 6