From 50997c02b3109b025e54b8c9701d1767879f16cf Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 10 May 2000 13:32:23 +0000 Subject: 11299: edit-command-line zle widget --- ChangeLog | 5 +++++ Functions/Zle/.distfiles | 3 ++- Functions/Zle/edit-command-line | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 Functions/Zle/edit-command-line diff --git a/ChangeLog b/ChangeLog index 8626a794c..c18f6080e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-05-10 Peter Stephenson + + * 11299: Bart/pws: Functions/Zle/edit-command-line: edit command + line with external editor. + 2000-05-10 Sven Wischnowsky * 11298: Doc/Zsh/compsys.yo, Src/Zle/computil.c: more fixes for diff --git a/Functions/Zle/.distfiles b/Functions/Zle/.distfiles index 429c133a0..8e9e1acee 100644 --- a/Functions/Zle/.distfiles +++ b/Functions/Zle/.distfiles @@ -1,3 +1,4 @@ DISTFILES_SRC=' - .distfiles incremental-complete-word insert-files + .distfiles history-search-end edit-command-line incremental-complete-word + incarg insert-files predict-on ' diff --git a/Functions/Zle/edit-command-line b/Functions/Zle/edit-command-line new file mode 100644 index 000000000..8019329bd --- /dev/null +++ b/Functions/Zle/edit-command-line @@ -0,0 +1,18 @@ +# Edit the command line using your usual editor. +# Binding this to 'v' in the vi command mode map, +# autoload edit-command-line +# zle -N edit-command-line +# bindkey -M vicmd v edit-command-line +# will give ksh-like behaviour for that key. + +local tmpfile=${TMPPREFIX:-/tmp/zsh}ecl$$ + +print $BUFFER >$tmpfile +exec