Difference between revisions of "PS1"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
== Examples == | == Examples == | ||
* <code>PS1='[\u@\h \W]\$ '</code> | * <code>PS1='[\u@\h \W]\$ '</code> | ||
+ | |||
+ | * <code>PS1='[\u@\h \W]\$[[\n]]'</code> | ||
* <code>[[export]] [[PS1]]='[\u@\h $[[AWS_PROFILE]]]\$ '</code> | * <code>[[export]] [[PS1]]='[\u@\h $[[AWS_PROFILE]]]\$ '</code> | ||
Line 15: | Line 17: | ||
* [[PATH]] | * [[PATH]] | ||
* [[PROMPT]] in [[oh-my-zsh]] | * [[PROMPT]] in [[oh-my-zsh]] | ||
− | * [[__git_ps1]] function | + | * <code>[[__git_ps1]] function</code> |
+ | * https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash | ||
== See also == | == See also == |
Latest revision as of 12:09, 14 March 2023
Examples[edit]
PS1='[\u@\h \W]\$ '
PS1='[\u@\h \W]\$\n'
export PS1='[\u@\h $AWS_PROFILE]\$ '
echo $PS1 ${debian_chroot:+($debian_chroot)}\u@\h:\w\$
Related terms[edit]
.bashrc
.bash_profile
- PATH
- PROMPT in oh-my-zsh
__git_ps1 function
- https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash
See also[edit]
- Variables: Environment variables,
env
,env-cmd
,.env/
,SHELL
,PS1, HOME, $?
,PATH
,HISTFILE, PWD, LD_LIBRARY_PATH
,printenv, getenv, getenv, direnv
, AWS cli environmental variables, envsubst,env:, env_file
(docker-compose) Bash [ -c ]
,alias
,&&
, Bash history, Autocompletion,set
,unset
,export
,.bash_aliases, .bashrc and .bash profile
,PS1
,echo
,brace expansion
, Function,shopt
,trap
,set -e
,source
,PATH
,complete
,disown
,.hushlogin
,.bashrc
,builtin
,eval
,set
,$PATH
,$HOME
,TZ
,.profile
,-e, -i
,Builtin (Bash)
,mapfile
,~
, return (Bash), for, until,declare, dirname, basename, functions.sh
, Bash arithmetic expansion,shift, bash --rcfile, readonly, $1, $@
Advertising: