Page MenuHomeVyOS Platform

vyatta-cfg-combined-completer.diff

Authored By
talmakion
May 25 2024, 5:44 AM
Size
1 KB
Referenced Files
None
Subscribers
None

vyatta-cfg-combined-completer.diff

diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg
index c2d3a42..d38828d 100644
--- a/etc/bash_completion.d/vyatta-cfg
+++ b/etc/bash_completion.d/vyatta-cfg
@@ -237,7 +237,7 @@ print_commit_log ()
vyatta_rollback_complete ()
{
- # Generate completion help for the "rollback" command
+ # Generate completion help for the "rollback" and "rollback-soft" commands
local restore_shopts=$( shopt -p extglob nullglob | tr \\n \; )
shopt -s extglob nullglob
@@ -253,7 +253,11 @@ vyatta_rollback_complete ()
if [ $COMP_CWORD -eq 1 -a -z "${COMP_WORDS[1]}" ]; then
echo
echo "Possible completions:"
- echo -e " <N>\tRollback to revision N (currently requires reboot)"
+ if [ "${COMP_WORDS[0]}" = "rollback-soft" ]; then
+ echo -e " <N>\tRollback to revision N (as an uncommitted change)"
+ else
+ echo -e " <N>\tRollback to revision N (currently requires reboot)"
+ fi
echo -e "\n Revisions:"
print_commit_log
COMPREPLY=( "" " " )

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
503537
Default Alt Text
vyatta-cfg-combined-completer.diff (1 KB)

Event Timeline