dotfiles/fish/functions/quote-word.fish
2020-11-04 17:35:19 +01: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