71af4d73de46999d0451ba7fcca7ba969da80eff
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #1375 from dsx/better-pyclean
A slightly better pyclean
Diff
1diff --git a/plugins/python/python.plugin.zsh b/plugins/python/python.plugin.zsh
2index 8be3cd86311c68930a7a187a77d345cccb67430b..852c8b919ed77a45d68b0a57535b9b8995a8f8dd 100644
3--- a/plugins/python/python.plugin.zsh
4+++ b/plugins/python/python.plugin.zsh
5@@ -1,8 +1,12 @@
6 # Find python file
7 alias pyfind='find . -name "*.py"'
8
9-# Remove python compiled byte-code
10-alias pyclean='find . -type f -name "*.py[co]" -delete'
11+# Remove python compiled byte-code in either current directory or in a
12+# list of specified directories
13+function pyclean() {
14+ ZSH_PYCLEAN_PLACES=${*:-'.'}
15+ find ${ZSH_PYCLEAN_PLACES} -type f -name "*.py[co]" -delete
16+}
17
18 # Grep among .py files
19 alias pygrep='grep --include="*.py"'