Reputation: 549
I'm trying to modify my bash terminal's appearance, and I've stumbled upon this site: http://osxdaily.com/2013/02/05/improve-terminal-appearance-mac-os-x/. However I want to try to understand the code first before implementing all the changes and I'm currently having trouble understanding this part. So it'll be really nice if someone could explain it to me thoroughly.
Upvotes: 7
Views: 7398
Reputation: 549
export
is used to set environment variable in operating system. This variable will be available to all child processes created by current Bash process ever after.
PS1
is the primary prompt which is displayed before each command, thus it is the one most people customize. read more: https://wiki.archlinux.org/index.php/Bash/Prompt_customization#Prompts
And the statement:
\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$
dictates how the prompt is going to look like i.e
Since, in Bash,
For more about ANSI Escape Codes: https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797
Hence:
Upvotes: 8