PS1 only outputs the PS1 string not proper values

147 Views Asked by At

I'm using iTerm2 on MacOS Sierra. I try to edit the PS1 in variable .bash_profile to be PS1="\h:\W \u \$" but in terminal I get the promp \h:\W \u \$ instead of Simon:~ simon $

Any ideas why it behaves like this?

1

There are 1 best solutions below

1
On BEST ANSWER

In iTerm2 you can use bash instead of zsh by setting inside profile settings

iTerm2 -> Profiles -> Choose Profile on left -> Command: /bin/bash

enter image description here

Simply tell iTerm2 to use arbitrary Command instead of Login shell.