diff options
author | axel <axel@liljencrantz.se> | 2006-02-18 12:41:45 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-02-18 12:41:45 +1000 |
commit | dd79d75504fab9b47f00bb699f0671bf19f93a62 (patch) | |
tree | d2e9f9e266c0d522c528808f7dd5a39ff23ee829 /share/functions/__fish_append.fish | |
parent | 7073f0b58bf5845b686316783b7b87bac005f06a (diff) |
Move a few shellscript bits around
darcs-hash:20060218024145-ac50b-207ca782808ea8968cb38253c7bc2563350f38b2.gz
Diffstat (limited to 'share/functions/__fish_append.fish')
-rw-r--r-- | share/functions/__fish_append.fish | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/share/functions/__fish_append.fish b/share/functions/__fish_append.fish new file mode 100644 index 00000000..e0174143 --- /dev/null +++ b/share/functions/__fish_append.fish @@ -0,0 +1,8 @@ +function __fish_append -d "Internal completion function for appending string to the commandline" + set separator $argv[1] + 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/") +end + + |