projects
/
grml-etc-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9bb05af
)
zsh: commit-to-history: keep escaped character
author
Doan Tran Cong Danh
<congdanhqx@gmail.com>
Thu, 14 Nov 2019 16:05:16 +0000
(23:05 +0700)
committer
Doan Tran Cong Danh
<congdanhqx@gmail.com>
Thu, 14 Nov 2019 16:08:40 +0000
(23:08 +0700)
Prior to this change, when committing this line to history
echo "hello\"world"
zsh will record this line in history instead:
echo "hello"world"
because the \" is processed by print.
Correct it by print in raw mode.
Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
etc/zsh/zshrc
patch
|
blob
|
history
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
afb0a56
..
0a7d730
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-895,7
+895,7
@@
zle -N end-of-somewhere beginning-or-end-of-somewhere
# add a command line to the shells history without executing it
function commit-to-history () {
- print -s ${(z)BUFFER}
+ print -
r
s ${(z)BUFFER}
zle send-break
}
zle -N commit-to-history