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 set_color -o green
echo -n ] echo -n ]
# Check if acpi exists if type -q acpi
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 [ (acpi -a 2> /dev/null | grep off) ] if [ (acpi -a 2> /dev/null | grep off) ]
echo -n '─[' echo -n '─['
set_color -o red set_color -o red