Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Is there a way to complete arguments with brace characters without using backslashes or quotes?
- X-seq: zsh-users 30223
- From: Trevor Avant <trevoravant@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Is there a way to complete arguments with brace characters without using backslashes or quotes?
- Date: Sun, 23 Mar 2025 23:47:31 -0400
- Archived-at: <https://zsh.org/users/30223>
- List-id: <zsh-users.zsh.org>
I've spent a lot of time trying to figure this out, but haven't been able to find a solution. Is there a way to complete the brace characters { or } without having to escape them with a backslash, or put the entire argument in quotes? In other words, I would like to make zsh treat the brace character as it does letter and number characters.
I have tried using the "-Q" flag to compadd, but this doesn't work as I hoped. For example, I set the following for a function named "myfun":
compadd -Q a{b
compadd -Q a{c
and then entering
$ setopt ignore_braces
$ myfun <TAB>
will complete to
$ myfun a{
but the two completion options aren't shown.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author