From 2c8ddb6a90c7868f3b4d0f379b707fd89fa654b8 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 7 Jan 2026 10:37:21 +0100 Subject: [PATCH 01/12] docs: mention that vscode installed via snap cannot use system fonts --- README.md | 5 +++++ font.md | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 22c68d62..7f073f3b 100644 --- a/README.md +++ b/README.md @@ -658,6 +658,11 @@ If you are using a different terminal, proceed with manual font installation. https://raw.githubusercontent.com/romkatv/powerlevel10k-media/389133fb8c9a2347929a23702ce3039aacc46c3d/visual-studio-code-font-settings.jpg) to see how it should look like or see [this issue]( https://github.com/romkatv/powerlevel10k/issues/671) for extra information. + + Note that software installed via [Snap](https://en.wikipedia.org/wiki/Snap_\(software\)) is + unable to use system fonts. If you've install Visual Studio Code vis Snap, remove it by running + `sudo snap remove code` and install the official `.deb` build from the + [Visual Studio Code website](https://code.visualstudio.com/Download). - **GNOME Terminal** (the default Ubuntu terminal): Open *Terminal → Preferences* and click on the selected profile under *Profiles*. Check *Custom font* under *Text Appearance* and select `MesloLGS NF Regular`. diff --git a/font.md b/font.md index cb49af46..7bc81b87 100644 --- a/font.md +++ b/font.md @@ -43,6 +43,11 @@ If you are using a different terminal, proceed with manual font installation. https://raw.githubusercontent.com/romkatv/powerlevel10k-media/389133fb8c9a2347929a23702ce3039aacc46c3d/visual-studio-code-font-settings.jpg) to see how it should look like or see [this issue]( https://github.com/romkatv/powerlevel10k/issues/671) for extra information. + + Note that software installed via [Snap](https://en.wikipedia.org/wiki/Snap_\(software\)) is + unable to use system fonts. If you've install Visual Studio Code vis Snap, remove it by running + `sudo snap remove code` and install the official `.deb` build from the + [Visual Studio Code website](https://code.visualstudio.com/Download). - **GNOME Terminal** (the default Ubuntu terminal): Open *Terminal → Preferences* and click on the selected profile under *Profiles*. Check *Custom font* under *Text Appearance* and select `MesloLGS NF Regular`. From efc9ddd9b615a0042b5bcc36f97f070ca6fdf09e Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 7 Jan 2026 10:38:02 +0100 Subject: [PATCH 02/12] docs: typo --- README.md | 2 +- font.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7f073f3b..00b84cf3 100644 --- a/README.md +++ b/README.md @@ -660,7 +660,7 @@ If you are using a different terminal, proceed with manual font installation. https://github.com/romkatv/powerlevel10k/issues/671) for extra information. Note that software installed via [Snap](https://en.wikipedia.org/wiki/Snap_\(software\)) is - unable to use system fonts. If you've install Visual Studio Code vis Snap, remove it by running + unable to use system fonts. If you've install Visual Studio Code via Snap, remove it by running `sudo snap remove code` and install the official `.deb` build from the [Visual Studio Code website](https://code.visualstudio.com/Download). - **GNOME Terminal** (the default Ubuntu terminal): Open *Terminal → Preferences* and click on the diff --git a/font.md b/font.md index 7bc81b87..f1a2abf3 100644 --- a/font.md +++ b/font.md @@ -45,7 +45,7 @@ If you are using a different terminal, proceed with manual font installation. https://github.com/romkatv/powerlevel10k/issues/671) for extra information. Note that software installed via [Snap](https://en.wikipedia.org/wiki/Snap_\(software\)) is - unable to use system fonts. If you've install Visual Studio Code vis Snap, remove it by running + unable to use system fonts. If you've install Visual Studio Code via Snap, remove it by running `sudo snap remove code` and install the official `.deb` build from the [Visual Studio Code website](https://code.visualstudio.com/Download). - **GNOME Terminal** (the default Ubuntu terminal): Open *Terminal → Preferences* and click on the From 447d0b2e686c274bb81fb92ee2714a1e69606c75 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 22 Jan 2026 14:12:49 +0100 Subject: [PATCH 03/12] make realtime time update interval configurable (#2916) --- internal/p10k.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index f73dd208..443111f2 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3527,7 +3527,8 @@ _p9k_prompt_time_compute() { } _p9k_prompt_time_async() { - sleep 1 || true + zmodload zsh/mathfunc zsh/zselect || return + zselect -t $((int(ceil(_POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC * 100)))) || true } _p9k_prompt_time_sync() { @@ -7809,8 +7810,10 @@ _p9k_init_params() { # commands will contain the start times of their commands as opposed to the default # behavior where they contain the end times of their preceding commands. _p9k_declare -b POWERLEVEL9K_TIME_UPDATE_ON_COMMAND 0 - # If set to true, time will update every second. + # If set to true, time will update every + # POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC seconds. _p9k_declare -b POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME 0 + _p9k_declare -F POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC 1 _p9k_declare -b POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH 0 typeset -g _p9k_nix_shell_cond='${IN_NIX_SHELL:#0}' From 3d2c72244d000db42178e56f4f979c4d98963220 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 22 Jan 2026 15:09:16 +0100 Subject: [PATCH 04/12] align realtime time updates to POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC (#2916) --- internal/p10k.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 443111f2..6abaa986 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3528,7 +3528,8 @@ _p9k_prompt_time_compute() { _p9k_prompt_time_async() { zmodload zsh/mathfunc zsh/zselect || return - zselect -t $((int(ceil(_POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC * 100)))) || true + local -F t=_POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC + zselect -t $((int(ceil(100 *(t - EPOCHREALTIME % t))))) || true } _p9k_prompt_time_sync() { @@ -7814,6 +7815,9 @@ _p9k_init_params() { # POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC seconds. _p9k_declare -b POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME 0 _p9k_declare -F POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC 1 + if (( _POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC <= 0 )); then + _POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC=1 + fi _p9k_declare -b POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH 0 typeset -g _p9k_nix_shell_cond='${IN_NIX_SHELL:#0}' From b97926675aba2d8465325d786cc69de9d9fdec84 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 22 Jan 2026 15:10:11 +0100 Subject: [PATCH 05/12] formatting --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 6abaa986..8d3b33a3 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3529,7 +3529,7 @@ _p9k_prompt_time_compute() { _p9k_prompt_time_async() { zmodload zsh/mathfunc zsh/zselect || return local -F t=_POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC - zselect -t $((int(ceil(100 *(t - EPOCHREALTIME % t))))) || true + zselect -t $((int(ceil(100 * (t - EPOCHREALTIME % t))))) || true } _p9k_prompt_time_sync() { From 7178d3b275fbf5796c30d169873253af26b89942 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 28 Jan 2026 19:32:06 +0200 Subject: [PATCH 06/12] interpret also tofu as terraform (#2919) --- config/p10k-classic.zsh | 6 +++--- config/p10k-lean-8colors.zsh | 6 +++--- config/p10k-lean.zsh | 6 +++--- config/p10k-rainbow.zsh | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 623b9308..e31705bd 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1377,7 +1377,7 @@ #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# # Show aws only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show aws. - typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|tofu|pulumi|terragrunt' # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element # in each pair defines a pattern against which the current AWS profile gets matched. @@ -1424,7 +1424,7 @@ ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## # Show azure only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show azure. - typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|tofu|pulumi|terragrunt' # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element # in each pair defines a pattern against which the current azure account name gets matched. @@ -1503,7 +1503,7 @@ #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# # Show google_app_cred only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show google_app_cred. - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|tofu|pulumi|terragrunt' # Google application credentials classes for the purpose of using different colors, icons and # expansions with different credentials. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 3f72ff4b..3c0fecf8 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -1352,7 +1352,7 @@ #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# # Show aws only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show aws. - typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|tofu|pulumi|terragrunt' # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element # in each pair defines a pattern against which the current AWS profile gets matched. @@ -1399,7 +1399,7 @@ ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## # Show azure only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show azure. - typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|tofu|pulumi|terragrunt' # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element # in each pair defines a pattern against which the current azure account name gets matched. @@ -1478,7 +1478,7 @@ #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# # Show google_app_cred only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show google_app_cred. - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|tofu|pulumi|terragrunt' # Google application credentials classes for the purpose of using different colors, icons and # expansions with different credentials. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index cef70fd8..a20e1318 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -1352,7 +1352,7 @@ #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# # Show aws only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show aws. - typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|tofu|pulumi|terragrunt' # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element # in each pair defines a pattern against which the current AWS profile gets matched. @@ -1399,7 +1399,7 @@ ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## # Show azure only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show azure. - typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|tofu|pulumi|terragrunt' # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element # in each pair defines a pattern against which the current azure account name gets matched. @@ -1478,7 +1478,7 @@ #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# # Show google_app_cred only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show google_app_cred. - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|tofu|pulumi|terragrunt' # Google application credentials classes for the purpose of using different colors, icons and # expansions with different credentials. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index ed74b7fa..62b92637 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1365,7 +1365,7 @@ # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' ################[ terraform_version: It shows active terraform version (https://www.terraform.io) ]################# - typeset -g POWERLEVEL9K_TERRAFORM_VERSION_SHOW_ON_COMMAND='terraform|tf' + typeset -g POWERLEVEL9K_TERRAFORM_VERSION_SHOW_ON_COMMAND='terraform|tf|tofu' #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# # Show kubecontext only when the command you are typing invokes one of these tools. @@ -1459,7 +1459,7 @@ #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# # Show aws only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show aws. - typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|tofu|pulumi|terragrunt' # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element # in each pair defines a pattern against which the current AWS profile gets matched. @@ -1508,7 +1508,7 @@ ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## # Show azure only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show azure. - typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|tofu|pulumi|terragrunt' # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element # in each pair defines a pattern against which the current azure account name gets matched. @@ -1590,7 +1590,7 @@ #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# # Show google_app_cred only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show google_app_cred. - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|tofu|pulumi|terragrunt' # Google application credentials classes for the purpose of using different colors, icons and # expansions with different credentials. From 8ed1f58e082e1cce85e1d69235d1a906cf3c643e Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Wed, 28 Jan 2026 18:36:37 +0100 Subject: [PATCH 07/12] remove junk that has slipped in through 9f989151 (#1487) --- config/p10k-rainbow.zsh | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 62b92637..730ef196 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1364,9 +1364,6 @@ # Custom icon. # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - ################[ terraform_version: It shows active terraform version (https://www.terraform.io) ]################# - typeset -g POWERLEVEL9K_TERRAFORM_VERSION_SHOW_ON_COMMAND='terraform|tf|tofu' - #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# # Show kubecontext only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show kubecontext. From 7ff836131ab462073053dde941c3188ce0e4243c Mon Sep 17 00:00:00 2001 From: Kevin Ji <1146876+kevinji@users.noreply.github.com> Date: Tue, 10 Mar 2026 18:09:44 -0700 Subject: [PATCH 08/12] fix(gcloud): prevent gcloud CLI from hanging (#2935) If the `gcloud` command is interactive (e.g. asks to install a component, or needs an update), the current code will hang forever, and is uninterruptible as `INT` is being swallowed. Fix this with ` Date: Sat, 14 Mar 2026 07:06:58 +0100 Subject: [PATCH 09/12] Squashed 'gitstatus/' changes from 44504a24..075baf6e 075baf6e Fix gitstatus build failure with Apple Clang 17 (Xcode 16+) 6bcf109c Compiling on mips64 (#476) git-subtree-dir: gitstatus git-subtree-split: 075baf6ecb19f58b09c9562f33c20b842e870961 --- gitstatus/build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gitstatus/build b/gitstatus/build index ea96a25a..66b4e59f 100755 --- a/gitstatus/build +++ b/gitstatus/build @@ -272,9 +272,9 @@ case "$gitstatus_kernel" in gitstatus_cxxflags="$gitstatus_cxxflags -I"$brew_prefix"/opt/libiconv/include" fi libgit2_cmake_flags="$libgit2_cmake_flags -DUSE_ICONV=ON" - gitstatus_ldlibs="$gitstatus_ldlibs -liconv" + gitstatus_ldlibs="$gitstatus_ldlibs -liconv -lz" gitstatus_ldflags="$gitstatus_ldflags -L${workdir}/lib" - libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=OFF" + libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=OFF -DUSE_BUNDLED_ZLIB=OFF" ;; msys*|mingw*) gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}" @@ -551,6 +551,7 @@ if [ -z "$gitstatus_cpu" ]; then arm64|aarch64) gitstatus_cpu=armv8-a;; ppc64|ppc64le) gitstatus_cpu=powerpc64le;; riscv64) gitstatus_cpu=rv64imafdc;; + mips64) gitstatus_cpu=mips64;; loongarch64) gitstatus_cpu=loongarch64;; x86_64|amd64) gitstatus_cpu=x86-64;; x86) gitstatus_cpu=i586;; From 31982e202d2e939e5c35d6a99f97345b43b8d503 Mon Sep 17 00:00:00 2001 From: George Nachman Date: Tue, 2 Jun 2026 11:16:25 -0700 Subject: [PATCH 10/12] emit OSC 133 k=r and k=s for iTerm2 >= 3.7.0 (#2954) iTerm2 3.7.0 added receiver support for the OSC 133 k= attribute (Semantic Prompt prompt kinds: k=i initial, k=s secondary/PS2, k=c continuation, k=r right). When emitted by the shell, iTerm2 records the bracketed cells as non-input on the active primary prompt mark, so consumers (Select Current Command, share-as-URL, AI prompt extraction, the Python GetPromptResponse.excluded_subranges field) can subtract them from the typed-command range. Two gaps for iTerm2 today: 1. The RPROMPT k=r wrap in _p9k_init_prompt is gated to WarpTerminal. iTerm2 sessions never trip the gate, so right-prompt cells leak into "Select Current Command", share URLs, etc. 2. p10k replaces iTerm2's iterm2_decorate_prompt with a stub that only records ITERM2_PRECMD_PS1. iTerm2's original function also wraps PS2 with OSC 133; the stub drops that wrap entirely, so multi-line input (for, while, unclosed quotes, heredocs, backslash continuations) produces no k=s markers and iTerm2 has no way to tell PS2-prefix cells apart from user input. Both fixes are gated on iTerm2 >= 3.7.0 via TERM_PROGRAM_VERSION == (3.<7->*|<4->.*). Older iTerm2 receivers do not parse k= and would treat k=r/k=s markers as spurious primary prompts (extra navigation marks, broken command-range tracking, broken paste-each-line semantics). WarpTerminal behavior is unchanged. The ITERM2_SQUELCH_PS2_MARK opt-out from iTerm2's original iterm2_decorate_prompt is preserved. --- internal/p10k.zsh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 4f3c91f2..064bbd3a 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8399,14 +8399,16 @@ _p9k_init_prompt() { if (( _POWERLEVEL9K_TERM_SHELL_INTEGRATION )); then _p9k_prompt_prefix_left+=$'%{\e]133;A\a%}' _p9k_prompt_suffix_left+=$'%{\e]133;B\a%}' - if [[ $TERM_PROGRAM == WarpTerminal ]]; then + if [[ $TERM_PROGRAM == WarpTerminal || + ( $TERM_PROGRAM == iTerm.app && $TERM_PROGRAM_VERSION == (3.<7->*|<4->.*) ) ]]; then _p9k_prompt_prefix_right=$'%{\e]133;P;k=r\a%}'$_p9k_prompt_prefix_right _p9k_prompt_suffix_right+=$'%{\e]133;B\a%}' fi if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then _p9k_prompt_prefix_left+=$'%{\ePtmux;\e\e]133;A\a\e\\%}' _p9k_prompt_suffix_left+=$'%{\ePtmux;\e\e]133;B\a\e\\%}' - if [[ $TERM_PROGRAM == WarpTerminal ]]; then + if [[ $TERM_PROGRAM == WarpTerminal || + ( $TERM_PROGRAM == iTerm.app && $TERM_PROGRAM_VERSION == (3.<7->*|<4->.*) ) ]]; then _p9k_prompt_prefix_right=$'%{\ePtmux;\e\e]133;P;k=r\a\e\\%}'$_p9k_prompt_prefix_right _p9k_prompt_suffix_right+=$'%{\ePtmux;\e\e]133;B\a\e\\%}' fi @@ -8965,6 +8967,11 @@ _p9k_init() { function iterm2_decorate_prompt() { typeset -g ITERM2_PRECMD_PS1=$PROMPT typeset -g ITERM2_SHOULD_DECORATE_PROMPT= + if [[ -n $PS2 && $PS2 != *$'\e]133;A;k=s\a'* && -z ${ITERM2_SQUELCH_PS2_MARK-} && + $TERM_PROGRAM_VERSION == (3.<7->*|<4->.*) ]]; then + typeset -g ITERM2_PRECMD_PS2=$PS2 + PS2=$'%{\e]133;A;k=s\a%}'$PS2$'%{\e]133;B\a%}' + fi } fi if (( $+functions[iterm2_precmd] )); then From a0c9dbe80be404ff58e3ce5d7cf312582e370635 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 2 Jun 2026 20:20:51 +0200 Subject: [PATCH 11/12] bump version --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 064bbd3a..29b02736 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9519,7 +9519,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.15 +typeset -g P9K_VERSION=1.20.16 if [[ ${VSCODE_SHELL_INTEGRATION-} == <1-> && ${+__p9k_force_term_shell_integration} == 0 ]]; then typeset -gri __p9k_force_term_shell_integration=1 From 9253fb1c5034410c43a0c681ff8294181c54016c Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Mon, 15 Jun 2026 09:54:55 +0200 Subject: [PATCH 12/12] fix a bug that triggers when SH_GLOB is set (#2887) --- internal/p10k.zsh | 20 ++++++++++++++------ powerlevel10k.zsh-theme | 8 +++++++- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 29b02736..d214b7bc 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -138,6 +138,14 @@ function getColorCode() { return 1 } +function _p9k_codeset_is_utf8() { + # Use `case` to survive SH_GLOB. + case "${langinfo[CODESET]}" in + utf-8|UTF-8|utf8|UTF8) return 0;; + *) return 1;; + esac +} + # _p9k_declare [default]... function _p9k_declare() { local -i set=$+parameters[$2] @@ -1796,7 +1804,7 @@ prompt_dir() { if (( $+_POWERLEVEL9K_SHORTEN_DELIMITER )); then local delim=$_POWERLEVEL9K_SHORTEN_DELIMITER else - if [[ $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then + if _p9k_codeset_is_utf8; then local delim=$'\u2026' else local delim='..' @@ -6851,13 +6859,13 @@ function _p9k_restore_special_params() { } function _p9k_on_expand() { - (( _p9k__expanded && ! ${+__p9k_instant_prompt_active} )) && [[ "${langinfo[CODESET]}" == (utf|UTF)(-|)8 ]] && return + (( _p9k__expanded && ! ${+__p9k_instant_prompt_active} )) && _p9k_codeset_is_utf8 && return eval "$__p9k_intro_no_locale" - if [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]]; then + if ! _p9k_codeset_is_utf8; then _p9k_restore_special_params - if [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale; then + if ! _p9k_codeset_is_utf8 && _p9k_init_locale; then if [[ -n $LC_ALL ]]; then _p9k__real_lc_all=$LC_ALL LC_ALL=$__p9k_locale @@ -7458,7 +7466,7 @@ _p9k_init_params() { _p9k_declare -i POWERLEVEL9K_VCS_SHORTEN_LENGTH _p9k_declare -i POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH _p9k_declare -s POWERLEVEL9K_VCS_SHORTEN_STRATEGY - if [[ $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then + if _p9k_codeset_is_utf8; then _p9k_declare -e POWERLEVEL9K_VCS_SHORTEN_DELIMITER '\u2026' else _p9k_declare -e POWERLEVEL9K_VCS_SHORTEN_DELIMITER '..' @@ -9519,7 +9527,7 @@ if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file && -n $__p9k_instant_p zf_rm -f -- $__p9k_instant_prompt_dump_file{,.zwc} 2>/dev/null fi -typeset -g P9K_VERSION=1.20.16 +typeset -g P9K_VERSION=1.20.17 if [[ ${VSCODE_SHELL_INTEGRATION-} == <1-> && ${+__p9k_force_term_shell_integration} == 0 ]]; then typeset -gri __p9k_force_term_shell_integration=1 diff --git a/powerlevel10k.zsh-theme b/powerlevel10k.zsh-theme index 92079d40..1f7e8b33 100644 --- a/powerlevel10k.zsh-theme +++ b/powerlevel10k.zsh-theme @@ -27,7 +27,13 @@ local -a match mbegin mend local -i MBEGIN MEND OPTIND local MATCH OPTARG IFS=$'\'' \t\n\0'\' - typeset -gr __p9k_intro_locale='[[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale && { [[ -n $LC_ALL ]] && local LC_ALL=$__p9k_locale || local LC_CTYPE=$__p9k_locale }' + # Use `case` to survive SH_GLOB. + typeset -gr __p9k_intro_locale='{ + case "${langinfo[CODESET]}" in + utf-8|UTF-8|utf8|UTF8) false;; + *) true;; + esac + } && _p9k_init_locale && { [[ -n "$LC_ALL" ]] && local LC_ALL=$__p9k_locale || local LC_CTYPE=$__p9k_locale }' typeset -gr __p9k_intro_no_locale="${${__p9k_intro_base/ match / match reply }/ MATCH / MATCH REPLY }" typeset -gr __p9k_intro_no_reply="$__p9k_intro_base; $__p9k_intro_locale" typeset -gr __p9k_intro="$__p9k_intro_no_locale; $__p9k_intro_locale"