From dc5c10b7dd401057895054de45ed5bf9623b4ba8 Mon Sep 17 00:00:00 2001 From: Sparkway <84066435+Sparkway@users.noreply.github.com> Date: Sun, 17 Mar 2024 11:22:21 +0100 Subject: [PATCH 1/2] Add the `-l/--list` option to shell completions (#127) * Add -l/--list to bash completion * Add -l/--list to fish completion * Add -l/--list to zsh completion --- res/completions/arch-update.bash | 1 + res/completions/arch-update.fish | 1 + res/completions/arch-update.zsh | 1 + 3 files changed, 3 insertions(+) diff --git a/res/completions/arch-update.bash b/res/completions/arch-update.bash index 812d63d..d8ba7c8 100644 --- a/res/completions/arch-update.bash +++ b/res/completions/arch-update.bash @@ -2,6 +2,7 @@ _arch-update() { local arg="${2}" local -a opts opts=('-c --check + -l --list -n --news -h --help -V --version') diff --git a/res/completions/arch-update.fish b/res/completions/arch-update.fish index 2aba1dd..1e67bdc 100644 --- a/res/completions/arch-update.fish +++ b/res/completions/arch-update.fish @@ -1,6 +1,7 @@ complete -c arch-update -f complete -c arch-update -s c -l check -d 'Check for available updates' +complete -c arch-update -s l -l list -d 'Display the list of pending updates' complete -c arch-update -s n -l news -d 'Display latest Arch news' complete -c arch-update -s h -l help -d 'Display the help message' complete -c arch-update -s V -l version -d 'Display version information' diff --git a/res/completions/arch-update.zsh b/res/completions/arch-update.zsh index f7df2c4..69d264a 100644 --- a/res/completions/arch-update.zsh +++ b/res/completions/arch-update.zsh @@ -3,6 +3,7 @@ local -a opts opts=( {-c,--check}'[Check for available updates]' + {-l,--list}'[Display the list of pending updates]' {-n,--news}'[Display latest Arch news]' {-h,--help}'[Display the help message]' {-V,--version}'[Display version information]' From e67e6c135dcdc05e66d60fbbe33a631bb4ee9242 Mon Sep 17 00:00:00 2001 From: Robin Candau <53110319+Antiz96@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:17:47 +0000 Subject: [PATCH 2/2] Fix a small typo in the main script (#128) --- src/script/arch-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/arch-update.sh b/src/script/arch-update.sh index 52ac773..4d6f45d 100755 --- a/src/script/arch-update.sh +++ b/src/script/arch-update.sh @@ -105,7 +105,7 @@ quit_msg() { read -n 1 -r -s -p $"$(info_msg "${msg}")" && echo } -# Definition of the evelation method to use (depending on which one is installed on the system) +# Definition of the elevation method to use (depending on which one is installed on the system) if command -v sudo > /dev/null; then su_cmd="sudo" elif command -v doas > /dev/null; then