zsh-users
 help / color / mirror / code / Atom feed
* Some zsh questions
@ 2020-12-01 19:09 A. Wik
  2020-12-07 23:03 ` Oliver Kiddle
  0 siblings, 1 reply; 2+ messages in thread
From: A. Wik @ 2020-12-01 19:09 UTC (permalink / raw)
  To: zsh-users

Hi all,

I have this version of zsh:
zsh 5.4.2 (x86_64-ubuntu-linux-gnu)

And I have some questions:

(1) when I use ^X^V to enter vi command mode, then go to insert mode,
I can't get back to command mode using ESC, but using ^X^V again
works.  It's in the keymap:
% bindkey -M viins |grep -i cmd
"^[" vi-cmd-mode
Incidentally, for some reason ^X^V is not listed.

(2) When I'm using the bang history feature, is there a way to get the
! commands themselves, instead of their expansion, listed in the
history?

(3) Copying and pasting acts weird when I use zsh but not bash; eg:
% echo $SHELL
/bin/zsh
% 0~echo $SHELL1~ 0~/bin/zsh1~

If it's not obvious, on the last line above, I copied "echo $SHELL"
and pasted it, pushed the space bar, and copied and pasted "/bin/zsh".
However, this seems to happen only when I paste to the prompt.  Here,
below, I copy and paste the same into "cat":
% echo $SHELL
/bin/zsh
% cat
echo $SHELL
echo $SHELL
/bin/zsh
/bin/zsh
^C
%

Regards,
Albert Wik.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Some zsh questions
  2020-12-01 19:09 Some zsh questions A. Wik
@ 2020-12-07 23:03 ` Oliver Kiddle
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Kiddle @ 2020-12-07 23:03 UTC (permalink / raw)
  To: A. Wik; +Cc: zsh-users

On 1 Dec, "A. Wik" wrote:
> (1) when I use ^X^V to enter vi command mode, then go to insert mode,
> I can't get back to command mode using ESC, but using ^X^V again
> works.  It's in the keymap:
> % bindkey -M viins |grep -i cmd
> "^[" vi-cmd-mode
> Incidentally, for some reason ^X^V is not listed.

You're probably using emacs mode for the insert mode:
% bindkey -M emacs|grep -i cmd
"^X^V" vi-cmd-mode

Entering something like a or i from the vicmd keymap doesn't
specifically set the keymap to viins. You go back to whatever the main
keymap is aliased to. Run bindkey -lL to see.
If you want a hybrid of emacs and vi mode, you can always do:
  bindkey -M emacs '^[' vi-cmd-mode

> (3) Copying and pasting acts weird when I use zsh but not bash; eg:
> % echo $SHELL
> /bin/zsh
> % 0~echo $SHELL1~ 0~/bin/zsh1~

It looks like the bracketed paste sequences that the terminal generates
before and after pasted text are not being handled. These are handled as
a normal key binding:
  % bindkey -L|grep brack
  bindkey "^[[200~" bracketed-paste

Are you perhaps clearing all bindings or loading an alternative paste
plugin?

Oliver


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-07 23:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 19:09 Some zsh questions A. Wik
2020-12-07 23:03 ` Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).