Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python plugin #274

Merged
merged 2 commits into from
Oct 10, 2011
Merged

python plugin #274

merged 2 commits into from
Oct 10, 2011

Conversation

diofeher
Copy link
Contributor

hey, I've added a python plugin :)

alias pyfind='find . -name "*.py"'

# Remove python compiled byte-code
alias pycrm='rm `find . | grep -E "*.(pyc|pyo)$"`'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pycrm is quite complicated, and does not handle all cases (file permissions, unsafe output of find command, if a directory matches).
What about the command below instead?

find . -type f -name "*.py[co]" -exec rm -f \{\} \;

If you really need to pipe output of find, I strongly advice you to turn on the anal-mode switch :)

find ... -print0 | xargs -0 ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @tristann0x, nice tips :)
I don't know much about these commands, so I took a read in find manual and looks your solution is way better than mine :P

@robbyrussell
Copy link
Member

Are you happy with this getting merged in now?

robbyrussell added a commit that referenced this pull request Oct 10, 2011
@robbyrussell robbyrussell merged commit 6e8c0c1 into ohmyzsh:master Oct 10, 2011
nguymin4 pushed a commit to nguymin4/oh-my-zsh that referenced this pull request Jul 26, 2024
This allows $PURE_PROMPT_SYMBOL to be modified at any point.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants