about summary refs log tree commit diff
path: root/Etc
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2015-07-24 14:12:56 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2015-07-24 14:13:00 +0000
commit80759c24d455d659b9519fc25af5a72a4281dd8d (patch)
tree01061ff148f03c9911bba83780efab7b26deaf07 /Etc
parent7f5ee59d8eafd71342d7caf891e0cfe31f7d3ec0 (diff)
downloadzsh-80759c24d455d659b9519fc25af5a72a4281dd8d.tar.gz
zsh-80759c24d455d659b9519fc25af5a72a4281dd8d.tar.xz
zsh-80759c24d455d659b9519fc25af5a72a4281dd8d.zip
35810: FAQ += edit-command-line
Diffstat (limited to 'Etc')
-rw-r--r--Etc/FAQ.yo17
1 files changed, 17 insertions, 0 deletions
diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo
index c23dff5b2..a9cc0a661 100644
--- a/Etc/FAQ.yo
+++ b/Etc/FAQ.yo
@@ -126,6 +126,7 @@ Chapter 3:  How to get various things to work
 3.25. How do I get coloured prompts on my colour xterm?
 3.26. Why is my output duplicated with `tt(foo 2>&1 >foo.out | bar)'?
 3.27. What are these `^' and `~' pattern characters, anyway?
+3.28. How do I edit the input buffer in $EDITOR?
 
 Chapter 4:  The mysteries of completion
 4.1. What is completion?
@@ -1924,6 +1925,22 @@ label(327)
   )
 
 
+sect(How do I edit the input buffer in $EDITOR?)
+label(328)
+
+  When typing a long command interactively, it's possible to edit it in $EDITOR
+  before execution by using the tt(edit-command-line) ZLE widget.  For example,
+  after putting
+  verb(
+    autoload -U edit-command-line; 
+    zle -N edit-command-line; 
+    bindkey '^Fc' edit-command-line;
+  )
+  in your tt(~/.zshrc), typing mytt(^F c) will open the entered-so-far
+  command-line for editing.  The command will not be automatically executed;
+  quitting the editor will only return to zsh's command-line editing mode.
+
+
 chapter(The mysteries of completion)