Sample Header Ad - 728x90

`set -x` debugging my `.zshrc`

8 votes
3 answers
8566 views
When I use set -x to debug a command it output some extra lines. % set -x +precmd_update_git_vars:1> [ -n '' ']' +precmd_update_git_vars:1> [ '!' -n '' ']' +precmd_update_git_vars:2> update_current_git_vars +update_current_git_vars:1> unset __CURRENT_GIT_STATUS +update_current_git_vars:3> [[ python == python ]] +update_current_git_vars:4> _GIT_STATUS=+update_current_git_vars:4> python /home/ismail/zshfiles/gitstatus.py +update_current_git_vars:4> _GIT_STATUS='' +update_current_git_vars:6> __CURRENT_GIT_STATUS=( '' ) +update_current_git_vars:7> GIT_BRANCH='' +update_current_git_vars:8> GIT_AHEAD='' +update_current_git_vars:9> GIT_BEHIND='' +update_current_git_vars:10> GIT_STAGED='' +update_current_git_vars:11> GIT_CONFLICTS='' +update_current_git_vars:12> GIT_CHANGED='' +update_current_git_vars:13> GIT_UNTRACKED='' +precmd_update_git_vars:3> unset __EXECUTED_GIT_COMMAND I can't debug my commands because of these outputs. Why is set -x debugging my .zshrc? I want set -x to debug only the lines followed by set -x.
Asked by Ahmad Ismail (2998 rep)
Jul 4, 2020, 04:29 PM
Last activity: Feb 1, 2023, 01:54 AM