Skip to content

Commit

Permalink
11519 beadm activate bash completion should complete all but "R"-ma…
Browse files Browse the repository at this point in the history
…rked entries
  • Loading branch information
Mno-hime authored and alarcher committed Aug 16, 2019
1 parent 5834720 commit d722a46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions beadm
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ _beadm()
local be_and_snapshots=()
case "${special}" in
activate)
be_and_snapshots=( $(beadm list -H | nawk -F ';' '$3 !~ "N" {print $1}') )
# Activate only BEs not already set active on reboot ('R')
be_and_snapshots=( $(beadm list -H | nawk -F ';' '$3 !~ "R" {print $1}') )
;;
destroy)
be_and_snapshots=( $(beadm list -H -a | nawk -F ';' '$2 ~ "@" {print $2}; $3 !~ "N" {print $1}' | sort | uniq) )
Expand All @@ -122,7 +123,8 @@ _beadm()
be_and_snapshots=( $(beadm list -H | nawk -F ';' '$3 !~ "N" && $4 != "" {print $1}') )
;;
rename)
be_and_snapshots=( $(beadm list -H | nawk -F ';' '$3 !~ "R" {print $1}') )
# Rename all but currently/now active ('N') BEs
be_and_snapshots=( $(beadm list -H | nawk -F ';' '$3 !~ "N" {print $1}') )
;;
rollback)
# list BEs and snapshots
Expand Down

0 comments on commit d722a46

Please sign in to comment.