Last active
July 7, 2021 14:41
-
-
Save kuchida1981/a19966194c99d64be207e56ae9668c1f to your computer and use it in GitHub Desktop.
fish shell 起動時にアップデート可能なパッケージ数を表示
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_greeting -d "What's up, fish?" | |
set_color $fish_color_autosuggestion | |
set new_packages (command checkupdates) | |
set new_packages_count (count $new_packages) | |
if [ $new_packages_count -gt 0 ] | |
if command echo $new_packages | command grep -q "\slinux\s[0-9]"; | |
command echo (count $new_packages) packages can be upgraded. These packages require restarting system. | |
else | |
command echo (count $new_packages) packages can be upgraded. | |
end | |
end | |
set_color normal | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment