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?
- X-seq: zsh-users 27103
- From: Steve Dondley <s@xxxxxxxxxxx>
- To: Zsh users <zsh-users@xxxxxxx>
- Subject: Is there any possible way to automatically escape characters when executing an alias in zsh?
- Date: Sat, 11 Sep 2021 14:41:03 -0400
- Archived-at: <https://zsh.org/users/27103>
- List-id: <zsh-users.zsh.org>
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