summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2012-12-02 12:21:26 -0800
committerRobby Russell <robby@planetargon.com>2012-12-02 12:21:26 -0800
commit71af4d73de46999d0451ba7fcca7ba969da80eff (patch)
treeabf50085087f73bf2e5156d6d349eb9487d4a4a0
parentdad9352748c7f929a4234d7e3a5cc39961da917a (diff)
parentc592f55af1fbb2050b6060666312149711873133 (diff)
downloadzsh-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.zsh8
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"'