Skip to content

Commit

Permalink
Add Android icon
Browse files Browse the repository at this point in the history
  • Loading branch information
jose1711 committed Apr 22, 2022
1 parent fd7f542 commit 80e1a60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion functions/_tide_detect_os.fish
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ function _tide_detect_os
case freebsd openbsd dragonfly
printf %s\n  FFFFFF AB2B28 # https://freebsdfoundation.org/about-us/about-the-foundation/project/
case linux
_tide_detect_os_linux_cases /etc/os-release ID ||
# android logo from https://developer.android.com/distribute/marketing-tools/brand-guidelines
uname -o | string match -eq Android && printf %s\n  3DDC84 FFFFFF ||
_tide_detect_os_linux_cases /etc/os-release ID ||
_tide_detect_os_linux_cases /etc/os-release ID_LIKE ||
_tide_detect_os_linux_cases /etc/lsb-release DISTRIB_ID ||
printf %s\n$defaultColor
Expand Down
7 changes: 7 additions & 0 deletions tests/detect_os/_tide_detect_os.test.fish
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ _tide_detect_os
# CHECK: D6D6D6
# CHECK: 333333

mock uname -o "echo Android"
mock uname \* "echo Linux"
_tide_detect_os
# CHECK: 
# CHECK: 3DDC84
# CHECK: FFFFFF

function _detect_os_linux_cases -a file
set -l dir (status dirname)
_tide_detect_os_linux_cases $dir/$file ID ||
Expand Down

0 comments on commit 80e1a60

Please # to comment.