Fixed function/alias 'fn' for finding files
This commit is contained in:
parent
90d335813e
commit
1df4a522e9
18
zsh_aliases
18
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* }
|
||||
|
Loading…
Reference in New Issue
Block a user