summaryrefslogtreecommitdiff
path: root/plugins/python/python.plugin.zsh
diff options
context:
space:
mode:
authorSébastien M-B <essembeh@gmail.com>2013-02-08 19:08:06 +0100
committerSébastien M-B <essembeh@gmail.com>2013-02-08 19:08:06 +0100
commit2595484a97d85496fdcdca99a23f52eecd9b1b43 (patch)
treefffe23d53a2a635f0861047fb058c8a2632414f7 /plugins/python/python.plugin.zsh
parent8d23a3611086e9a13e7ad754c57fa8cc4797bfa9 (diff)
parent6e6cf4303712befb5a7fc3918494aefe4a65991f (diff)
downloadzsh-2595484a97d85496fdcdca99a23f52eecd9b1b43.tar.gz
zsh-2595484a97d85496fdcdca99a23f52eecd9b1b43.tar.bz2
zsh-2595484a97d85496fdcdca99a23f52eecd9b1b43.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: lib/aliases.zsh
Diffstat (limited to 'plugins/python/python.plugin.zsh')
-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"'