python.plugin.zsh 407 Bytes
Newer Older
1
2
3
# Find python file
alias pyfind='find . -name "*.py"'

4
5
6
7
8
# 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
Carlos Cardoso's avatar
Carlos Cardoso committed
9
    find ${ZSH_PYCLEAN_PLACES} -type d -name "__pycache__" -delete
10
}
11
12
13

# Grep among .py files
alias pygrep='grep --include="*.py"'
14