Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Prepare 066 #944

Merged
merged 110 commits into from
Aug 31, 2018
Merged

Prepare 066 #944

merged 110 commits into from
Aug 31, 2018

Conversation

dritter
Copy link
Member

@dritter dritter commented Aug 5, 2018

This is a preparation for v0.6.6.

The following PRs are incorporated in here:

Bugs fixed

What's not included in this PR

docwhat and others added 30 commits June 27, 2018 11:17
The way I was filtering out entries in the frameworks array stopped
working in newer versions of ZSH; it would convert the array into a
string (you could see it with `typeset -p frameworks`)

So I rewrote it.

I don't see anything in the release notes for ZSH that would explain
this and I didn't find any option that would restore this behavior.

Related: Powerlevel9k#882
Marking variables as readonly is helpful for debugging and preventing
problems.
Additionally
- Add a fourth parameter to prompt_battery for better testability. This
  parameter is the root prefix, so we can use our own test batteries.
Change regular expressions to a more compatible format.
@onaforeignshore
Copy link
Contributor

#937 was applied to context but not to user segments

@@ -189,7 +189,7 @@ left_prompt_segment() {
# End the left prompt, closes the final segment.
left_prompt_end() {
if [[ -n $CURRENT_BG ]]; then
echo -n "%k%F{$CURRENT_BG}$(print_icon 'LEFT_SEGMENT_SEPARATOR')"
echo -n "%k$(foregroundColor ${CURRENT_BG})$(print_icon 'LEFT_SEGMENT_SEPARATOR')"
Copy link
Contributor

Choose a reason for hiding this comment

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

$CURRENT_BG will contain a numeric, since getColorCode was already called in left_prompt_segment. Do we really have to add another function call to slow the prompt down more?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, $CURRENT_BG is already numeric. I made this change anyway, to match up with the other occurrences of foreground color. To go full nuts I removed the possibility to stop an fore/background color with a call to that method without params.

In an upcoming release we should either go all in with helper methods for getting a prepared string that contains "start a foreground color", or nothing. I am undecided between the two ways. In another programming language I would prefer a helper method that wraps a cryptic DSL to a nice interface, but here I would indeed prefer going for speed and not call a subshell for that. We should think about a concept for that.

@Slabity
Copy link

Slabity commented Aug 10, 2018

Just tested this on my system. Colors seem to be working just fine.

However, I did notice something else. Despite setting POWERLEVEL9K_HOME_ICON='\uf015' to change my home folder icon, the tilde in the directory still exists. Same with POWERLEVEL9K_FOLDER_ICON. Is that expected?

@dritter
Copy link
Member Author

dritter commented Aug 10, 2018

Thx for testing @Slabity .
Yep that is intentional. You can set POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER=true, to get rid of the first character.

nnja and others added 2 commits August 16, 2018 22:33
Fix broken link referencing zsh date and time configuration in prompt expansion. 

The current broken link points to `http://zsh.sourceforge.net/Doc/Release Prompt-Expansion.html`, while the correct link is http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Date-and-time
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transparent background broke
9 participants