Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Is there any possible way to automatically escape characters when executing an alias in zsh?

Sorry, why does this produce an error?

Ok, it's not technically producing an error in the shell but it is an error with taskwarrior. It doesn't respond properly. Other kinds of punctuation will also cause more serious problems and confusion. Like '&'.

% tasn call Tom's friend

Do you use setopt cshjunkiequotes ?

No, not familiar with it. But as mentioned above, quotes aren't the only problematic punctuation characters. So I'm not sure that would work.

PWS's solution is also going to produce this result:

% tasn call 'double "quotes" here'
tasn call \'double "quotes" here\'

which is probably not the desired effect?

I just tried it with taskwarrior. The double quote are stripped out. But it's unlikely I'd ever write a task like that. 99% of the time the problem I have is with me having to escape (or forgetting to escape), parentheses and apostrophes.

Figuring out which quotes mean something and which ought to be
re-quoted is not a trivial matter.

True, but I'm not going to let the perfect be then enemy of the pretty damn good.

Messages sorted by: Reverse Date, Date, Thread, Author