romkatv / powerlevel10k

A Zsh theme
MIT License
46.61k stars 2.19k forks source link

every command i do this keeps coming up. why? #1015

Closed ynotoony closed 4 years ago

ynotoony commented 4 years ago

i open terminal / hit enter / do everything, this will print. image

_p9k_worker_receive:16> ((  4 == 4  ))
+_p9k_worker_receive:19> local -i reset max_reset
+_p9k_worker_receive:53> ((  max_reset == 2  ))
+_p9k_worker_receive:58> ((  max_reset  ))
+_p9k_worker_receive:59> return 0
+_p9k_worker_receive:61> ((  0  ))
+_p9k_precmd_impl:142> __p9k_reset_state=0 
+_p9k_precmd:10> trap '_p9k_trapint; return 130' INT
+_p9k_precmd:12> [[ 0 == 0 ]]
+_p9k_precmd:13> setopt no_local_options no_prompt_bang prompt_percent prompt_subst prompt_cr prompt_sp
+_p9k_precmd:16> typeset -g __p9k_trapint='_p9k_trapint; return 130'
+_p9k_precmd:17> trap '_p9k_trapint; return 130' INT
+_p9k_on_expand:1> ((  _p9k__expanded && ! 0  ))
+_p9k_on_expand:3> eval $'emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent\n  (( $+__p9k_trapped )) || { local -i __p9k_trapped; trap : INT; trap "trap ${(q)__p9k_trapint:--} INT" EXIT }\n  local -a match reply mbegin mend\n  local -i MBEGIN MEND OPTIND\n  local MATCH REPLY OPTARG IFS=$\' \\t\\n\\0\''
+(eval):1> emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent
+(eval):2> ((  0  ))
+(eval):2> local -i __p9k_trapped
+(eval):2> trap : INT
+(eval):2> trap 'trap _p9k_trapint\;\ return\ 130 INT' EXIT
+(eval):3> local -a match reply mbegin mend
+(eval):4> local -i MBEGIN MEND OPTIND
+(eval):5> local MATCH REPLY OPTARG IFS=$' \t\n\C-@'
+_p9k_on_expand:5> [[ UTF-8 != (utf|UTF)(-|)8 ]]
+_p9k_on_expand:18> ((  _p9k__expanded && ! 0  ))
+_p9k_on_expand:20> eval '[[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale && { [[ -n $LC_ALL ]] && local LC_ALL=$__p9k_locale || local LC_CTYPE=$__p9k_locale }'
+(eval):1> [[ UTF-8 != (utf|UTF)(-|)8 ]]
+_p9k_on_expand:22> ((  ! _p9k__expanded  ))
+_p9k_on_expand:23> _p9k_should_dump
+_p9k_should_dump:1> ((  __p9k_dumps_enabled && ! _p9k__state_dump_fd  ))
+_p9k_should_dump:2> ((  _p9k__state_dump_scheduled || _p9k__prompt_idx == 1  ))
+_p9k_should_dump:3> _p9k__instant_prompt_sig=/Users/ynotony:0:% 
+_p9k_should_dump:4> ((  ! 1  ))
+_p9k_on_expand:28> ((  ! 1  ))
+_p9k_on_expand:41> __p9k_reset_state=1 
+_p9k_on_expand:43> ((  _POWERLEVEL9K_PROMPT_ADD_NEWLINE  ))
+_p9k_on_expand:56> ((  _POWERLEVEL9K_SHOW_RULER  ))
+_p9k_on_expand:69> ((  _p9k__fully_initialized  ))
+_p9k_on_expand:72> ((  0  ))
+_p9k_on_expand:77> ((  ! _p9k__expanded  ))
+_p9k_on_expand:78> _p9k__expanded=1 
+_p9k_on_expand:80> ((  _p9k__fully_initialized || ! 0  ))
+_p9k_on_expand:82> local pat idx var
+_p9k_on_expand:83> pat=(|*[/? ])(kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile)
+_p9k_on_expand:83> idx=64
+_p9k_on_expand:83> var=_p9k__1rkubecontext
+_p9k_on_expand:84> _p9k_display_segment 64 _p9k__1rkubecontext hide
+_p9k_display_segment:1> [[ hide == hide ]]
+_p9k_display_segment:1> return
+_p9k_on_expand:83> pat=(|*[/? ])(aws|awless|terraform|pulumi|terragrunt)
+_p9k_on_expand:83> idx=68
+_p9k_on_expand:83> var=_p9k__1raws
+_p9k_on_expand:84> _p9k_display_segment 68 _p9k__1raws hide
+_p9k_display_segment:1> [[ hide == hide ]]
+_p9k_display_segment:1> return
+_p9k_on_expand:83> pat=(|*[/? ])(az|terraform|pulumi|terragrunt)
+_p9k_on_expand:83> idx=72
+_p9k_on_expand:83> var=_p9k__1razure
+_p9k_on_expand:84> _p9k_display_segment 72 _p9k__1razure hide
+_p9k_display_segment:1> [[ hide == hide ]]
+_p9k_display_segment:1> return
+_p9k_on_expand:83> pat=(|*[/? ])(gcloud|gcs)
+_p9k_on_expand:83> idx=74
+_p9k_on_expand:83> var=_p9k__1rgcloud
+_p9k_on_expand:84> _p9k_display_segment 74 _p9k__1rgcloud hide
+_p9k_display_segment:1> [[ hide == hide ]]
+_p9k_display_segment:1> return
+_p9k_on_expand:83> pat=(|*[/? ])(terraform|pulumi|terragrunt)
+_p9k_on_expand:83> idx=76
+_p9k_on_expand:83> var=_p9k__1rgoogle_app_cred
+_p9k_on_expand:84> _p9k_display_segment 76 _p9k__1rgoogle_app_cred hide
+_p9k_display_segment:1> [[ hide == hide ]]
+_p9k_display_segment:1> return
+_p9k_on_expand:87> ((  0  ))
+_p9k_on_expand:89> zle
+_p9k_on_expand:105> [[ hide == print ]]
+_p9k_on_expand:108> [[ hide == print ]]
+_p9k_on_expand:120> __p9k_reset_state=0 
+_p9k_on_expand:121> _p9k__fully_initialized=1 
+-zsh:11> trap '_p9k_trapint; return 130' INT
 ~  +_p9k_worker_receive:1> eval $'emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent\n  (( $+__p9k_trapped )) || { local -i __p9k_trapped; trap : INT; trap "trap ${(q)__p9k_trapint:--} INT" EXIT }\n  local -a match reply mbegin mend\n  local -i MBEGIN MEND OPTIND\n  local MATCH REPLY OPTARG IFS=$\' \\t\\n\\0\'; [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale && { [[ -n $LC_ALL ]] && local LC_ALL=$__p9k_locale || local LC_CTYPE=$__p9k_locale }'
+(eval):1> emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent
+(eval):2> ((  0  ))
+(eval):2> local -i __p9k_trapped
+(eval):2> trap : INT
+(eval):2> trap 'trap _p9k_trapint\;\ return\ 130 INT' EXIT
+(eval):3> local -a match reply mbegin mend
+(eval):4> local -i MBEGIN MEND OPTIND
+(eval):5> local MATCH REPLY OPTARG IFS=$' \t\n\C-@'
+(eval):5> [[ UTF-8 != (utf|UTF)(-|)8 ]]
+_p9k_worker_receive:3> [[ -z 16 ]]
+_p9k_worker_receive:6> ((  1 <= 1  ))
+_p9k_worker_receive:8> local buf resp
+_p9k_worker_receive:10> [[ -t 16 ]]
+_p9k_worker_receive:11> sysread -i 16 -t 0 'buf[$#buf+1]'
+_p9k_worker_receive:12> [[ $'\C-E' == *[^]# ]]
+_p9k_worker_receive:19> local -i reset max_reset
+_p9k_worker_receive:53> ((  max_reset == 2  ))
+_p9k_worker_receive:58> ((  max_reset  ))
+_p9k_worker_receive:59> return 0
+_p9k_worker_receive:61> ((  0  ))
+-zsh:1> trap '_p9k_trapint; return 130' INT
+_p9k_worker_receive:1> eval $'emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent\n  (( $+__p9k_trapped )) || { local -i __p9k_trapped; trap : INT; trap "trap ${(q)__p9k_trapint:--} INT" EXIT }\n  local -a match reply mbegin mend\n  local -i MBEGIN MEND OPTIND\n  local MATCH REPLY OPTARG IFS=$\' \\t\\n\\0\'; [[ $langinfo[CODESET] != (utf|UTF)(-|)8 ]] && _p9k_init_locale && { [[ -n $LC_ALL ]] && local LC_ALL=$__p9k_locale || local LC_CTYPE=$__p9k_locale }'
+(eval):1> emulate -L zsh -o no_hist_expand -o extended_glob -o no_prompt_bang -o prompt_percent -o no_prompt_subst -o no_aliases -o no_bg_nice -o typeset_silent
+(eval):2> ((  0  ))
+(eval):2> local -i __p9k_trapped
+(eval):2> trap : INT
+(eval):2> trap 'trap _p9k_trapint\;\ return\ 130 INT' EXIT
+(eval):3> local -a match reply mbegin mend
+(eval):4> local -i MBEGIN MEND OPTIND
+(eval):5> local MATCH REPLY OPTARG IFS=$' \t\n\C-@'
+(eval):5> [[ UTF-8 != (utf|UTF)(-|)8 ]]
+_p9k_worker_receive:3> [[ -z 16 ]]
+_p9k_worker_receive:6> ((  1 <= 1  ))
+_p9k_worker_receive:8> local buf resp
+_p9k_worker_receive:10> [[ -t 16 ]]
+_p9k_worker_receive:11> sysread -i 16 -t 0 'buf[$#buf+1]'
+_p9k_worker_receive:12> [[ $'\C-E' == *[^]# ]]
+_p9k_worker_receive:19> local -i reset max_reset
+_p9k_worker_receive:53> ((  max_reset == 2  ))
+_p9k_worker_receive:58> ((  max_reset  ))
+_p9k_worker_receive:59> return 0
+_p9k_worker_receive:61> ((  0  ))
+-zsh:1> trap '_p9k_trapint; return 130' INT
romkatv commented 4 years ago

If I were to guess:

  1. Because you are running a very old version of powerlevel10k.
  2. Or, because you've modified the source code of powerlevel10k.
  3. Or, because you have setopt xtrace, set -x, or equivalent somewhere in zsh config files.

Am I on the right track? What's the right answer? I'm really curious.

romkatv commented 4 years ago

Closing as non-actionable.

ynotoony commented 4 years ago

The answer is gone now. I delete all config files and even my zsh installation. And start all over again. But guess 3 is most likely. Heres why:

Anyway thanks for your patience. means a lot.

ynotoony commented 4 years ago

I checked again by adding set -x to my zshrc file. That thing happens again. But I cant recall where did I add this.

anamritraj commented 2 years ago

To turn it off just run set +x.

Ref: https://askubuntu.com/a/1167969