zsh-users / fizsh

Friendly Interactive ZSHell.
Other
299 stars 18 forks source link

Changing prompt character in fizsh #18

Closed quisys closed 4 years ago

quisys commented 4 years ago

In the ~/.fizsh/fizshrc I have grml_prompt_token_default[percent]='%(#.#.$) ' which changed the prompt character from % to $ on zsh (grml-zsh-config) and all it does in fizsh is is delete the % altogether. I like having the $ there because it reminds me of bash (the shell I used for 5+ years) Is there another way to change it I don't really know where else to talk about fizsh, so if there's a more appropriate place for this kind of thing, please link me!

guidovansteen commented 4 years ago

Fizsh does not have anything to do with "grml". So "grml_prompt_token_default" will not work. Fizsh deals with its prompt in the file "~/.fizsh/fizsh-prompt.zsh". You may replace the contents of that file with:

_fizsh_prompt="\$ " echo $_fizsh_prompt

This should give you $ as your prompt.

BTW echo "\$ " should do the job as well.

And if you want to keep the (abbreviated) path in your prompt, you could turn the following line:

[[ $UID -ne 0 ]] && _fizsh_prompt="%n@%m%F{green} $_fizsh_dyn_pwd[0,-2]%F{reset}> %b%k%f" into [[ $UID -ne 0 ]] && _fizsh_prompt="%n@%m%F{green} $_fizsh_dyn_pwd[0,-2]%F{reset}$ %b%k%f"

guidovansteen commented 4 years ago

P.S. This is the right place to ask questions fizsh.