What's next? verify your email address for reply notifications!
Dear Brett,
how can this shell trick be modified for zsh?
Thank you!
Stephan
It shouldn't be hard, most of the magic is in the ag command, not in the shell-specific stuff. That said, I'm not well-versed in Zsh (yet, that's next on my list of things to explore), so I'm not sure exactly what would need to be modified.
ag
But for the record, here's the Fish version:
function lsgrep -d "Wildcard folder/file search" set -l needle (echo $argv|sed -E 's/\.([a-z0-9]+)$/\\.\1/'|sed -E 's/\?/./'| sed -E 's/[ *]/.*?/g') ag --depth 3 -S -g "$needle" 2> /dev/null end
Actually, I just tested and it works fine as is in Zsh.