useful-fish/functions/quote-word.fish
2022-08-15 18:31:22 +02:00

4 lines
244 B
Fish

function quote-word -d "Command line editor function that cycles between 'quoting' \"styles\" for the current word"
commandline -t (commandline -t|sed 's/^\'\(.*\)\'$/\1/;t;s/^"\(.*\)"$/\'\1\'/;t;s/^\(.*\)$/"\1"/')
commandline -f repaint
end