Skip to content

Instantly share code, notes, and snippets.

@tobijibu
Created February 5, 2017 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobijibu/3c502ad19233efe8303eba2187f2cf85 to your computer and use it in GitHub Desktop.
Save tobijibu/3c502ad19233efe8303eba2187f2cf85 to your computer and use it in GitHub Desktop.
PROMPT=$'[%{$fg[yellow]%}%*%{$reset_color%}]:%{$fg[green]%}%~%{$reset_color%}
`command_status_check $?`:$ '
RPROMPT=$'%~'
function command_status_check {
local color kao suffix
suffix='%{'${reset_color}'%}'
if [ $1 = 0 ]
then
color='%{'${fg[cyan]}'%}'
kao="(*'-')"
else
color='%{'${fg[magenta]}'%}'
kao="(*-~-)"
fi
echo ${color}${kao}${suffix}
}
function command_not_found_handler {
echo "${fg[blue]}(*'-\`)$reset_color ${fg[red]}$0$reset_color なんて知らないよ〜"
return 127
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment