diff options
author | liljencrantz <liljencrantz@gmail.com> | 2007-09-24 07:07:30 +1000 |
---|---|---|
committer | liljencrantz <liljencrantz@gmail.com> | 2007-09-24 07:07:30 +1000 |
commit | 61ebc12dd4621a53a553fffc6a6814ffe02d91b8 (patch) | |
tree | ed4c755e93640d3f84cea4c8dbc018b43674a118 /share/functions/__fish_append.fish | |
parent | 449a75756d13450ef0141427f36eaf1a45e93576 (diff) |
Minor polish like adding missing whitespace, switch to using --argument switch in function definitions to make code more readable, add a few minor saftey checks, etc.
darcs-hash:20070923210730-75c98-88557ba8b6020cae04a5e437c6bb6370e39c04d9.gz
Diffstat (limited to 'share/functions/__fish_append.fish')
-rw-r--r-- | share/functions/__fish_append.fish | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/share/functions/__fish_append.fish b/share/functions/__fish_append.fish index e0174143..41b92d43 100644 --- a/share/functions/__fish_append.fish +++ b/share/functions/__fish_append.fish @@ -1,5 +1,4 @@ -function __fish_append -d "Internal completion function for appending string to the commandline" - set separator $argv[1] +function __fish_append -d "Internal completion function for appending string to the commandline" --argument separator set -e argv[1] set str (commandline -tc| sed -ne "s/\(.*$separator\)[^$separator]*/\1/p"|sed -e "s/--.*=//") printf "%s\n" "$str"$argv "$str"(printf "%s\n" $argv|sed -e "s/\(\t\|\$\)/,\1/") |