Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
5 votes
2 answers
2k views

Is there a command to get bash to print a new prompt string and redraw the current line?

Instead of waiting for slow commands to finish, I'd like to run them in the background. However, when they finish running and print to stdout, I get (where █ represents my cursor) this: $ slowcmd &...
Ari Sweedler's user avatar
0 votes
1 answer
178 views

How can I style the command being entered in a bash prompt?

While watching this intro video to Brunch, at about t=1:30 the command prompt being used has some very cool styles. The part I'm interested in is how the presenter managed to colour the text being ...
Mark McDonald's user avatar
2 votes
1 answer
944 views

How can I set `less` or `more` max lines (scrollable height) limit/boundary in linux?

(Sorry for the title. Any suggestions?) I've set my commandline PS1 to cover 3 lines: white space user, server and pwd $ or # to input I think less (or more?) is configured to break after window's ...
Rudie's user avatar
  • 759
4 votes
3 answers
868 views

Make Bash's PS1 show original directory name and not symlink?

I currently have PS1='\W' but when in a symbolic link'd directory, the prompt shows the symlink name, how can I make PS1 to show the original directory name?
Petruza's user avatar
  • 3,883
1 vote
1 answer
376 views

PS1 problem, cmd is looping [duplicate]

I've set PS1 to the following value: PS1="\033[0;37m[\033[1;33m\w\033[0;37m]\n\t \[[34m\]\u\033[0;37m@\[[34m\]\[[1m\]\h\[(B[m\] $" The problem is that any command spanning more than a line loops ...
Runar's user avatar
  • 55
5 votes
2 answers
6k views

How can I change my prompt to include box drawing Unicode characters?

How can I get a $PS1 containing box-drawing characters? I am running bash, if it makes a difference.
Wuffers's user avatar
  • 19.3k
28 votes
9 answers
35k views

Right align part of prompt

I am sure that I have seen someone have a part of their prompt aligned to the right in their terminal window and then have the actual cursor start on a second line. I know that I can achieve the ...
Felix Andersen's user avatar