python.plugin.zsh 407 B

1234567891011121314
  1. # Find python file
  2. alias pyfind='find . -name "*.py"'
  3. # Remove python compiled byte-code in either current directory or in a
  4. # list of specified directories
  5. function pyclean() {
  6. ZSH_PYCLEAN_PLACES=${*:-'.'}
  7. find ${ZSH_PYCLEAN_PLACES} -type f -name "*.py[co]" -delete
  8. find ${ZSH_PYCLEAN_PLACES} -type d -name "__pycache__" -delete
  9. }
  10. # Grep among .py files
  11. alias pygrep='grep --include="*.py"'