Remove prompt examples I'll never use.
This commit is contained in:
parent
53081b6917
commit
a5d8f0f7fb
1 changed files with 2 additions and 14 deletions
16
.bashrc
16
.bashrc
|
|
@ -150,6 +150,8 @@ __write_ssh_agents() {
|
||||||
}
|
}
|
||||||
|
|
||||||
__ssh_agent_prompt_command() {
|
__ssh_agent_prompt_command() {
|
||||||
|
# Returns: 0 = All is good.
|
||||||
|
# 1 = And error occured.
|
||||||
local ERR SSH_AUTH_SOCKS=()
|
local ERR SSH_AUTH_SOCKS=()
|
||||||
|
|
||||||
if [[ -z "$SSH_AUTH_SOCK" ]]; then
|
if [[ -z "$SSH_AUTH_SOCK" ]]; then
|
||||||
|
|
@ -221,30 +223,16 @@ if (( BASH_VERSINFO[0] >= 4 )); then
|
||||||
|
|
||||||
# Set the prompts.
|
# Set the prompts.
|
||||||
PROMPT_DIRTRIM=2
|
PROMPT_DIRTRIM=2
|
||||||
# No colour:
|
|
||||||
# PS1="[\u@\h] \w ->"
|
|
||||||
# Coloured username:
|
|
||||||
# PS1="[\[$(tput bold)$(tput setaf $COLOUR)\]\u\[$(tput sgr0)\]@\h] \w ->"
|
|
||||||
# Coloured username + host:
|
|
||||||
# PS1="[\[$(tput bold)$(tput setaf $COLOUR)\]\u\[$(tput sgr0)\]@\[$(tput bold)$(tput setaf 3)\]\h\[$(tput sgr0)\]] \w ->"
|
|
||||||
# Coloured username + host + directory:
|
# Coloured username + host + directory:
|
||||||
PS1="[\[$(tput bold)$(tput setaf $COLOUR)\]\u\[$(tput sgr0)\]@\[$(tput bold)$(tput setaf 3)\]\h\[$(tput sgr0)\]] \[$(tput bold)$(tput setaf 4)\]\w\[$(tput sgr0)\] ->"
|
PS1="[\[$(tput bold)$(tput setaf $COLOUR)\]\u\[$(tput sgr0)\]@\[$(tput bold)$(tput setaf 3)\]\h\[$(tput sgr0)\]] \[$(tput bold)$(tput setaf 4)\]\w\[$(tput sgr0)\] ->"
|
||||||
else
|
else
|
||||||
# Set the prompts.
|
# Set the prompts.
|
||||||
# No colour:
|
|
||||||
# PS1="[\u@\h] \$(echo \"\${PWD/#\$HOME/~}\" | awk -F/ '{if (NF>3) {printf \".../\" \$(NF-1) \"/\" \$NF} else {printf \$0}}') ->"
|
|
||||||
# Coloured username:
|
|
||||||
# PS1="[\[$(tput bold)$(tput setaf $COLOUR)\]\u\[$(tput sgr0)\]@\h] \$(echo \"\${PWD/#\$HOME/~}\" | awk -F/ '{if (NF>3) {printf \".../\" \$(NF-1) \"/\" \$NF} else {printf \$0}}') ->"
|
|
||||||
# Coloured username + host:
|
|
||||||
# PS1="[\[$(tput bold)$(tput setaf $COLOUR)\]\u\[$(tput sgr0)\]@\[$(tput bold)$(tput setaf 3)\]\h\[$(tput sgr0)\]] \$(echo \"\${PWD/#\$HOME/~}\" | awk -F/ '{if (NF>3) {printf \".../\" \$(NF-1) \"/\" \$NF} else {printf \$0}}') ->"
|
|
||||||
# Coloured username + host + directory:
|
# Coloured username + host + directory:
|
||||||
PS1="[\[$(tput bold)$(tput setaf $COLOUR)\]\u\[$(tput sgr0)\]@\[$(tput bold)$(tput setaf 3)\]\h\[$(tput sgr0)\]] \[$(tput bold)$(tput setaf 4)\]\$(echo \"\${PWD/#\$HOME/~}\" | awk -F/ '{if (NF>3) {printf \".../\" \$(NF-1) \"/\" \$NF} else {printf \$0}}')\[$(tput sgr0)\] ->"
|
PS1="[\[$(tput bold)$(tput setaf $COLOUR)\]\u\[$(tput sgr0)\]@\[$(tput bold)$(tput setaf 3)\]\h\[$(tput sgr0)\]] \[$(tput bold)$(tput setaf 4)\]\$(echo \"\${PWD/#\$HOME/~}\" | awk -F/ '{if (NF>3) {printf \".../\" \$(NF-1) \"/\" \$NF} else {printf \$0}}')\[$(tput sgr0)\] ->"
|
||||||
fi
|
fi
|
||||||
unset COLOUR
|
unset COLOUR
|
||||||
|
|
||||||
# Set the debugger prompt.
|
# Set the debugger prompt.
|
||||||
# PS4="+(\\\$? = \$?) \${BASH_SOURCE##*/}\${FUNCNAME[0]:+(\${FUNCNAME[0]})}:\$LINENO: "
|
|
||||||
# PS4="+(\[\e[1;33;40m\]\\\$? = \$?\[$(tput sgr0)\]) \[$(tput bold)$(tput setaf 4)\]\${BASH_SOURCE##*/}\[$(tput sgr0)\]\${FUNCNAME[0]:+(\[$(tput bold)$(tput setaf 2)\]\${FUNCNAME[0]}\[$(tput sgr0)\])}:\[$(tput bold)$(tput setaf 1)\]\$LINENO\[$(tput sgr0)\]: "
|
|
||||||
export PS4="+(\[\e[1;33;40m\]\$?\[$(tput sgr0)\]) \[$(tput bold)$(tput setaf 4)\]\${BASH_SOURCE##*/}\[$(tput sgr0)\]\${FUNCNAME[0]:+(\[$(tput bold)$(tput setaf 2)\]\${FUNCNAME[0]}\[$(tput sgr0)\])}:\[$(tput bold)$(tput setaf 1)\]\$LINENO\[$(tput sgr0)\]: "
|
export PS4="+(\[\e[1;33;40m\]\$?\[$(tput sgr0)\]) \[$(tput bold)$(tput setaf 4)\]\${BASH_SOURCE##*/}\[$(tput sgr0)\]\${FUNCNAME[0]:+(\[$(tput bold)$(tput setaf 2)\]\${FUNCNAME[0]}\[$(tput sgr0)\])}:\[$(tput bold)$(tput setaf 1)\]\$LINENO\[$(tput sgr0)\]: "
|
||||||
|
|
||||||
# The commands to execute before the prompt is displayed.
|
# The commands to execute before the prompt is displayed.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue