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 $)'
Nicholas Saunders
  • 1,054
  • 4
  • 16
  • 37

1 Answers1

2

Try

alias ps="PS1='\d \h \$ '"
ubfan1
  • 17,041
  • 4
  • 39
  • 47