Fixed function/alias 'fn' for finding files

This commit is contained in:
yan 2011-11-23 21:15:52 -06:00
parent 90d335813e
commit 1df4a522e9

View File

@ -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* }