diff --git a/share/completions/sysctl.fish b/share/completions/sysctl.fish index a4cb997e7..758d19a1b 100644 --- a/share/completions/sysctl.fish +++ b/share/completions/sysctl.fish @@ -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 | tr " = " "\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 | tr ":" "\t" + sysctl -a ^/dev/null | string replace -a ":" "\t" end complete -c sysctl -a '(__fish_sysctl_values)' -f diff --git a/share/functions/__fish_complete_subcommand.fish b/share/functions/__fish_complete_subcommand.fish index 244d1a231..4707450fc 100644 --- a/share/functions/__fish_complete_subcommand.fish +++ b/share/functions/__fish_complete_subcommand.fish @@ -4,7 +4,7 @@ function __fish_complete_subcommand -d "Complete subcommand" --no-scope-shadowi switch "$argv[1]" case '--fcs-skip=*' set -l rest - echo $argv[1] | tr = ' ' | read test skip_next + string replace -a = ' ' -- $argv[1] | read test skip_next set -e argv[1] end diff --git a/share/functions/__fish_print_interfaces.fish b/share/functions/__fish_print_interfaces.fish index bb3dbbd98..e08db81da 100644 --- a/share/functions/__fish_print_interfaces.fish +++ b/share/functions/__fish_print_interfaces.fish @@ -5,6 +5,6 @@ function __fish_print_interfaces --description "Print a list of known network in echo $i end else # OSX/BSD - command ifconfig -l | tr ' ' '\n' + command ifconfig -l | string split ' ' end end diff --git a/share/functions/down-or-search.fish b/share/functions/down-or-search.fish index e3a9ccb3d..967342391 100644 --- a/share/functions/down-or-search.fish +++ b/share/functions/down-or-search.fish @@ -16,7 +16,7 @@ function down-or-search -d "Depending on cursor position and current mode, eithe # If we are on the bottom line, start search mode, # otherwise move down set lineno (commandline -L) - set line_count (commandline | wc -l | tr -d ' ') + set line_count (count (commandline)) switch $lineno case $line_count