diff options
author | Robby Russell <robby@planetargon.com> | 2012-12-02 12:21:26 -0800 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2012-12-02 12:21:26 -0800 |
commit | 71af4d73de46999d0451ba7fcca7ba969da80eff (patch) | |
tree | abf50085087f73bf2e5156d6d349eb9487d4a4a0 | |
parent | dad9352748c7f929a4234d7e3a5cc39961da917a (diff) | |
parent | c592f55af1fbb2050b6060666312149711873133 (diff) | |
download | zsh-71af4d73de46999d0451ba7fcca7ba969da80eff.tar.gz zsh-71af4d73de46999d0451ba7fcca7ba969da80eff.tar.bz2 zsh-71af4d73de46999d0451ba7fcca7ba969da80eff.zip |
Merge pull request #1375 from dsx/better-pyclean
A slightly better pyclean
-rw-r--r-- | plugins/python/python.plugin.zsh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/python/python.plugin.zsh b/plugins/python/python.plugin.zsh index 8be3cd863..852c8b919 100644 --- a/plugins/python/python.plugin.zsh +++ b/plugins/python/python.plugin.zsh @@ -1,8 +1,12 @@ # Find python file alias pyfind='find . -name "*.py"' -# Remove python compiled byte-code -alias pyclean='find . -type f -name "*.py[co]" -delete' +# Remove python compiled byte-code in either current directory or in a +# list of specified directories +function pyclean() { + ZSH_PYCLEAN_PLACES=${*:-'.'} + find ${ZSH_PYCLEAN_PLACES} -type f -name "*.py[co]" -delete +} # Grep among .py files alias pygrep='grep --include="*.py"' |