From 1df4a522e90a790d3fc8c564c6f7909b5780e08e Mon Sep 17 00:00:00 2001 From: yan Date: Wed, 23 Nov 2011 21:15:52 -0600 Subject: [PATCH] Fixed function/alias 'fn' for finding files --- zsh_aliases | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/zsh_aliases b/zsh_aliases index c67f8ec..0278848 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* }