Fix acpi check in nim prompt

This commit is contained in:
Fabian Homborg 2016-03-20 12:20:39 +01:00
parent de0349399c
commit dedc7f6f03

View file

@ -47,16 +47,7 @@ function fish_prompt
set_color -o green
echo -n ]
# Check if acpi exists
if not set -q __fish_nim_prompt_has_acpi
if type acpi > /dev/null
set -g __fish_nim_prompt_has_acpi ''
else
set -g __fish_nim_prompt_has_acpi '' # empty string
end
end
if test "$__fish_nim_prompt_has_acpi"
if type -q acpi
if [ (acpi -a 2> /dev/null | grep off) ]
echo -n '─['
set_color -o red