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

Feature request: option to make fc / hist / ^X^E / v replace command line instead of executing #807

Open
McDutchie opened this issue Dec 23, 2024 · 2 comments
Labels
1.1 Issue relevant to dev branch (v1.1.*) enhancement New feature or request

Comments

@McDutchie
Copy link

Originally posted by @dannyweldon in #748 (comment)

I prefer to use Ctrl-X, Ctrl-E to invoke an external editor in emacs mode (or v in vi mode), which I assume is invoking the same functionality. Now, […] a feature that I would like is that when control returns back to the shell from the external editor, the resultant text just replaces the current command line contents without executing it, and you can then choose to carry on editing, discard it or execute it as desired.

The mysql cli has something along those lines as it allows editing of the previous command using '\e', and after returning to the prompt, it can be executed with '\g' or cancelled with \c'.

@McDutchie McDutchie added enhancement New feature or request 1.1 Issue relevant to dev branch (v1.1.*) labels Dec 23, 2024
@McDutchie
Copy link
Author

Originally posted by @McDutchie in #748 (comment)

Thanks, that's an interesting idea. We could make that new behaviour subject to the histverify shell option, because that option already does the same thing for history expansions.

@avih
Copy link

avih commented Dec 23, 2024

FWIW, while disregarding documentation or intent, I think the most useful and non-controversial behavior after picking a history line is indeed to have it replace the current text at the prompt, and from there the user can do what they want as if they entered it themselves (execute, further edit, etc).

@McDutchie McDutchie changed the title Feature request: option to make ^X^E / v replace command line instead of executing Feature request: option to make fc / hist / ^X^E / v replace command line instead of executing Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.1 Issue relevant to dev branch (v1.1.*) enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants