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

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



I have many aliases set up for taskwarrior in zsh:

alias tasn="task +sn add"`

On the command line, I'll type in:

tasn some task description here

Which works unless I put in single quote or some other character:

tasn call Tom's friend

This will thrown an error unless I escape the apostrophe.

I don't want to turn these into functions because then I lose the autocomplete capabilities. I'm wondering if there might be some neat trick that will allow me to automatically escape apostrophes (and other problematic characters) in the task description.

Thanks.




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