ctrlg icon indicating copy to clipboard operation
ctrlg copied to clipboard

[Bug]: sending the `cd` command to other tmux panes should clear the command line first

Open mrjones2014 opened this issue 3 years ago • 2 comments

Similar Issues

  • [X] Before filing, I have searched for similar issues.

Description

If you already have a command typed but not yet run, it messes with the tmux integration. See gif example:

CleanShot-2022-01-11-at-14 21 40

Shell + Version

fish, version 3.3.1-838-g1eb58f905

Minimal Configuration to Reproduce

ctrlg init fish | source

Additional Details

We'd need a way to clear the line before sending our command. Or simply abort if the line isn't empty.

mrjones2014 avatar Jan 11 '22 19:01 mrjones2014

We can send ctrl+u via tmux send-keys -t "$pane" C-u and that covers most cases. The case it doesn't cover is if the cursor isn't at the end of the line.

mrjones2014 avatar Jan 11 '22 19:01 mrjones2014

Maybe it can be a config option between using ctrl+u to clear the line vs ctrl+c

mrjones2014 avatar Jan 11 '22 19:01 mrjones2014