0

I have installed oh-my-zsh this morning and now command line is too long, it looks something like this:

my-username@my-pc-name ~/Desktop/

I would like to change "my-username@my-pcname ~" part just to "~".

I have done it on my Linux Mint but can't make it work here. I have edited my .bashrc file (following this instructions) but changes wont take effect.

1

3 Answers 3

1

Okey i just realized that editing .bashrc file was bad idea, i c/p .zshrc file from Mint and it works like charm.

Here you can find pastebin of file if someone is interested.

0

You need to customize your bash prompt by editing PS1 variable. Follow this link

THis is how mine looks like

Thu Mar 31 02:04 PM asiri:~$

Releated ps1 is

PS1='${debian_chroot:+($debian_chroot)}\d \@ \u:\W\$ '
0

add this to ~/.zshrc

prompt_dir() {
  prompt_segment yellow $CURRENT_FG '%2~'
}
1
  • 1
    Your participation is much appreciated👍 Let me inform you that we love informative answers with step by step guide. Please try to post detailed information so that it is simple enough for someone with zero technical knowledge to easily understand.
    – Hasan
    Commented Sep 5, 2020 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.