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

Re: Brace expansion vs. TAB



Dominik Vogt wrote on Sat, 07 Dec 2019 13:33 +00:00:
>   alias -g '*.CH'='*.[ch](|xx|pp)'
>   $ grep foo **/*.CH

# apt install the-silver-searcher
% ag --cc foo
% ag --cpp foo

> Or some way to preprocess the command line with a sed
> script.

You can certainly do that with widgets: just pass ${BUFFER} through sed.
If you want syntax awareness, do buf="$PREBUFFER$BUFFER" then look into
${(z)buf}.  Don't forget to also use ${(Z)} if needed (z-sy-h has examples).



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