tmux-yank icon indicating copy to clipboard operation
tmux-yank copied to clipboard

Yanking commandline only yanks last character in zsh

Open svenXY opened this issue 8 years ago • 7 comments

Hi,

I was also having the problem with the RPROMPT and started playing around with different themes from oh-my-zsh and - when there is no RPROMPT - prefix-y only yanks the last character of the commandline, so echo foo only yanks o. prefix-Y (yanking PWD) works fine though.

I'm using zsh in vi-modeand tmux with

set -g @shell_mode 'vi'

enabled

svenXY avatar Jul 14 '16 07:07 svenXY

You have to place the cursor on the first char, also have you seen https://github.com/tmux-plugins/tmux-yank/issues/48 ?

aleprovencio avatar Jul 14 '16 13:07 aleprovencio

yes, placing the cursor on the first character makes it work, but should this not be done by the "Escape" "0" keys in the respective method? And yes, in #48 you say that entering normal mode before prefix-y will make it work - I can confirm that one as well.

svenXY avatar Jul 15 '16 06:07 svenXY

You got it :+1:

aleprovencio avatar Jul 15 '16 21:07 aleprovencio

Can you check the current master with tmux 2.4?

I'm pretty sure I fixed this in commit e01284962106089d39cbbff116a11dbfae19713f

docwhat avatar May 06 '17 03:05 docwhat

Nope, it still does not work as expected with tmux 2.7 (now on a Mac)

svenXY avatar Aug 20 '18 13:08 svenXY

Yeah, I'm not sure what's going on. It is sending the Escape+0 to go to beginning of line, but it isn't being honored?

docwhat avatar Aug 22 '18 14:08 docwhat

I experience the same bug using Tmux 3.3a and Zsh in Vi mode. Only the characters under and to the right of the cursor get copied. The other key bindings work without issue. No big deal though, I just have to remember to go to the beginning of the line first.

qadzek avatar Aug 23 '23 19:08 qadzek