zsh alias -> function?
Suppose I have: alias gg="git grep" then stuff like: gg "int x" works, but gg int x gets complaints. Is there a way to rewrite gg as a function in zsh so that it takes all the arguments after gg, and stuffs them into a string? Thanks! gg() { git grep "$*"; } For your particular use case, this is a bad idea. git-grep is expecting a single-arg pattern . You're trying to get the shell to treat your space (between int and x) as part of the pattern. This will break quickly when you try something like: gg foo.*bar or various other things that the shell might interpret. So anything after gg really