mirror of
https://github.com/munki/munki.git
synced 2026-01-05 22:20:00 -06:00
Add tab-completion for 'help' command in interactive mode
This commit is contained in:
@@ -48,7 +48,7 @@ class TabCompleter {
|
||||
"delete-manifest": ["manifests"],
|
||||
// "refresh-cache": [],
|
||||
"exit": [],
|
||||
"help": [],
|
||||
"help": ["commands"],
|
||||
"configure": [],
|
||||
"version": [],
|
||||
]
|
||||
@@ -152,6 +152,9 @@ class TabCompleter {
|
||||
case "manifests":
|
||||
let wordList = manifests + options.dropFirst() + ["--help"]
|
||||
return wordList.filter { $0.hasPrefix(text) }
|
||||
case "commands":
|
||||
let wordList = Array(commands.keys) + options.dropFirst() + ["--help"]
|
||||
return wordList.filter { $0.hasPrefix(text) }
|
||||
default:
|
||||
let wordList = options + ["--help"]
|
||||
return wordList.filter { $0.hasPrefix(text) }
|
||||
|
||||
Reference in New Issue
Block a user