Skip to content

Commit

Permalink
Fixes #15506: Change rudder agent bash autocomplete file to add rudde…
Browse files Browse the repository at this point in the history
…r-pkg completion
  • Loading branch information
Fdall committed Aug 19, 2019
1 parent 30926a7 commit 84a76bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions etc/bash_completion.d/rudder.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
_global() {
if [ $COMP_CWORD -ge 1 ]; then
case ${COMP_WORDS[1]} in
pkg)
PKG_FILE="rudder-pkg.sh"
package)
PKG_FILE="/etc/bash_completion.d/rudder-pkg.sh"
if [ -f "$PKG_FILE" ]; then
. $PKG_FILE
_rudderpkg
Expand All @@ -18,9 +18,9 @@ _global() {
}
_rudder() {
local cur="$2"
local prev="$3"
local prev="$3"
local obj cmd base opts

base="/opt/rudder/share/commands"
# base objects: agent server remote ...
obj=$(cd ${base} && ls -1 | cut -f 1 -d "-" | sort -u)
Expand Down

0 comments on commit 84a76bf

Please sign in to comment.