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 (parent:
a35cbe7
)
zshrc: bugfix for _complete_screen_display when using tmux
author
Bernhard Tittelbach
<bernhard@tittelbach.org>
Thu, 1 Feb 2024 14:23:01 +0000
(15:23 +0100)
committer
Bernhard Tittelbach
<bernhard@tittelbach.org>
Thu, 1 Feb 2024 14:23:01 +0000
(15:23 +0100)
etc/zsh/zshrc
patch
|
blob
|
history
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
bb8ecec
..
22263e2
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-1381,7
+1381,6
@@
zle -N help-zle
## complete word from currently visible Screen or Tmux buffer.
if check_com -c screen || check_com -c tmux; then
function _complete_screen_display () {
## complete word from currently visible Screen or Tmux buffer.
if check_com -c screen || check_com -c tmux; then
function _complete_screen_display () {
- [[ "$TERM" != "screen" ]] && return 1
local TMPFILE=$(mktemp)
local -U -a _screen_display_wordlist
local TMPFILE=$(mktemp)
local -U -a _screen_display_wordlist
@@
-1392,8
+1391,9
@@
if check_com -c screen || check_com -c tmux; then
#works, but crashes tmux below version 1.4
#luckily tmux -V option to ask for version, was also added in 1.4
tmux -V &>/dev/null || return
#works, but crashes tmux below version 1.4
#luckily tmux -V option to ask for version, was also added in 1.4
tmux -V &>/dev/null || return
- tmux -q capture-pane \; save-buffer -b 0 $TMPFILE \; delete-buffer -b 0
+ tmux -q capture-pane
-b 0
\; save-buffer -b 0 $TMPFILE \; delete-buffer -b 0
else
else
+ [[ "$TERM" != "screen" ]] && return
screen -X hardcopy $TMPFILE
# screen sucks, it dumps in latin1, apparently always. so recode it
# to system charset
screen -X hardcopy $TMPFILE
# screen sucks, it dumps in latin1, apparently always. so recode it
# to system charset