diff --git a/share/config.fish b/share/config.fish index 7bb30b861..50d865cd7 100644 --- a/share/config.fish +++ b/share/config.fish @@ -143,26 +143,6 @@ end # PATH is possibly set above. __fish_reconstruct_path -for jobbltn in bg wait disown - function $jobbltn -V jobbltn - set -l args (__fish_expand_pid_args $argv) - and builtin $jobbltn $args - end -end -function fg - set -l args (__fish_expand_pid_args $argv) - and builtin fg $args[-1] -end - -if command -q kill - # Only define this if something to wrap exists - # this allows a nice "command not found" error to be triggered. - function kill - set -l args (__fish_expand_pid_args $argv) - and command kill $args - end -end - if status is-interactive __fish_migrate end diff --git a/share/functions/bg.fish b/share/functions/bg.fish new file mode 100644 index 000000000..603579549 --- /dev/null +++ b/share/functions/bg.fish @@ -0,0 +1,5 @@ +# localization: tier1 +function bg + set -l args (__fish_expand_pid_args $argv) + and builtin bg $args +end diff --git a/share/functions/disown.fish b/share/functions/disown.fish new file mode 100644 index 000000000..49ed37358 --- /dev/null +++ b/share/functions/disown.fish @@ -0,0 +1,5 @@ +# localization: tier1 +function wait + set -l args (__fish_expand_pid_args $argv) + and builtin wait $args +end diff --git a/share/functions/fg.fish b/share/functions/fg.fish new file mode 100644 index 000000000..372d25efe --- /dev/null +++ b/share/functions/fg.fish @@ -0,0 +1,5 @@ +# localization: tier1 +function fg + set -l args (__fish_expand_pid_args $argv) + and builtin fg $args[-1] +end diff --git a/share/functions/kill.fish b/share/functions/kill.fish new file mode 100644 index 000000000..874a6db9e --- /dev/null +++ b/share/functions/kill.fish @@ -0,0 +1,9 @@ +# localization: tier1 +if command -q kill + # Only define this if something to wrap exists + # this allows a nice "command not found" error to be triggered. + function kill + set -l args (__fish_expand_pid_args $argv) + and command kill $args + end +end diff --git a/share/functions/wait.fish b/share/functions/wait.fish new file mode 100644 index 000000000..49ed37358 --- /dev/null +++ b/share/functions/wait.fish @@ -0,0 +1,5 @@ +# localization: tier1 +function wait + set -l args (__fish_expand_pid_args $argv) + and builtin wait $args +end diff --git a/tests/checks/fg.fish b/tests/checks/fg.fish index 04d193511..16e7701be 100644 --- a/tests/checks/fg.fish +++ b/tests/checks/fg.fish @@ -5,7 +5,7 @@ fg (math 2 ^ 31 - 1) fg (math 2 ^ 31) # CHECKERR: fg: '2147483648' is not a valid process ID -# CHECKERR: {{.*}}config.fish (line {{\d+}}): +# CHECKERR: {{.*}}/fg.fish (line {{\d+}}): # CHECKERR: and builtin fg $args[-1] # CHECKERR: ^ # CHECKERR: in function 'fg' with arguments '2147483648'