Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current time (fish_prompt_right) is included in yanked text #138

Open
MaxGyver83 opened this issue Feb 29, 2020 · 0 comments
Open

Current time (fish_prompt_right) is included in yanked text #138

MaxGyver83 opened this issue Feb 29, 2020 · 0 comments

Comments

@MaxGyver83
Copy link

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?

@MaxGyver83 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant