summaryrefslogtreecommitdiff
path: root/functions/quote-word.fish
diff options
context:
space:
mode:
Diffstat (limited to 'functions/quote-word.fish')
-rw-r--r--functions/quote-word.fish4
1 files changed, 4 insertions, 0 deletions
diff --git a/functions/quote-word.fish b/functions/quote-word.fish
new file mode 100644
index 0000000..0205273
--- /dev/null
+++ b/functions/quote-word.fish
@@ -0,0 +1,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