diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2016-02-03 23:46:33 +0100 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2016-02-03 23:47:46 +0100 |
commit | cadb5d51ea4d623818209c6400bfcef501e1ebce (patch) | |
tree | 9dc4f7c5f1e7896f19dabd224d52a76f16f3b6bb /share | |
parent | fcdc6a48c0bbdc796975db8d0b7f32434d86d249 (diff) |
Replace `tr` invocations
Diffstat (limited to 'share')
-rw-r--r-- | share/completions/sysctl.fish | 4 | ||||
-rw-r--r-- | share/functions/__fish_complete_subcommand.fish | 2 | ||||
-rw-r--r-- | share/functions/__fish_print_interfaces.fish | 2 | ||||
-rw-r--r-- | share/functions/down-or-search.fish | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/share/completions/sysctl.fish b/share/completions/sysctl.fish index a4cb997e..758d19a1 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 244d1a23..4707450f 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 bb3dbbd9..e08db81d 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 e3a9ccb3..96734239 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 |