-3

This question might be weird. I am starting to pick up web development again. I am trying to configure my terminal. I used this guide on YouTube. I'm pretty much done and learned a lot about moving around the terminal. Had to troubleshoot a bit.

My terminal now looks like this. I am using iTerm2.

The guide directed me to install oh-my-zsh and I was given a prompt to set the default shell from bash to zsh. I selected yes, since the commands are similar anyways, but then I noticed that the third element in the prompt line says "logout_functionality". After googling, I think the answer is, that is the mode the terminal is in.

Also, this is what my native terminal looks like.

My questions are: Is this correct?

If so, how do I change the mode, or should I just leave it?

Can someone please direct me to a resource to learn more about this specifically. The reason why I need a resource recommendation is because the website that go into this topic are all pretty much very basic like this. It is proving to be difficult to zero-in on the problem too with google because there are so many other topics involving the "logout" and "functionality" keywords. I also an aware of the fact that I may not be formulating the question properly, but I don't know how else to do so. I know I am not understanding a very basic axiom of knowledge, but I don't know what it is.

user1934428
  • 19,864
  • 7
  • 42
  • 87
  • 1
    I'm not familiar, but I wonder. If you write `git status`, what's the output? `logout_functionality` isn't the name of the git branch on which you currently are? Or is it taking the branch name of a repo somewhere (not where you currently are)? – Larme Jun 17 '21 at 20:58
  • How exactly did you define your prompt? It looks like you accidentally hard-coded the branch of a Git repository you had checked out when you defined your prompt, rather than having your prompt query the current Git repo (if any) each time your prompt is displayed. – chepner Jun 17 '21 at 21:02
  • @Larme I searched the output and there are no files with that string in its name. Also, I just realized the third element is a location. I think I connected to git when I was configuring iTerm2 because I had to download open source code off github. – geodudedude Jun 17 '21 at 21:14
  • @chepner I only added 2 things to the .zshrc configuration file. `prompt_context() { if [[ "$USER" == "$DEFAULT_USER" ]]; then prompt_segment black default "%(!.%{%F{yellow}%}.) $USER " else prompt_segment black default "%(!.%{%F{yellow}%}.)$USER" fi } ` and `source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh` – geodudedude Jun 17 '21 at 21:31
  • 1
    @chepner I just ran `git master' and it went back to my old boot camp repo. I remember now that I connected my machine to one during the bootcamp. It was a while ago. I stop because I had medical issues to deal with and you just reminded me of what to think about. Thank you. So it seems like I was in some weird location in my git repo I guess. – geodudedude Jun 17 '21 at 21:40
  • @geodudedude : I edited the tags of your question, in order that they match what you are asking. – user1934428 Jun 18 '21 at 07:25
  • @geodudedude : If you need help with a oh-my-zsh theme, you would need to say at least which theme you are using. It would perhaps (I'm not familiar with oh-my-zsh) help to post the content of your `PROMPT` variable. – user1934428 Jun 18 '21 at 07:27

1 Answers1

0

I noticed that the third element in the prompt line says "logout_functionality". After googling, I think the answer is, that is the mode the terminal is in.

Nope. It's the branch you are on in your Git repo. That's why, on the left of logout_functionality, you see a branch icon or the word git.

Marlon Richert
  • 5,250
  • 1
  • 18
  • 27