Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
My Bash PS1 line
PS1="\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u.\h: \`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\w"; else echo "\\w"; fi\`]\012\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"
[<username>.<hostname>: <current directory>]
$
@jterrace

This comment has been minimized.

Show comment Hide comment
@jterrace

jterrace Apr 26, 2011

command count?

command count?

@arajek

This comment has been minimized.

Show comment Hide comment
@arajek

arajek Apr 26, 2011

The counter starts at 1000, every time you execute a command it gets bumped up by one. Not sure if I have any real use for it yet.

Owner

arajek commented Apr 26, 2011

The counter starts at 1000, every time you execute a command it gets bumped up by one. Not sure if I have any real use for it yet.

@arajek

This comment has been minimized.

Show comment Hide comment
@arajek

arajek Apr 26, 2011

Also, the entire prompts color is set to green or red depending on the return value of the command you just ran.

Green = good return val
Red = error return val

Owner

arajek commented Apr 26, 2011

Also, the entire prompts color is set to green or red depending on the return value of the command you just ran.

Green = good return val
Red = error return val

@jterrace

This comment has been minimized.

Show comment Hide comment
@jterrace

jterrace Apr 26, 2011

Yeah I'm confused what you would use a command counter for?

Yeah I'm confused what you would use a command counter for?

@arajek

This comment has been minimized.

Show comment Hide comment
@arajek

arajek Apr 26, 2011

@jterrace, you are right, it is a waste of space. Gone

Owner

arajek commented Apr 26, 2011

@jterrace, you are right, it is a waste of space. Gone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment