mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Fix acpi check in nim prompt
This commit is contained in:
parent
de0349399c
commit
dedc7f6f03
1 changed files with 1 additions and 10 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue