diff options
| author | Adrian Kummerlaender | 2015-05-27 15:12:48 +0200 | 
|---|---|---|
| committer | Adrian Kummerlaender | 2015-05-27 15:12:48 +0200 | 
| commit | 7554ce91fcf771041326430c0a224b9e570424a0 (patch) | |
| tree | 343221009c4fbd17f761c8245414874b1ee1a9ba | |
| parent | f733845de850997a1b28ecb011c8374762abecf1 (diff) | |
| download | dotfiles-7554ce91fcf771041326430c0a224b9e570424a0.tar dotfiles-7554ce91fcf771041326430c0a224b9e570424a0.tar.gz dotfiles-7554ce91fcf771041326430c0a224b9e570424a0.tar.bz2 dotfiles-7554ce91fcf771041326430c0a224b9e570424a0.tar.lz dotfiles-7554ce91fcf771041326430c0a224b9e570424a0.tar.xz dotfiles-7554ce91fcf771041326430c0a224b9e570424a0.tar.zst dotfiles-7554ce91fcf771041326430c0a224b9e570424a0.zip | |
Added exit status signaling to custom fish prompt
| -rw-r--r-- | fish/.config/fish/functions/fish_prompt.fish | 12 | 
1 files changed, 11 insertions, 1 deletions
| diff --git a/fish/.config/fish/functions/fish_prompt.fish b/fish/.config/fish/functions/fish_prompt.fish index b21d479..bcf8ef7 100644 --- a/fish/.config/fish/functions/fish_prompt.fish +++ b/fish/.config/fish/functions/fish_prompt.fish @@ -1,4 +1,6 @@  function fish_prompt +	set last_status $status +  	if not set -q __fish_prompt_normal  		set -g __fish_prompt_normal (set_color normal)  	end @@ -19,5 +21,13 @@ function fish_prompt  			end  	end -	echo -n -s 'λ ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" ' ▸ ' +	echo -n -s 'λ ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" + +	if test $last_status -gt 0 +		set_color $fish_color_cwd_root +		echo -n -s ' ▸ ' +		set_color normal +	else +		echo -n -s ' ▸ ' +	end  end | 
