PS1='\033]2;\u@\h:\w\007\[\e[1;7;34m\][\D{%Y%m%d_%H%M%S}]\u@\h:\w\n\$\[\e[0m\] '
PS1='\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0;1;4;32m \u@\h(\e[36m'`arch`'\e[32m): \e[33m\w\e[0m\n$ '
PS1='\e];\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0;1;4;32m \u@\h(\e[36m'`arch`'\e[32m): \e[33m\w\e[0m\n$ '
PS1='\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0;1;4;32m \u@\h(\e[36m'`arch`'\e[32m): \e[33m\w\e[0m\n$ '
PS1='\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0;1;4;32m \u@\h(\e[36mx86_64\e[32m): \e[33m\w\e[0m$(__git_ps1 "\n(%s)")\n$ 'GIT_PS1_SHOWCOLORHINTS 有効にする場合は以下のようにしたほうがよさそう
function gen_ps1 () { __git_ps1 '\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0;1;4;32m \u@\h(\e[36mx86_64\e[32m): \e[33m\w\e[0m' '\n$ ' '\n(%s)' } PROMPT_COMMAND=gen_ps1 GIT_PS1_DESCRIBE_STYLE=default GIT_PS1_SHOWCOLORHINTS=1 GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1 GIT_PS1_SHOWUPSTREAM=auto # GIT_PS1_DESCRIBE_STYLE # GIT_PS1_HIDE_IF_PWD_IGNORED
function ps1 () { if [ -n "$PROMPT_COMMAND" ]; then unset PROMPT_COMMAND PS1='\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0;1;4;32m \u@\h(\e[36m'`arch`'\e[32m): \e[33m\w\e[0m\n$ ' else PROMPT_COMMAND=gen_ps1 fi }要 git-prompt.sh
PS1='\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0;1;4;32m \u@\h(\e[36m'`arch`'\e[32m): \e[33m\w\e[0m$(__git_ps1 "\n(%s)")\n$ 'GIT_PS1_SHOWCOLORHINTS 有効にする場合は以下
function ps1 () { if [ -n "$PROMPT_COMMAND" ]; then unset PROMPT_COMMAND PS1='\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0;1;4;32m \u@\h(\e[36m'`arch`'\e[32m): \e[33m\w\e[0m\n$ ' else PROMPT_COMMAND=gen_ps1 fi } function gen_ps1 () { __git_ps1 '\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0;1;4;32m \u@\h(\e[36m'`arch`'\e[32m): \e[33m\w\e[0m' '\n$ ' '\n(%s)' } PROMPT_COMMAND=gen_ps1 # ps1 GIT_PS1_DESCRIBE_STYLE=default GIT_PS1_SHOWCOLORHINTS=1 GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1 GIT_PS1_SHOWUPSTREAM=auto # GIT_PS1_DESCRIBE_STYLE # GIT_PS1_HIDE_IF_PWD_IGNORED要 git-prompt.sh
function ps1 () { if [ -n "$PROMPT_COMMAND" ]; then unset PROMPT_COMMAND PS1='\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0m\e[1;4;32m \u@\h(\e[36m'`arch`'\e[32m): \e[33m\w\e[0m\n$ ' else PROMPT_COMMAND=gen_ps1 fi } function gen_ps1 () { __git_ps1 '\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0m\e[1;4;32m \u@\h(\e[36m'`arch`'\e[32m): \e[33m\w\e[0m' '\n$ ' '\n(%s) $(git config --get user.name) <$(git config --get user.email)>' } PROMPT_COMMAND=gen_ps1 # ps1 GIT_PS1_DESCRIBE_STYLE=default GIT_PS1_SHOWCOLORHINTS=1 GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1 GIT_PS1_SHOWUPSTREAM=auto # GIT_PS1_DESCRIBE_STYLE # GIT_PS1_HIDE_IF_PWD_IGNORED要 git-prompt.sh
function ps1 () { if [ -n "$PROMPT_COMMAND" ]; then unset PROMPT_COMMAND PS1='\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0m\e[1;4;32m \u@\h(\e[36m'`arch`'\e[32m): \e[33m\w\e[0m\n$ ' else PROMPT_COMMAND=gen_ps1 fi } function gen_ps1 () { __git_ps1 '\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0m\e[1;4;32m \u@\h(\e[36m'`arch`'\e[32m): \e[33m\w\e[0m' '\n$ ' '\n(%s) $(git config --get user.name) <$(git config --get user.email)>' } PROMPT_COMMAND=gen_ps1 # ps1 GIT_PS1_DESCRIBE_STYLE=default GIT_PS1_SHOWCOLORHINTS=1 GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1 GIT_PS1_SHOWUPSTREAM=auto # GIT_PS1_DESCRIBE_STYLE # GIT_PS1_HIDE_IF_PWD_IGNORED要 git-prompt.sh
function ps1 () # [-g|-n|-p] # Change PS1. # Default bahavior is toggle on/off git info. # Options: # -g : with git info # -n : without git info # -p : plain { local mode if [ -n "$1" ]; then case "$1" in -g) mode=git ;; -n) mode=nogit ;; -p) mode=plain ;; *) echo "Error: unknown option: $1"; return 1 ;; esac fi if [ -z "$mode" ]; then if [ -n "$PROMPT_COMMAND" ]; then mode=nogit else mode=git fi fi case "$mode" in plain) unset PROMPT_COMMAND PS1='\e]0;'"${SHELL##*/}"'\a\$ ' ;; nogit) unset PROMPT_COMMAND : ${PS1_ARCH:=`arch`} PS1='\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0m\e[1;4;32m \u@\h(\e[36m'"$PS1_ARCH"'\e[32m): \e[33m\w\e[0m\n\$ ' ;; git) PROMPT_COMMAND=gen_ps1 ;; esac } function gen_ps1 () { : ${PS1_ARCH:=`arch`} __git_ps1 '\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0m\e[1;4;32m \u@\h(\e[36m'"$PS1_ARCH"'\e[32m): \e[33m\w\e[0m' '\n\$ ' '\n(%s) $(git config --get user.name) <$(git config --get user.email)>' } ps1 -g要 git-prompt.sh
function ps1 () # [-g|-n|-p] # Change PS1. # Default bahavior is toggle on/off git info. # Options: # -g : with git info # -n : without git info # -p : plain { local mode if [ -n "$1" ]; then case "$1" in -g) mode=git ;; -n) mode=nogit ;; -p) mode=plain ;; *) echo "Error: unknown option: $1"; return 1 ;; esac fi if [ -z "$mode" ]; then if [ -n "$PROMPT_COMMAND" ]; then mode=nogit else mode=git fi fi case "$mode" in plain) unset PROMPT_COMMAND PS1='\[\e]0;'"${SHELL##*/}"'\a\]\$ ' ;; nogit) unset PROMPT_COMMAND : ${PS1_ARCH:=`arch`} PS1='\[\e]0;\u@\h: \w\a\]\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0m\e[1;4;32m \u@\h(\e[36m'"$PS1_ARCH"'\e[32m): \e[33m\w\e[0m\n\$ ' ;; git) PROMPT_COMMAND=gen_ps1 ;; esac } function gen_ps1 () { : ${PS1_ARCH:=`arch`} __git_ps1 '\[\e]0;\u@\h: \w\a\]\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0m\e[1;4;32m \u@\h(\e[36m'"$PS1_ARCH"'\e[32m): \e[33m\w\e[0m' '\n\$ ' '\n(%s) $(git config --get user.name) <$(git config --get user.email)>' } ps1 -g要 git-prompt.sh
function ps1 () # [-g|-n|-p] # Change PS1. # Default bahavior is toggle on/off git info. # Options: # -g : with git info # -n : without git info # -p : plain { : ${PS1_ARCH:=`arch`} PS1_PRE='\e]0;\u@\h: \w\a\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0m\e[1;4;32m \u@\h(\e[36m'"$PS1_ARCH"'\e[32m): \e[33m\w\e[0m' PS1_POST='\n\$ ' local mode if [ -n "$1" ]; then case "$1" in -g) mode=git ;; -n) mode=nogit ;; -p) mode=plain ;; *) echo "Error: unknown option: $1"; return 1 ;; esac fi if [ -z "$mode" ]; then if [ -n "$PROMPT_COMMAND" ]; then mode=nogit else mode=git fi fi unset PROMPT_COMMAND case "$mode" in plain) PS1='\[\e]0;'"${SHELL##*/}"'\a\]\$ ' ;; nogit) PS1="$PS1_PRE$PS1_POST" ;; git) PROMPT_COMMAND=gen_ps1 ;; esac } function gen_ps1 () { [ -d .git ] || { PS1="$PS1_PRE$PS1_POST"; return; } __git_ps1 "$PS1_PRE" "$PS1_POST" '\n(%s) $(git config --get user.name) <$(git config --get user.email)>' } ps1 -g要 git-prompt.sh
function ps1 () # [-g|-n|-p] # Change PS1. # Default bahavior is toggle on/off git info. # Options: # -g : with git info # -n : without git info # -p : plain { : ${PS1_ARCH:=`arch`} PS1_PRE='\[\e]0;\u@\h: \w\a\]\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0m\e[1;4;32m \u@\h(\e[36m'"$PS1_ARCH"'\e[32m): \e[33m\w\e[0m' PS1_POST='\n\$ ' local mode if [ -n "$1" ]; then case "$1" in -g) mode=git ;; -n) mode=nogit ;; -p) mode=plain ;; *) echo "Error: unknown option: $1"; return 1 ;; esac fi if [ -z "$mode" ]; then if [ -n "$PROMPT_COMMAND" ]; then mode=nogit else mode=git fi fi unset PROMPT_COMMAND case "$mode" in plain) PS1='\[\e]0;'"${SHELL##*/}"'\a\]\$ ' ;; nogit) PS1="$PS1_PRE$PS1_POST" ;; git) PROMPT_COMMAND=gen_ps1 ;; esac } function gen_ps1 () { [ -d .git ] || { PS1="$PS1_PRE$PS1_POST"; return; } __git_ps1 "$PS1_PRE" "$PS1_POST" '\n(%s) $(git config --get user.name) <$(git config --get user.email)>' } ps1 -g要 git-prompt.sh
function ps1 () # [-g|-n|-p|-s] # Change PS1. # Default bahavior is toggle on/off git info. # Options: # -g : with git info # -n : without git info # -p : plain # -s : system { : ${PS1_ARCH:=`arch`} PS1_PRE='\[\e]0;\u@\h: \w\a\]\e[1;7;31m[\D{%Y%m%d_%H%M%S}]\e[0m\e[1;4;32m \u@\h(\e[36m'"$PS1_ARCH"'\e[32m): \e[33m\w\e[0m' PS1_POST='\n\$ ' local mode if [ -n "$1" ]; then case "$1" in -g) mode=git ;; -n) mode=nogit ;; -p) mode=plain ;; -s) mode=system ;; *) echo "Error: unknown option: $1"; return 1 ;; esac fi if [ -z "$mode" ]; then if [ -n "$PROMPT_COMMAND" ]; then mode=nogit else mode=git fi fi unset PROMPT_COMMAND case "$mode" in nogit) PS1="$PS1_PRE$PS1_POST" ;; git) PROMPT_COMMAND=gen_ps1 ;; plain) PS1='\[\e]0;'"${SHELL##*/}"'\a\]\$ ' ;; system) PS1="$PS1_SYSTEM" ;; esac } function gen_ps1 () { [ -d .git ] || { PS1="$PS1_PRE$PS1_POST"; return; } __git_ps1 "$PS1_PRE" "$PS1_POST" '\n(%s) $(git config --get user.name) <$(git config --get user.email)>' } [ -z "$PS1_SYSTEM" ] && PS1_SYSTEM="$PS1" ps1 -g要 git-prompt.sh
set prompt="%{\e[01;37;45m%}[%Y%W%D_%P|\!]%n@%m:%c%{\e[0m%} \n%{\e[01;37;45m%}%#%{\e[0m%} "2014-07-09: FreeBSD 用
set promptchars="%#" set prompt="%{\e[1;7;31m%}[%Y-%W-%D %P]%{\e[0;1;4;32m%} %n@%m%{\(\e[36m`uname -m`%}%{\e[32m\)%}: %{\e[33m%}%~\n%{\e[0m%}%# "参考: