Skip to content

Commit

Permalink
Support the --evra option in bash completion
Browse files Browse the repository at this point in the history
  • Loading branch information
suve committed Sep 28, 2022
1 parent beee051 commit 266a74c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/bash-completion.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# bash-completion file for vrms-rpm
# Copyright (C) 2018, 2020 Artur "suve" Iwicki
# Copyright (C) 2018, 2020, 2022 suve (a.k.a. Artur Frenszek-Iwicki)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 3,
Expand All @@ -18,11 +18,11 @@ _vrms_rpm() {

local curr="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
local opts="--ascii --colour --describe --explain --help --image --licence-list --list --version"
local opts="--ascii --colour --describe --evra --explain --help --image --licence-list --list --version"

if [[ "$prev" == "--color" ]] || [[ "$prev" == "--colour" ]]; then
local colourmodes="auto always never"
COMPREPLY=( $(compgen -W "$colourmodes" -- "$curr") )
if [[ "$prev" == "--color" ]] || [[ "$prev" == "--colour" ]] || [[ "$prev" == "--evra" ]]; then
local when="auto always never"
COMPREPLY=( $(compgen -W "$when" -- "$curr") )
elif [[ "$prev" == "--licence-list" ]] || [[ "$prev" == "--license-list" ]]; then
# If the current argument looks like a file path, suggest something from the file system
# Otherwise suggest something from the built-in licence lists
Expand Down

0 comments on commit 266a74c

Please sign in to comment.