diff --git a/zsh_aliases b/zsh_aliases index c67f8ec3..0278848e 100644 --- a/zsh_aliases +++ b/zsh_aliases @@ -1,12 +1,3 @@ -# Aliases that only make sense in zsh - -# Functions -# -# (f)ind by (n)ame -# usage: fn foo -# to find all files containing 'foo' in the name, the grep adds a pretty highlight -fn() { ls **/*$1* | grep $1 } - # Global aliases alias -g ...='../..' alias -g ....='../../..' @@ -16,3 +7,12 @@ alias -g H='| head' alias -g L="| less" alias -g N="| /dev/null" alias -g S='| sort' +alias -g G='| grep' # now you can do: ls foo G something + +# Functions +# +# (f)ind by (n)ame +# usage: fn foo +# to find all files containing 'foo' in the name +unalias fn +function fn() { ls **/*$1* }