diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2020-12-16 22:13:45 -0700 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2020-12-16 22:13:45 -0700 |
commit | fb45741fc1dbd40dd2be72bc35a28c6ee8f3f7a5 (patch) | |
tree | dd7746c9910755dfeb5bf28bda68e28b47d5771f /plugins/common-aliases | |
parent | 3aaa0bc62ece494dd2b6e47a191de79e562156f9 (diff) | |
parent | b28665aebb4c1b07a57890eb59551bc51d0acf37 (diff) | |
download | zsh-fb45741fc1dbd40dd2be72bc35a28c6ee8f3f7a5.tar.gz zsh-fb45741fc1dbd40dd2be72bc35a28c6ee8f3f7a5.tar.bz2 zsh-fb45741fc1dbd40dd2be72bc35a28c6ee8f3f7a5.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/common-aliases')
-rw-r--r-- | plugins/common-aliases/README.md | 4 | ||||
-rw-r--r-- | plugins/common-aliases/common-aliases.plugin.zsh | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/common-aliases/README.md b/plugins/common-aliases/README.md index d198a29ac..b6f34cb54 100644 --- a/plugins/common-aliases/README.md +++ b/plugins/common-aliases/README.md @@ -40,11 +40,13 @@ plugins=(... common-aliases) | Alias | Command | Description | |-------|-----------------------------------------------------|-----------------------------------------| -| fd | `find . -type d -name` | Find a directory with the given name | +| fd\* | `find . -type d -name` | Find a directory with the given name | | ff | `find . -type f -name` | Find a file with the given name | | grep | `grep --color` | Searches for a query string | | sgrep | `grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}` | Useful for searching within files | +\* Only if the [`fd`](https://github.com/sharkdp/fd) command isn't installed. + ### Other Aliases | Alias | Command | Description | diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index a9d4f1a3d..4e5ff848f 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -34,7 +34,7 @@ alias -g P="2>&1| pygmentize -l pytb" alias dud='du -d 1 -h' alias duf='du -sh *' -alias fd='find . -type d -name' +(( $+commands[fd] )) || alias fd='find . -type d -name' alias ff='find . -type f -name' alias h='history' |