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

Remove escaping on shell commands #10549

Open
kirawi opened this issue Apr 22, 2024 · 2 comments
Open

Remove escaping on shell commands #10549

kirawi opened this issue Apr 22, 2024 · 2 comments
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@kirawi
Copy link
Member

kirawi commented Apr 22, 2024

pub(super) fn command_mode(cx: &mut Context) {
let mut prompt = Prompt::new(
":".into(),
Some(':'),
|editor: &Editor, input: &str| {
let shellwords = Shellwords::from(input);
let words = shellwords.words();

We should probably match Kakoune here to special-case shell commands. This would fix issues like #7752

@kirawi kirawi added C-enhancement Category: Improvements A-helix-term Area: Helix term improvements labels Apr 22, 2024
@pascalkuthe
Copy link
Member

We do still want to do command expansion for shell commands but kakoune does that tok so matching whatever they do should work

@postsolar
Copy link
Contributor

I find the escaping rules incomprehensible and end up just putting everything into a script even for small one-liner commands, so that I could just do :sh /path/to/script. I would very much welcome just executing shell commands verbatim, except for expansions ofc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

3 participants