summaryrefslogtreecommitdiff
path: root/functions/quote-word.fish
blob: 02052736bd57a35fc84e9209fb46f4e8a5dd2159 (plain)
1
2
3
4
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