You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use fish and have a "fish_prompt_right" defined. That means I see the current time at the end of every command line, for example:
~/workspace/tmux-yank (master|+2) ▶ vim yank.tmux 13:34:10
When I use PREFIX-y in order to copy the text current from the command line, the time and the spaces before are included.
I would like to remove them. I already tried adding this line into copy_line.sh, yank_current_line():
(xsel -b | sed -E 's/\ *[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}//g'| xsel -b)
(Right before display_message 'Line copied to clipboard!').
But this doesn't work. The time is still included and tmux remains in copy mode.
It works if I call this command in the terminal after yanking the current line.
What's wrong with my approach?
The text was updated successfully, but these errors were encountered:
MaxGyver83
changed the title
Current date (fish_prompt_right) is included in yanked text
Current time (fish_prompt_right) is included in yanked text
Feb 29, 2020
I use fish and have a "
fish_prompt_right
" defined. That means I see the current time at the end of every command line, for example:~/workspace/tmux-yank (master|+2) ▶ vim yank.tmux 13:34:10
When I use
PREFIX-y
in order to copy the text current from the command line, the time and the spaces before are included.I would like to remove them. I already tried adding this line into
copy_line.sh
,yank_current_line()
:(Right before
display_message 'Line copied to clipboard!'
).But this doesn't work. The time is still included and tmux remains in copy mode.
It works if I call this command in the terminal after yanking the current line.
What's wrong with my approach?
The text was updated successfully, but these errors were encountered: