mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Fix erroneous \t in sysctl completion (#3562)
The last commit to this auto completion changed it to use `string replace` instead of `tr`. Unfortunately they do not behave the same. `tr " = " "\t"` replaces " = " with a tabulator character, while `string replace -a " = " "\t"` replaces it with \t. Either `string` is misbehaving or this auto completion was broken.
This commit is contained in:
parent
acc2353328
commit
2e5693a6bc
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ if type -q -f sysctl
|
|||
if sysctl -h >/dev/null ^/dev/null
|
||||
# Print sysctl keys and values, separated by a tab
|
||||
function __fish_sysctl_values
|
||||
sysctl -a ^/dev/null | string replace -a " = " "\t"
|
||||
sysctl -a ^/dev/null | string replace -a " = " \t
|
||||
end
|
||||
|
||||
complete -c sysctl -a '(__fish_sysctl_values)' -f
|
||||
|
@ -32,7 +32,7 @@ if type -q -f sysctl
|
|||
else
|
||||
# OSX sysctl
|
||||
function __fish_sysctl_values
|
||||
sysctl -a ^/dev/null | string replace -a ":" "\t"
|
||||
sysctl -a ^/dev/null | string replace -a ":" \t
|
||||
end
|
||||
|
||||
complete -c sysctl -a '(__fish_sysctl_values)' -f
|
||||
|
|
Loading…
Reference in a new issue