mrjones2014 / ctrlg

A command line context switcher, written in Rust :crab:
https://crates.io/crates/ctrlg
MIT License
30 stars 1 forks source link

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

Open mrjones2014 opened 2 years ago

mrjones2014 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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