From 119e4039ef9068fa96490a90c559e7594843ec22 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 17 Aug 2024 09:34:01 +0200 Subject: [PATCH 1/8] force shell integration when running under vscode integrated terminal with shell integration enabled --- internal/p10k.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index d2d261b2..fb724cff 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9483,7 +9483,11 @@ 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.10 +typeset -g P9K_VERSION=1.20.11 + +if [[ ${VSCODE_SHELL_INTEGRATION-} == <1-> && ${+__p9k_force_term_shell_integration} == 0 ]]; then + typeset -gri __p9k_force_term_shell_integration=1 +fi unset VSCODE_SHELL_INTEGRATION _p9k_init_ssh From a42e374e25226d2032a38b38fc544ec1d65b0d01 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 17 Aug 2024 09:47:06 +0200 Subject: [PATCH 2/8] add cmdline_url to 133;C when KITTY_SHELL_INTEGRATION is defined --- internal/p10k.zsh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index fb724cff..f45293be 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5812,7 +5812,7 @@ _p9k_preexec2() { typeset -g _p9k__preexec_cmd=$2 _p9k__timer_start=EPOCHREALTIME P9K_TTY=old - (( ! $+_p9k__iterm_cmd )) || _p9k_iterm2_preexec + (( ! $+_p9k__iterm_cmd )) || _p9k_iterm2_preexec "$1" } function _p9k_prompt_net_iface_init() { @@ -8877,7 +8877,17 @@ function _p9k_iterm2_precmd() { } function _p9k_iterm2_preexec() { - [[ -t 1 ]] && builtin print -n '\e]133;C;\a' + if [[ -t 1 ]]; then + if (( ${+__p9k_use_osc133_c_cmdline} )); then + () { + emulate -L zsh -o extended_glob -o no_multibyte + local MATCH MBEGIN MEND + builtin printf '\e]133;C;cmdline_url=%s\a' "${1//(#m)[^a-zA-Z0-9"\/:_.-!'()~"]/%${(l:2::0:)$(([##16]#MATCH))}}" + } "$1" + else + builtin print -n '\e]133;C;\a' + fi + fi typeset -gi _p9k__iterm_cmd=2 } @@ -9082,6 +9092,7 @@ _p9k_precmd_first() { if [[ -n $KITTY_SHELL_INTEGRATION && KITTY_SHELL_INTEGRATION[(wIe)no-prompt-mark] -eq 0 ]]; then KITTY_SHELL_INTEGRATION+=' no-prompt-mark' (( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1 + (( $+__p9k_use_osc133_c_cmdline )) || typeset -gri __p9k_use_osc133_c_cmdline=1 elif [[ $TERM_PROGRAM == WarpTerminal ]]; then (( $+__p9k_force_term_shell_integration )) || typeset -gri __p9k_force_term_shell_integration=1 fi @@ -9483,7 +9494,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.11 +typeset -g P9K_VERSION=1.20.12 if [[ ${VSCODE_SHELL_INTEGRATION-} == <1-> && ${+__p9k_force_term_shell_integration} == 0 ]]; then typeset -gri __p9k_force_term_shell_integration=1 From c30068c1f1ee28c13a761648072e708b56ae2535 Mon Sep 17 00:00:00 2001 From: Oleksii Kyslytsia Date: Thu, 5 Sep 2024 13:22:34 +0300 Subject: [PATCH 3/8] docs: Add instructions for setting MesloLGS NF font in Deepin Terminal --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 884cb21f..0f2cc6bf 100644 --- a/README.md +++ b/README.md @@ -779,6 +779,14 @@ If you are using a different terminal, proceed with manual font installation. font-style: italic; } ``` + - **Deepin Terminal**: Open `~/.config/deepin/deepin-terminal/config.conf` and set `basic.interface.font` to `"MesloLGS NF"`. + ```ini + [basic.interface.font] + value="MesloLGS NF" + + [basic.interface.font_size] + value=10 + ``` **_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten. 1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work incorrectly with the new font. From d71edb83f9c7f045a0d528eeff3445ec3d518d71 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 5 Sep 2024 12:37:49 +0200 Subject: [PATCH 4/8] docs: fix font instructions for deepin terminal and copy them over to font.md (#2752) --- README.md | 10 ++++------ font.md | 6 ++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0f2cc6bf..3c255207 100644 --- a/README.md +++ b/README.md @@ -779,15 +779,13 @@ If you are using a different terminal, proceed with manual font installation. font-style: italic; } ``` - - **Deepin Terminal**: Open `~/.config/deepin/deepin-terminal/config.conf` and set `basic.interface.font` to `"MesloLGS NF"`. + **_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten. + - **Deepin Terminal**: Create or open `~/.config/deepin/deepin-terminal/config.conf` and add the following section + to it: ```ini [basic.interface.font] - value="MesloLGS NF" - - [basic.interface.font_size] - value=10 + value = "MesloLGS NF" ``` - **_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten. 1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work incorrectly with the new font. diff --git a/font.md b/font.md index 7a7cb005..7f0f0572 100644 --- a/font.md +++ b/font.md @@ -160,6 +160,12 @@ If you are using a different terminal, proceed with manual font installation. } ``` **_CAVEAT_**: If you open the normal terminal preferences these settings will be overwritten. + - **Deepin Terminal**: Create or open `~/.config/deepin/deepin-terminal/config.conf` and add the following section + to it: + ```ini + [basic.interface.font] + value = "MesloLGS NF" + ``` 1. Run `p10k configure` to generate a new `~/.p10k.zsh`. The old config may work incorrectly with the new font. From edf38f964e3c5babf86642acf7a875fae88f4b5a Mon Sep 17 00:00:00 2001 From: Daphne Pfister Date: Tue, 17 Sep 2024 00:47:40 -0400 Subject: [PATCH 5/8] Add AlmaLinux icon --- internal/icons.zsh | 7 +++++++ internal/p10k.zsh | 1 + internal/wizard.zsh | 1 + 3 files changed, 9 insertions(+) diff --git a/internal/icons.zsh b/internal/icons.zsh index d34b2c0e..b774360c 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -74,6 +74,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON '\uE271'$s #  LINUX_ENDEAVOUROS_ICON '\uE271'$s #  LINUX_ROCKY_ICON '\uE271'$s #  + LINUX_ALMALINUX_ICON '\uE271'$s #  LINUX_GUIX_ICON '\uE271'$s #  LINUX_NEON_ICON '\uE271'$s #  SUNOS_ICON '\U1F31E'$q # 🌞 @@ -232,6 +233,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON '\uF17C'$s #  LINUX_ENDEAVOUROS_ICON '\uF17C'$s #  LINUX_ROCKY_ICON '\uF17C'$s #  + LINUX_ALMALINUX_ICON '\uF17C'$s #  LINUX_GUIX_ICON '\uF17C'$s #  LINUX_NEON_ICON '\uF17C'$s #  SUNOS_ICON '\uF185 ' #  @@ -391,6 +393,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_ENDEAVOUROS_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_ROCKY_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" + LINUX_ALMALINUX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_GUIX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" LINUX_NEON_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}" SUNOS_ICON "${CODEPOINT_OF_AWESOME_SUN_O:+\\u$CODEPOINT_OF_AWESOME_SUN_O }" @@ -543,6 +546,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON '\uF270'$s #  LINUX_ENDEAVOUROS_ICON '\UF322'$s #  LINUX_ROCKY_ICON '\UF32B'$s #  + LINUX_ALMALINUX_ICON '\UF31D'$s #  LINUX_GUIX_ICON '\UF325'$s #  LINUX_NEON_ICON '\uF17C' #  LINUX_ICON '\uF17C' #  @@ -703,6 +707,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON '\uF270'$s #  LINUX_ENDEAVOUROS_ICON '\uF17C' #  LINUX_ROCKY_ICON '\uF17C' #  + LINUX_ALMALINUX_ICON '\uF17C' #  LINUX_GUIX_ICON '\uF325'$s #  LINUX_NEON_ICON '\uF17C' #  LINUX_ICON '\uF17C' #  @@ -856,6 +861,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON 'amzn' LINUX_ENDEAVOUROS_ICON 'edvos' LINUX_ROCKY_ICON 'rocky' + LINUX_ALMALINUX_ICON 'almalinux' LINUX_GUIX_ICON 'guix' LINUX_NEON_ICON 'neon' SUNOS_ICON 'sunos' @@ -1010,6 +1016,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON 'Amzn' LINUX_ENDEAVOUROS_ICON 'Edv' LINUX_ROCKY_ICON 'Roc' + LINUX_ALMALINUX_ICON 'Alma' LINUX_GUIX_ICON 'Guix' LINUX_NEON_ICON 'Neon' SUNOS_ICON 'Sun' diff --git a/internal/p10k.zsh b/internal/p10k.zsh index f45293be..571e7de8 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8661,6 +8661,7 @@ function _p9k_init_cacheable() { amzn) _p9k_set_os Linux LINUX_AMZN_ICON;; endeavouros) _p9k_set_os Linux LINUX_ENDEAVOUROS_ICON;; rocky) _p9k_set_os Linux LINUX_ROCKY_ICON;; + almalinux) _p9k_set_os Linux LINUX_ALMALINUX_ICON;; guix) _p9k_set_os Linux LINUX_GUIX_ICON;; neon) _p9k_set_os Linux LINUX_NEON_ICON;; *) _p9k_set_os Linux LINUX_ICON;; diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 8d20675c..5ae58002 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -1164,6 +1164,7 @@ function os_icon_name() { amzn) echo LINUX_AMZN_ICON;; endeavouros) echo LINUX_ENDEAVOUROS_ICON;; rocky) echo LINUX_ROCKY_ICON;; + almalinux) echo LINUX_ALMALINUX_ICON;; guix) echo LINUX_GUIX_ICON;; neon) echo LINUX_NEON_ICON;; *) echo LINUX_ICON;; From 087405df7838f4c3e835025699bd7b98b9731acc Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 17 Sep 2024 14:10:20 +0200 Subject: [PATCH 6/8] minor cleanup (#2758) --- internal/icons.zsh | 2 +- internal/p10k.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/icons.zsh b/internal/icons.zsh index b774360c..1d1cafbb 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -861,7 +861,7 @@ function _p9k_init_icons() { LINUX_AMZN_ICON 'amzn' LINUX_ENDEAVOUROS_ICON 'edvos' LINUX_ROCKY_ICON 'rocky' - LINUX_ALMALINUX_ICON 'almalinux' + LINUX_ALMALINUX_ICON 'alma' LINUX_GUIX_ICON 'guix' LINUX_NEON_ICON 'neon' SUNOS_ICON 'sunos' diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 571e7de8..65d67c13 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -9495,7 +9495,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.12 +typeset -g P9K_VERSION=1.20.13 if [[ ${VSCODE_SHELL_INTEGRATION-} == <1-> && ${+__p9k_force_term_shell_integration} == 0 ]]; then typeset -gri __p9k_force_term_shell_integration=1 From 140a6ade4e9d7431df697de4dfff04b353e219e2 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Thu, 3 Oct 2024 11:16:46 +0200 Subject: [PATCH 7/8] Squashed 'gitstatus/' changes from 62177e89..44504a24 44504a24 make: remove -Wall 8795883c Specify cmake generator in build file (#441) 3e08476b docs: the project is on life support 12e6a689 Add support to build e2k arch. (#432) a952c3f6 bump version to v1.5.5 git-subtree-dir: gitstatus git-subtree-split: 44504a24b1b999a4f56ff74c75b8215bdcadee1f --- Makefile | 2 +- README.md | 4 ++++ build | 13 ++++++++++++- build.info | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index adb20e9d..4a695acb 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ VERSION ?= $(shell . ./build.info && printf "%s" "$$gitstatus_version") # # Sized delete is implemented as __ZdlPvm in /usr/lib/libc++.1.dylib but this symbol is # missing in macOS prior to 10.13. -CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) -Wall # -g -fsanitize=thread +CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) # -Wall -g -fsanitize=thread LDFLAGS += -pthread # -fsanitize=thread LDLIBS += -lgit2 # -lprofiler -lunwind diff --git a/README.md b/README.md index a6631f63..609d5f82 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # gitstatus +- **THE PROJECT HAS VERY LIMITED SUPPORT** +- **NO NEW FEATURES ARE IN THE WORKS** +- **MOST BUGS WILL GO UNFIXED** + **gitstatus** is a 10x faster alternative to `git status` and `git describe`. Its primary use case is to enable fast git prompt in interactive shells. diff --git a/build b/build index e116abb2..ea96a25a 100755 --- a/build +++ b/build @@ -153,7 +153,16 @@ case "$gitstatus_cpu" in ;; esac -cflags="$archflag=$gitstatus_cpu -fno-plt -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fpie" +case "$gitstatus_arch" in + e2k) + nopltflag="" + ;; + *) + nopltflag="-fno-plt" + ;; +esac + +cflags="$archflag=$gitstatus_cpu $nopltflag -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fpie" ldflags= static_pie= @@ -384,6 +393,7 @@ CFLAGS="$libgit2_cflags" command cmake \ -DUSE_GSSAPI=OFF \ -DUSE_NTLMCLIENT=OFF \ -DBUILD_SHARED_LIBS=OFF \ + -G "Unix Makefiles" \ $libgit2_cmake_flags \ .. command make -j "$cpus" VERBOSE=1 @@ -545,6 +555,7 @@ if [ -z "$gitstatus_cpu" ]; then x86_64|amd64) gitstatus_cpu=x86-64;; x86) gitstatus_cpu=i586;; s390x) gitstatus_cpu=z900;; + e2k) gitstatus_cpu=native;; i386|i586|i686) gitstatus_cpu="$gitstatus_arch";; *) >&2 echo '[error] unable to infer target CPU architecture' diff --git a/build.info b/build.info index 9a4967e8..9bc9411d 100644 --- a/build.info +++ b/build.info @@ -3,7 +3,7 @@ # # This value is also read by shell bindings (indirectly, through # ./install) when using GITSTATUS_DAEMON or usrbin/gitstatusd. -gitstatus_version="v1.5.4" +gitstatus_version="v1.5.5" # libgit2 is a build time dependency of gitstatusd. The values of # libgit2_version and libgit2_sha256 are read by ./build. From 0996a9411824cbfe8fdd8cb17448c94ef891be34 Mon Sep 17 00:00:00 2001 From: Filipe Date: Fri, 4 Oct 2024 20:24:49 +1300 Subject: [PATCH 8/8] Support aws-sso-cli on AWS prompt element (#2769) Adds support for `aws-sso-cli` tool in AWS prompt element. https://github.com/synfinatic/aws-sso-cli Docs: https://synfinatic.github.io/aws-sso-cli/v1.17.0/commands/#managed-variables --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 65d67c13..0942c1c1 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1179,7 +1179,7 @@ function _p9k_parse_aws_config() { ################################################################ # AWS Profile prompt_aws() { - typeset -g P9K_AWS_PROFILE="${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}" + typeset -g P9K_AWS_PROFILE="${AWS_SSO_PROFILE:-${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}}" local pat class state for pat class in "${_POWERLEVEL9K_AWS_CLASSES[@]}"; do if [[ $P9K_AWS_PROFILE == ${~pat} ]]; then