Last active
December 23, 2023 14:29
-
-
Save kuchida1981/ceeca4a982270a06a64c368a664b80a2 to your computer and use it in GitHub Desktop.
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 checkupdates --description 'alias checkupdates=checkupdates' | |
argparse -i --name=checkupdates 'h/help' 'j/json' -- $argv | |
or return 1 | |
function _show_usage | |
command checkupdates --help | sed "s/^checkupdates.*\$/& + custom/" | grep -v "nosync" | |
echo ' | |
Extra Options: | |
-j, --json json output' | |
functions -e _show_usage | |
return 0 | |
end | |
if set -lq _flag_help | |
_show_usage | |
return 0 | |
end | |
if set -lq _flag_json | |
begin | |
echo "package current __symbol new" | |
command checkupdates -n $argv | |
end | jc --csv | jq -c 'del(.[].__symbol)' | |
else | |
command checkupdates -n $argv | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment