From 9e1f0639cfa86972e9ec94f75959e51fb0bf72e4 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sat, 25 Jul 2015 10:59:25 +0200 Subject: [PATCH 1/6] Whitespace fixes. --- powerlevel9k.zsh-theme | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 69eee6e..a7742b7 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -26,7 +26,7 @@ # export DEFAULT_USER= # # Customize the format of the time segment. Example of reverse format: -# POWERLEVEL9K_TIME_FORMAT='%D{%S:%M:%H}' +# POWERLEVEL9K_TIME_FORMAT='%D{%S:%M:%H}' # # Show the hash/changeset string in the `vcs` segment: # POWERLEVEL9K_SHOW_CHANGESET=true @@ -217,8 +217,8 @@ zstyle ':vcs_info:*' enable git hg zstyle ':vcs_info:*' check-for-changes true VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%F{$VCS_FOREGROUND_COLOR}%b%c%u%m%f" -zstyle ':vcs_info:git:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_GIT_ICON%f$VCS_DEFAULT_FORMAT" -zstyle ':vcs_info:hg:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_HG_ICON%f$VCS_DEFAULT_FORMAT" +zstyle ':vcs_info:git:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_GIT_ICON%f$VCS_DEFAULT_FORMAT" +zstyle ':vcs_info:hg:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_HG_ICON%f$VCS_DEFAULT_FORMAT" zstyle ':vcs_info:*' actionformats " %b %F{red}| %a%f" @@ -253,7 +253,7 @@ fi # The latter three can be omitted, left_prompt_segment() { # Overwrite given background-color by user defined variable for this segment. - # We get as first Parameter the function name, which called this function. + # We get as first Parameter the function name, which called this function. # From the given function name, we strip the "prompt_"-prefix and uppercase it. # This is, prefixed with "POWERLEVEL9K_" and suffixed with either "_BACKGROUND" # of "_FOREGROUND", our variable name. So each new Segment should automatically @@ -427,7 +427,7 @@ CURRENT_BG='NONE' # AWS Profile prompt_aws() { local aws_profile="$AWS_DEFAULT_PROFILE" - if [[ -n "$aws_profile" ]]; + if [[ -n "$aws_profile" ]]; then $1_prompt_segment "$0" red white "$AWS_ICON $aws_profile" fi @@ -487,7 +487,7 @@ prompt_longstatus() { prompt_node_version() { local nvm_prompt=$(node -v 2>/dev/null) [[ -z "${nvm_prompt}" ]] && return - NODE_ICON=$'\u2B22' # โฌข + NODE_ICON=$'\u2B22' # โฌข $1_prompt_segment "$0" "green" "white" "${nvm_prompt:1} $NODE_ICON" } @@ -645,7 +645,6 @@ $POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX" RPROMPT_SUFFIX='' fi RPROMPT=$RPROMPT_PREFIX"%{%f%b%k%}"'$(build_right_prompt)'"%{$reset_color%}"$RPROMPT_SUFFIX - } powerlevel9k_init "$@" From 9789afd142f4a8d61ecb9d029bc03d01a33a78cc Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sat, 25 Jul 2015 11:00:07 +0200 Subject: [PATCH 2/6] Added Troubleshooting-hint for wrong TERM. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 71dfceb..7c707d6 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ this theme focus on three primary goals: - [Special Segment Colors](#special-segment-colors) - [Troubleshooting](#troubleshooting) - [Gaps Between Segments](#gaps-between-segments) + - [Segments are printed in strange colors](#segments-are-printed-in-strange-colors) - [Meta](#meta) - [Kudos](#kudos) - [Developing](#developing) @@ -435,6 +436,16 @@ Thankfully, this is easy to fix. This happens if you have successfully installed Powerline fonts, but did not make a Powerline font the default font in your terminal emulator (e.g., 'terminator', 'gnome-terminal', 'konsole', etc.,). +#### Segments are printed in strange colors + +Besides of choosing the right color scheme for your terminal editor, you should +be aware that your terminal is capable of displaying 256 colors. You can check +that by invoking `echotc Co` in your terminal. It should show 256. If it shows +less than that, you have to set a terminal that is capable of displaying 256 +colors like `xterm-256color` in your `~/.zshrc`: + + TERM=xterm-256color + ### Meta #### Kudos From 69096e02c980c57a1a6b45dd4988d73690b859be Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sat, 25 Jul 2015 11:27:18 +0200 Subject: [PATCH 3/6] Added a better example for the custom Time format. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7c707d6..2e55d57 100644 --- a/README.md +++ b/README.md @@ -278,8 +278,8 @@ to a certain length: By default the time is show in 'H:M:S' format. If you want to change it, just set another format in your `~/.zshrc`: - # Reversed time format - POWERLEVEL9K_TIME_FORMAT='%D{%S:%M:%H}' + # Output date and time with a nice symbol (awesome-terminal-font required) + POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S \uE868 %d.%m.%y}" #### Unit Test Ratios From 143aac50fb303f6da541b4b13d382c525b765cbb Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Sun, 26 Jul 2015 14:43:16 -0700 Subject: [PATCH 4/6] README: Cleanup --- README.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2e55d57..5d8c166 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ this theme focus on three primary goals: - [Special Segment Colors](#special-segment-colors) - [Troubleshooting](#troubleshooting) - [Gaps Between Segments](#gaps-between-segments) - - [Segments are printed in strange colors](#segments-are-printed-in-strange-colors) + - [Segment Colors are Wrong](#segment-colors-are-wrong) - [Meta](#meta) - [Kudos](#kudos) - [Developing](#developing) @@ -276,9 +276,16 @@ to a certain length: #### The 'time' segment By default the time is show in 'H:M:S' format. If you want to change it, -just set another format in your `~/.zshrc`: +just set another format in your `~/.zshrc`. As an example, this is a reversed +time format: - # Output date and time with a nice symbol (awesome-terminal-font required) + # Reversed time format + POWERLEVEL9K_TIME_FORMAT='%D{%S:%M:%H}' + +If you are using an "Awesome Powerline Font", you can add a time symbol to this +segment, as well: + + # Output time, date, and a symbol from the "Awesome Powerline Font" set POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S \uE868 %d.%m.%y}" #### Unit Test Ratios @@ -436,13 +443,12 @@ Thankfully, this is easy to fix. This happens if you have successfully installed Powerline fonts, but did not make a Powerline font the default font in your terminal emulator (e.g., 'terminator', 'gnome-terminal', 'konsole', etc.,). -#### Segments are printed in strange colors +#### Segment Colors are Wrong -Besides of choosing the right color scheme for your terminal editor, you should -be aware that your terminal is capable of displaying 256 colors. You can check -that by invoking `echotc Co` in your terminal. It should show 256. If it shows -less than that, you have to set a terminal that is capable of displaying 256 -colors like `xterm-256color` in your `~/.zshrc`: +If the color display within your terminal seems off, it's possible you are using +a reduced color set. You can check this by invoking `echotc Co` in your +terminal, which should yield `256`. If you see something different, try setting +`xterm-256color` in your `~/.zshrc`: TERM=xterm-256color From c116ead6aacb9c4c66529982ee420fa1bd6e8958 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Mon, 27 Jul 2015 00:20:40 +0200 Subject: [PATCH 5/6] Determine the right OS-Icon only once. --- powerlevel9k.zsh-theme | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index d7c2346..5b8c459 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -46,12 +46,30 @@ # OS detection, default to Linux case $(uname) in - FreeBSD) OS=FreeBSD ;; - DragonFly) OS=FreeBSD ;; - OpenBSD) OS=OpenBSD ;; - Darwin) OS=Darwin ;; - SunOS) OS=SunOS ;; - *) OS=Linux ;; + FreeBSD) + OS=FreeBSD + OS_ICON=$'\u1F608' # ๐Ÿ˜ˆ + ;; + DragonFly) + OS=FreeBSD + OS_ICON=$'\u1F608' # ๐Ÿ˜ˆ + ;; + OpenBSD) + OS=OpenBSD + OS_ICON=$'\u1F608' # ๐Ÿ˜ˆ + ;; + Darwin) + OS=Darwin + OS_ICON=$'\uF8FF' # ๏ฃฟ + ;; + SunOS) + OS=SunOS + OS_ICON=$'\u1F31E' # ๐ŸŒž + ;; + *) + OS=Linux + OS_ICON=$'\u1F427' # ๐Ÿง + ;; esac # The `CURRENT_BG` variable is used to remember what the last BG color used was @@ -509,15 +527,7 @@ prompt_node_version() { # print a little OS icon prompt_os_icon() { - if [[ "$OS" == "Darwin" ]]; then - LOGO=$'\uF8FF' # ๏ฃฟ - elif [[ "$OS" == 'Linux' ]]; then - LOGO=$'\u1F427' # ๐Ÿง - elif [[ "$OS" == 'FreeBSD' ]]; then - LOGO=$'\u1F608' # ๐Ÿ˜ˆ - fi - - $1_prompt_segment "$0" "008" "241" "$LOGO" + $1_prompt_segment "$0" "008" "241" "$OS_ICON" } # rbenv information From 504a64996b3da9ada36615b51026ba7033b3a47e Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Mon, 27 Jul 2015 00:35:39 +0200 Subject: [PATCH 6/6] Uhm. It seems to make a difference, whether you print unicode characters with lowercase \u or uppercase \U. Some of them only work with uppercase \U. Therefore I changed all of them to the uppercase variant. Try `echo $'\u1F427' $'\U1F427'`. Only the latter one should work. The first one prints some gibberish. --- powerlevel9k.zsh-theme | 168 ++++++++++++++++++++--------------------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 5b8c459..60e115e 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -48,27 +48,27 @@ case $(uname) in FreeBSD) OS=FreeBSD - OS_ICON=$'\u1F608' # ๐Ÿ˜ˆ + OS_ICON=$'\U1F608' # ๐Ÿ˜ˆ ;; DragonFly) OS=FreeBSD - OS_ICON=$'\u1F608' # ๐Ÿ˜ˆ + OS_ICON=$'\U1F608' # ๐Ÿ˜ˆ ;; OpenBSD) OS=OpenBSD - OS_ICON=$'\u1F608' # ๐Ÿ˜ˆ + OS_ICON=$'\U1F608' # ๐Ÿ˜ˆ ;; Darwin) OS=Darwin - OS_ICON=$'\uF8FF' # ๏ฃฟ + OS_ICON=$'\UF8FF' # ๏ฃฟ ;; SunOS) OS=SunOS - OS_ICON=$'\u1F31E' # ๐ŸŒž + OS_ICON=$'\U1F31E' # ๐ŸŒž ;; *) OS=Linux - OS_ICON=$'\u1F427' # ๐Ÿง + OS_ICON=$'\U1F427' # ๐Ÿง ;; esac @@ -87,112 +87,112 @@ case $POWERLEVEL9K_MODE in # See https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched LEFT_SEGMENT_SEPARATOR='' RIGHT_SEGMENT_SEPARATOR='' - ROOT_ICON="\uE801" # ๎  - RUBY_ICON="\uE847" # ๎ก‡ - AWS_ICON="\uE895" # ๎ข• - BACKGROUND_JOBS_ICON="\uE82F " # ๎ ฏ - TEST_ICON="\uE891" # ๎ข‘ - OK_ICON="\u2713" # โœ“ - FAIL_ICON="\u2718" # โœ˜ + ROOT_ICON="\UE801" # ๎  + RUBY_ICON="\UE847" # ๎ก‡ + AWS_ICON="\UE895" # ๎ข• + BACKGROUND_JOBS_ICON="\UE82F " # ๎ ฏ + TEST_ICON="\UE891" # ๎ข‘ + OK_ICON="\U2713" # โœ“ + FAIL_ICON="\U2718" # โœ˜ SYMFONY_ICON="SF" - VCS_UNTRACKED_ICON="\uE16C" # ๎…ฌ - VCS_UNSTAGED_ICON="\uE17C" # ๎…ผ - VCS_STAGED_ICON="\uE168" # ๎…จ - VCS_STASH_ICON="\uE133 " # ๎„ณ - #VCS_INCOMING_CHANGES="\uE1EB " # ๎‡ซ - #VCS_INCOMING_CHANGES="\uE80D " # ๎  - VCS_INCOMING_CHANGES="\uE131 " # ๎„ฑ - #VCS_OUTGOING_CHANGES="\uE1EC " # ๎‡ฌ - #VCS_OUTGOING_CHANGES="\uE80E " # ๎ Ž - VCS_OUTGOING_CHANGES="\uE132 " # ๎„ฒ - VCS_TAG_ICON="\uE817 " # ๎ — - VCS_BOOKMARK_ICON="\uE87B" # ๎กป - VCS_COMMIT_ICON="\uE821 " # ๎ ก - VCS_BRANCH_ICON="\uE220" # ๎ˆ  - VCS_REMOTE_BRANCH_ICON=" \uE804 " # ๎ „ - VCS_GIT_ICON="\uE20E " # ๎ˆŽ - VCS_HG_ICON="\uE1C3 " # ๎‡ƒ + VCS_UNTRACKED_ICON="\UE16C" # ๎…ฌ + VCS_UNSTAGED_ICON="\UE17C" # ๎…ผ + VCS_STAGED_ICON="\UE168" # ๎…จ + VCS_STASH_ICON="\UE133 " # ๎„ณ + #VCS_INCOMING_CHANGES="\UE1EB " # ๎‡ซ + #VCS_INCOMING_CHANGES="\UE80D " # ๎  + VCS_INCOMING_CHANGES="\UE131 " # ๎„ฑ + #VCS_OUTGOING_CHANGES="\UE1EC " # ๎‡ฌ + #VCS_OUTGOING_CHANGES="\UE80E " # ๎ Ž + VCS_OUTGOING_CHANGES="\UE132 " # ๎„ฒ + VCS_TAG_ICON="\UE817 " # ๎ — + VCS_BOOKMARK_ICON="\UE87B" # ๎กป + VCS_COMMIT_ICON="\UE821 " # ๎ ก + VCS_BRANCH_ICON="\UE220" # ๎ˆ  + VCS_REMOTE_BRANCH_ICON=" \UE804 " # ๎ „ + VCS_GIT_ICON="\UE20E " # ๎ˆŽ + VCS_HG_ICON="\UE1C3 " # ๎‡ƒ ;; 'compatible') - LEFT_SEGMENT_SEPARATOR="\u2B80" # โฎ€ - RIGHT_SEGMENT_SEPARATOR="\u2B82" # โฎ‚ - ROOT_ICON="\u26A1" # โšก + LEFT_SEGMENT_SEPARATOR="\U2B80" # โฎ€ + RIGHT_SEGMENT_SEPARATOR="\U2B82" # โฎ‚ + ROOT_ICON="\U26A1" # โšก RUBY_ICON='' AWS_ICON="AWS:" - BACKGROUND_JOBS_ICON="\u2699" # โš™ + BACKGROUND_JOBS_ICON="\U2699" # โš™ TEST_ICON='' - OK_ICON="\u2713" # โœ“ - FAIL_ICON="\u2718" # โœ˜ + OK_ICON="\U2713" # โœ“ + FAIL_ICON="\U2718" # โœ˜ SYMFONY_ICON="SF" VCS_UNTRACKED_ICON='?' - VCS_UNSTAGED_ICON="\u25CF" # โ— - VCS_STAGED_ICON="\u271A" # โœš - VCS_STASH_ICON="\u235F" # โŸ - VCS_INCOMING_CHANGES="\u2193" # โ†“ - VCS_OUTGOING_CHANGES="\u2191" # โ†‘ + VCS_UNSTAGED_ICON="\U25CF" # โ— + VCS_STAGED_ICON="\U271A" # โœš + VCS_STASH_ICON="\U235F" # โŸ + VCS_INCOMING_CHANGES="\U2193" # โ†“ + VCS_OUTGOING_CHANGES="\U2191" # โ†‘ VCS_TAG_ICON='' - VCS_BOOKMARK_ICON="\u263F" # โ˜ฟ + VCS_BOOKMARK_ICON="\U263F" # โ˜ฟ VCS_COMMIT_ICON='' VCS_BRANCH_ICON='@' - VCS_REMOTE_BRANCH_ICON="\u2192" # โ†’ + VCS_REMOTE_BRANCH_ICON="\U2192" # โ†’ VCS_GIT_ICON='Git' VCS_HG_ICON='HG' ;; 'awesome-patched') # Awesome-Patched Font required! # See https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched - LEFT_SEGMENT_SEPARATOR="\uE0B0" # ๎‚ฐ - RIGHT_SEGMENT_SEPARATOR="\uE0B2" # ๎‚ฒ - ROOT_ICON="\u26A1" # โšก - RUBY_ICON="\uE847" # ๎ก‡ - AWS_ICON="\uE895" # ๎ข• - BACKGROUND_JOBS_ICON="\uE82F " # ๎ ฏ - TEST_ICON="\uE891" # ๎ข‘ - OK_ICON="\u2713" # โœ“ - FAIL_ICON="\u2718" # โœ˜ + LEFT_SEGMENT_SEPARATOR="\UE0B0" # ๎‚ฐ + RIGHT_SEGMENT_SEPARATOR="\UE0B2" # ๎‚ฒ + ROOT_ICON="\U26A1" # โšก + RUBY_ICON="\UE847" # ๎ก‡ + AWS_ICON="\UE895" # ๎ข• + BACKGROUND_JOBS_ICON="\UE82F " # ๎ ฏ + TEST_ICON="\UE891" # ๎ข‘ + OK_ICON="\U2713" # โœ“ + FAIL_ICON="\U2718" # โœ˜ SYMFONY_ICON="SF" - VCS_UNTRACKED_ICON="\uE16C" # ๎…ฌ - VCS_UNSTAGED_ICON="\uE17C" # ๎…ผ - VCS_STAGED_ICON="\uE168" # ๎…จ - VCS_STASH_ICON="\uE133 " # ๎„ณ - #VCS_INCOMING_CHANGES="\uE1EB " # ๎‡ซ - #VCS_INCOMING_CHANGES="\uE80D " # ๎  - VCS_INCOMING_CHANGES="\uE131 " # ๎„ฑ - #VCS_OUTGOING_CHANGES="\uE1EC " # ๎‡ฌ - #VCS_OUTGOING_CHANGES="\uE80E " # ๎ Ž - VCS_OUTGOING_CHANGES="\uE132 " # ๎„ฒ - VCS_TAG_ICON="\uE817 " # ๎ — - VCS_BOOKMARK_ICON="\uE87B" # ๎กป - VCS_COMMIT_ICON="\uE821 " # ๎ ก - VCS_BRANCH_ICON="\uE220" # ๎ˆ  - VCS_REMOTE_BRANCH_ICON=" \uE804 " # ๎ „ - VCS_GIT_ICON="\uE20E " # ๎ˆŽ - VCS_HG_ICON="\uE1C3 " # ๎‡ƒ + VCS_UNTRACKED_ICON="\UE16C" # ๎…ฌ + VCS_UNSTAGED_ICON="\UE17C" # ๎…ผ + VCS_STAGED_ICON="\UE168" # ๎…จ + VCS_STASH_ICON="\UE133 " # ๎„ณ + #VCS_INCOMING_CHANGES="\UE1EB " # ๎‡ซ + #VCS_INCOMING_CHANGES="\UE80D " # ๎  + VCS_INCOMING_CHANGES="\UE131 " # ๎„ฑ + #VCS_OUTGOING_CHANGES="\UE1EC " # ๎‡ฌ + #VCS_OUTGOING_CHANGES="\UE80E " # ๎ Ž + VCS_OUTGOING_CHANGES="\UE132 " # ๎„ฒ + VCS_TAG_ICON="\UE817 " # ๎ — + VCS_BOOKMARK_ICON="\UE87B" # ๎กป + VCS_COMMIT_ICON="\UE821 " # ๎ ก + VCS_BRANCH_ICON="\UE220" # ๎ˆ  + VCS_REMOTE_BRANCH_ICON=" \UE804 " # ๎ „ + VCS_GIT_ICON="\UE20E " # ๎ˆŽ + VCS_HG_ICON="\UE1C3 " # ๎‡ƒ ;; *) # Powerline-Patched Font required! # See https://github.com/Lokaltog/powerline-fonts - LEFT_SEGMENT_SEPARATOR="\uE0B0" # ๎‚ฐ - RIGHT_SEGMENT_SEPARATOR="\uE0B2" # ๎‚ฒ - ROOT_ICON="\u26A1" # โšก + LEFT_SEGMENT_SEPARATOR="\UE0B0" # ๎‚ฐ + RIGHT_SEGMENT_SEPARATOR="\UE0B2" # ๎‚ฒ + ROOT_ICON="\U26A1" # โšก RUBY_ICON='' AWS_ICON="AWS:" - BACKGROUND_JOBS_ICON="\u2699" # โš™ + BACKGROUND_JOBS_ICON="\U2699" # โš™ TEST_ICON='' - OK_ICON="\u2713" # โœ“ - FAIL_ICON="\u2718" # โœ˜ + OK_ICON="\U2713" # โœ“ + FAIL_ICON="\U2718" # โœ˜ SYMFONY_ICON="SF" VCS_UNTRACKED_ICON='?' - VCS_UNSTAGED_ICON="\u25CF" # โ— - VCS_STAGED_ICON="\u271A" # โœš - VCS_STASH_ICON="\u235F" # โŸ - VCS_INCOMING_CHANGES="\u2193" # โ†“ - VCS_OUTGOING_CHANGES="\u2191" # โ†‘ + VCS_UNSTAGED_ICON="\U25CF" # โ— + VCS_STAGED_ICON="\U271A" # โœš + VCS_STASH_ICON="\U235F" # โŸ + VCS_INCOMING_CHANGES="\U2193" # โ†“ + VCS_OUTGOING_CHANGES="\U2191" # โ†‘ VCS_TAG_ICON='' - VCS_BOOKMARK_ICON="\u263F" # โ˜ฟ + VCS_BOOKMARK_ICON="\U263F" # โ˜ฟ VCS_COMMIT_ICON='' - VCS_BRANCH_ICON="\uE0A0 " # ๎‚  - VCS_REMOTE_BRANCH_ICON="\u2192" # โ†’ + VCS_BRANCH_ICON="\UE0A0 " # ๎‚  + VCS_REMOTE_BRANCH_ICON="\U2192" # โ†’ VCS_GIT_ICON="" VCS_HG_ICON="" ;; @@ -520,7 +520,7 @@ prompt_longstatus() { prompt_node_version() { local nvm_prompt=$(node -v 2>/dev/null) [[ -z "${nvm_prompt}" ]] && return - NODE_ICON=$'\u2B22' # โฌข + NODE_ICON=$'\U2B22' # โฌข $1_prompt_segment "$0" "green" "white" "${nvm_prompt:1} $NODE_ICON" }