A string of characters displayed by interactive shells to signal the shell is waiting a user input. The prompt can be used to display variables and data about the enviornment.

learn more… | top users | synonyms

7
votes
4answers
628 views

Changing the bash prompt

Where is the setting that determines what the bash prompt looks like? Specifically on Arch, but I'm sure others would like to know for other distros too if it's different. Speficially I'd like to use ...
7
votes
3answers
1k views

Change the PS1 color based on the background color?

I learned that I can change the format of PS1, especially the color of the string. Then, is it possible to change the color based on the background color of the shell? Or, how can I detect the ...
6
votes
3answers
968 views

bash PS1 setup

I'm trying to make PS1 configured as follows. Green="\[\e[32;1m\]" Red="\e[0;31m" Purple="\e[0;35m" STARTCOLOR="\[\e[40m\]" ENDCOLOR="\[\e[0m\]" export PS1="$STARTCOLOR$Green\u@$Purple\h ...
3
votes
2answers
3k views

change prompt color depending on user or root in zsh

in zsh you can have a %# in your PS1 (or whatever PROMPT variable) which basically means display % if user or display # if root. I'm wondering if there is any way to affect this so that the % or # ...
2
votes
1answer
292 views

vi mode doesn't display correctly on new term

This is a continuation of my previous questions. I currently have the following in ~/.zsh.d/functions.sh function zle-line-init zle-keymap-select { psvar[1]="${${KEYMAP/vicmd/}/(main|viins)/-- ...
3
votes
3answers
740 views

Is there a way to make the prompt definition multiline?

This is my current prompt definition: PS1=$'%F{063}%1~%f %(1v.%F{099}%1v %f.)%F{063}%%%f ' RPROMPT='$VIMODE %m' and I'm working on integrating this. Basically I'm starting to find it very ...
18
votes
2answers
2k views

Display stuff below the prompt at a shell prompt?

Lets's say my prompt looks like this (the _ represents my cursor) ~ % _ Is there any way I could make it look like this ~ % _ [some status] The question was originally about zsh, but now has ...
16
votes
3answers
5k views

make my zsh prompt show mode in vi mode

I use bindkey -v (for bash-ers set -o vi I think that works in zsh too) or vi(m) mode. but it bugs me that I don't have any visual cue to tell me whether I'm in insert mode or command mode. Does ...
71
votes
8answers
68k views

Colorizing your terminal and shell environment?

I spend most of my time working in Unix environments and using terminal emulators. I try to use color on the command-lin, because color makes the output more useful and intuitive. What are some good ...