2

I have my terminal set up to show the directory path:

enter image description here

However it only does this for the current command. Once I run another command the previous directory path isnt shown:

enter image description here

I find this quite jarring when Im entering commands, it feels like the terminal is "jumping" to me. I also cant see the timestamp for the previous commands. Is it possible to make the path stay shown for previous commands?

Im using Oh My Zsh and iTerm 2

0

4 Answers 4

1
+300

This seems quite confusing a anyway I answered what I understood.

To add a timestamp on EVERY command.

Add this at your .zshrc: To show time in 24-hours format: export RPROMPT="%S%F{blue}%T%f%s"
Add this at your .zshrc: To show time in 12-hours (AM/PM) format: export RPROMPT="%S%F{blue}%t%f%s"
(The change is capital T and small t.)

To show working directory EVERYTIME.

Add this at your .zshrc:
export PROMPT="%S%F{blue}%~%f%s %F{green}>%f"



Hope This helped!

0

Given the actual theme you use is the Powerlevel10k addon (which is not part of Oh-My-Zsh), you should have a .p10k.zsh which stores your settings. Search the TRANSIENT word and replace the value. You should read :

typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off
4
  • 1
    This looks like a response to another answer. The site is not a forum, answers do not form a well-defined thread, their sequence is not fixed. The OP is not the only person who will read your answer; in the future users with similar problems may come. Please consider these facts and if you really need to refer to another answer then link to it. Commented Nov 2, 2021 at 21:28
  • The question was not written accurately. The issue dealt with a specific addon theme (power10k) used by the OP which is not part of Oh My Zsh. Then it is hard to answer the OP, resolving his issue and make abstraction of the actual reason he had an issue. Did I had to answer : “this is not a Oh My Zsh issue. Period” Commented Nov 2, 2021 at 21:45
  • 1
    I understand. Still with other users in mind you can start with "In your answer (link) you revealed that …". Commented Nov 2, 2021 at 21:48
  • 1
    Answer modified to integrate the added information. Commented Nov 2, 2021 at 21:51
-1

Oh-my-zsh brings zsh a multiple of themes. The behaviour of the theme may depend heavily of the theme. It could help if you indicate which theme you use.

Note : the prompt -c command shows the current prompt theme.

Perhaps you should type prompt -l and select an other prompt theme among the available one.

prompt adam1 will give me a prompt which doesn’t disappear between two commands.

1
  • If I type in 'prompt -c' the result is 'zsh: command not found: prompt', however in my .zshrc file I have: 'ZSH_THEME="powerlevel10k/powerlevel10k"'
    – Evanss
    Commented Nov 1, 2021 at 13:56
-1

As I had installed the Powerlevel10k theme I ran p10k configure to go through the configuration options again: https://github.com/romkatv/powerlevel10k

I'm not totally sure which option changed the behaviour but it may have been setting the prompt style to pure.

2
  • Please edit your post to add details, not answer.....
    – Head
    Commented Nov 3, 2021 at 7:31
  • 1
    The actual option is « transient » you want to be disabled. Commented Nov 3, 2021 at 7:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .