fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
7c2dd694e
master
1function fish_commandline_append --description"Append the given string to the command-line, or remove the suffix if already there" 2if not commandline | string length -q 3commandline -r$history [ 1 ] 4end 5 6set -l escaped( string escape --style=regex --$argv [ 1 ]) 7set -l job( commandline -j| string collect) 8if set job( string replace -r --$escaped \$ "" $job ) 9set -l cursor( commandline -C) 10commandline -rj --$job 11commandline -C$cursor 12else 13commandline -aj --$argv [ 1 ] 14end 15end