LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-04-2020, 10:53 AM   #1
blueray
Member
 
Registered: Feb 2020
Location: Bangladesh
Distribution: Debian, Ubuntu, Linux Mint
Posts: 136

Rep: Reputation: 2
`set -x` showing lines from zshrc


I am using zsh-git-prompt

When I use set -x to debug a command it output some extra lines.

Code:
% 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
What might be causing it?

I have created an issue but I think something is wrong with my configuration. I am saying this because I am also having the same issue with z.plugin.zsh

Do, anyone have any idea regarding this issue?
 
Old 07-04-2020, 11:07 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
See Hook Functions in zshmisc(1). Particularly, zshrc.sh sets chpwd, precmd, and preexec hooks.

Last edited by shruggy; 07-04-2020 at 11:13 AM.
 
1 members found this post helpful.
Old 07-05-2020, 03:26 AM   #3
blueray
Member
 
Registered: Feb 2020
Location: Bangladesh
Distribution: Debian, Ubuntu, Linux Mint
Posts: 136

Original Poster
Rep: Reputation: 2
I am actually sourcing multiple files to [c].zshrc[/c]. When I use [c]set -x[/c] there is actually at least 200+ lines (not only the lines shown in the question). I did not show the complete picture to keep things simple.

Is there any way I can use the [c]set -x[/c] command so that it will only execute the commands after the prompt.

Or, is there anything I can put in the top of my [c].zshrc[/c] so that it will not be debugged when using [c]set -x[/c].
 
  


Reply

Tags
command line interface


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wlan0 showing in iwconfig and airmon-ng as well, however it isn't showing in ifconfig, but my internet connection works. betweenyouandseb Linux - Newbie 7 08-25-2020 02:38 AM
[SOLVED] My webcamera is showing distorted colours and lines with guvcview. This problem clears up then the lines reappear. LinuxFedora Linux - Newbie 4 06-05-2020 08:17 AM
[SOLVED] broke fpath in global zshrc like100ninjas Linux - Newbie 1 04-25-2015 02:43 AM
[SOLVED] Screen not showing on laptop but showing on projector when connected someshpr Linux - General 3 04-18-2011 04:58 PM
apache logs showing strange "SEARCH /\x90\x02\xb1" lines TheOneAndOnlySM Linux - Software 1 06-28-2004 04:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration