0

How can I make an alias along the lines of:

command-line bash bashrc prompt ps1

alias=PS1="\d \h $ "

which, obviously, won't work. Is there some trick to making assignments from the .bash_aliases file?

I also tried:

alias ps='PS1 $(\d \h $)'

1 Answers1

2

Try

alias ps="PS1='\d \h \$ '"
ubfan1
  • 17,838