Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: fix X05 to not produce errors when zpty is missing
- X-seq: zsh-workers 53087
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: fix X05 to not produce errors when zpty is missing
- Date: Sat, 14 Sep 2024 02:02:53 +0200
- Archived-at: <https://zsh.org/workers/53087>
- List-id: <zsh-workers.zsh.org>
The relatively new X05 test does some of it's preparation work even in
the case where zpty is not available resulting in a Command not found
error.
Oliver
diff --git a/Test/X05zleincarg.ztst b/Test/X05zleincarg.ztst
index cd9817c82..f712e9426 100644
--- a/Test/X05zleincarg.ztst
+++ b/Test/X05zleincarg.ztst
@@ -5,29 +5,29 @@
if ( zmodload zsh/zpty 2>/dev/null ); then
. $ZTST_srcdir/comptest
comptestinit -v -z $ZTST_testdir/../Src/zsh
+ zpty_run '
+ autoload -Uz incarg
+ for name in {,vim-,vim-backward-}{,sync-}{inc,dec}arg; do
+ zle -N "$name" incarg
+ done
+ bindkey -v "^N" incarg
+ bindkey -v "^P" decarg
+ bindkey -v "^F" sync-incarg
+ bindkey -v "^B" sync-decarg
+ bindkey -a "^N" vim-incarg
+ bindkey -a "^P" vim-decarg
+ bindkey -a "^F" vim-sync-incarg
+ bindkey -a "^B" vim-sync-decarg
+ bindkey -a "^E" vim-backward-incarg
+ bindkey -a "^Y" vim-backward-decarg
+ unset TMUX_PANE ITERM_SESSION_ID
+ tmux() {
+ echo "$TMUX_PANE"
+ }
+ '
else
ZTST_unimplemented="the zsh/zpty module is not available"
fi
- zpty_run '
- autoload -Uz incarg
- for name in {,vim-,vim-backward-}{,sync-}{inc,dec}arg; do
- zle -N "$name" incarg
- done
- bindkey -v "^N" incarg
- bindkey -v "^P" decarg
- bindkey -v "^F" sync-incarg
- bindkey -v "^B" sync-decarg
- bindkey -a "^N" vim-incarg
- bindkey -a "^P" vim-decarg
- bindkey -a "^F" vim-sync-incarg
- bindkey -a "^B" vim-sync-decarg
- bindkey -a "^E" vim-backward-incarg
- bindkey -a "^Y" vim-backward-decarg
- unset TMUX_PANE ITERM_SESSION_ID
- tmux() {
- echo "$TMUX_PANE"
- }
- '
%test
Messages sorted by:
Reverse Date,
Date,
Thread,
Author