LQ Poll: What is your favorite Linux Prompt?
The official LQ poll series continues. This time we want to know: What is your favorite Linux Prompt?
--jeremy |
Whatever pops up when I bash in:
Code:
echo $PS1 Code:
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ Code:
screenfetch |
What exactly do you mean by prompt? For example
Code:
$ Code:
username@computername $ Code:
path/to/directory $ (My choice of the three above would be the last one.) |
Just an indicator so that I can type the next command.... ;)
|
I use a lot of different computers, so I don't really care about it. I use what was configured (by default).
Code:
user@host:path$ |
For me prompt means value of PS1, so guys just post this
Code:
$ echo $PS1 Edit: PS1 is primary prompt. Myself never touched default PS2 and so on, but maybe someone has for some reasons customized also non-primary prompts. If I would be really interesting in reasons. |
All I need is my login name and current working directory plus $ or #. I also like an all-red prompt when I'm root.
|
heh. Jeremy is obviously running out of ideas for polls. ;)
For the most part I just use '\$ ' as a shell prompt. Never been one for all the bling. |
You do need current working directory. It's not just bling. When I was setting up my new Slackware-15, I chrooted across and just happened to be working in the /etc/rc.d directory when I forgot where I was and accidentally deleted all my startup scripts. Not a disaster at that stage, but certainly a nuisance. That was because I had not set up a proper root prompt on the new system and the default prompt just said bash# without any indication of where you were. Believe me, I corrected that before I went any further.
|
Some folks will certainly find that useful. I really dislike it when you're getting deep in the filesystem hierarchy and your prompt is taking up over half the screen width. So, I prefer to just type pwd whenever I get lost, or if I just want to confirm I'm where I think I am. Yep, I'm probably just weird, but it works for me. ;)
|
Quote:
Code:
#!/usr/bin/bash Code:
echo $PS1 |
Quote:
Code:
PROMPT_DIRTRIM=3 |
never knew about PROMPT_DIRTRIM very handy thx, I learnt somthing new, don't you just love linux!
|
login name host and folder green for normal user red for root
|
Is there someone with 2-line or more prompt? I was hesitating about terminal and shell which allow to provide such cool looking prompts. 2-line prompt can be convienient to work with long paths. Say username, hostname, date/time, working directory are on top line while bottom line is for input.
|
All times are GMT -5. The time now is 07:53 AM. |