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

Autoquote everything up until shell redirection character? #2

Open
jez opened this issue Dec 5, 2022 · 3 comments
Open

Autoquote everything up until shell redirection character? #2

jez opened this issue Dec 5, 2022 · 3 comments

Comments

@jez
Copy link

jez commented Dec 5, 2022

First, wanted to say thanks for this project, I've wanted something like it for a long time and am glad to have found this.

Second, I'm struggling to come up with a pattern I could use to mean "autoquote everything up until the first > or | character. Is this possible with the current ZAQ_PREFIXES list? (It seems like it deals only with prefixes, not with suffixes.)

For the commands I'm trying to auto-quote, I'm fine never being able to autoquote a string containing either of those two characters.

If this is something you've managed to do before I'd be very eager to hear more.

Thanks in advance.

@ianthehenry
Copy link
Owner

Sadly there is no way to express this in zsh-autoquoter right now.

It is an imminently reasonable thing to ask for and I think it would make for a very good feature to support, but I'm not exactly sure what the API should look like.

But if you were to pretend for a second that zsh-autoquoter could do that, how would you expect it to look? Like, what would you expect to write in your .zshrc in order to configure that?

@jez
Copy link
Author

jez commented Dec 7, 2022

I would be fine with anything. If there was a flag that said “never auto quote shell pipe characters for any command” I’d set it. If I had to have a second variable with command names to never auto quote I’d use it. The API doesn’t matter much to me.

@jez
Copy link
Author

jez commented Jan 11, 2023

For the record, I've been working around this by using true && as a prefix to defeats the patterns that it's looking for when deciding to autoquote.

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

2 participants