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

Colorize Uninstall, Improve Colorization of Install and Upgrade #396

Closed
wants to merge 2 commits into from

Conversation

betawaffle
Copy link
Contributor

Ok, I've made improvements to #393. Now the code looks (a bit) nicer, and it's easier to change if you don't like some decision I've made.

Enjoy!

if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]
then
echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32]Backing up to ~/.zshrc.pre-oh-my-zsh\033[0m";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know why these lines had semicolons. I decided to make them consistent with the rest of the lines.

Replace color codes with easy to understand names. Improve wording of
some messages.
@betawaffle
Copy link
Contributor Author

Rebased.

@robbyrussell
Copy link
Member

Currently can't merge this...

@betawaffle
Copy link
Contributor Author

I'm really busy right now, ill update it if I have some free time.

@eddorre
Copy link
Contributor

eddorre commented Feb 21, 2012

No traction on this in 6 months. Re-open when/if we can merge this.

@eddorre eddorre closed this Feb 21, 2012
@betawaffle
Copy link
Contributor Author

Meh, if someone really cares about this, let me know...

nguymin4 pushed a commit to nguymin4/oh-my-zsh that referenced this pull request Jul 26, 2024
* Improve the debug prompt (PS4)

Add colors, to highlight the current function and de-empasize line numbers.

Add an extra line number (`%I`) which represents the line number in the file
where the code resides (by default, only the function line number is shown,
making it hard(er) to find the relevant code).

Repeat the + character to indicate the current execution depth, e.g. when a 
function calls another, the depth is increased. This allows you to quickly see 
which function invoked which.

* Add filename to debug prompt

Add filename (without path) to the debug prompt, when applicable and makes sure
to avoid displaying duplicate information. Say, when a file is being parsed,
both %N and %x contain the same value (file path). In this case, we only show
one value.

There is a slight cost to doing the extra processing when testing in
iTerm (unscientific benchmark):

	zsh -x  0.30s user 0.14s system 57% cpu 0.754 total

vs

	zsh -x  0.49s user 0.16s system 65% cpu 0.988 total

I think this is within an acceptable range.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants