mirror of
https://github.com/spf13/cobra
synced 2024-12-28 23:37:09 +00:00
cobra logging command
This commit is contained in:
parent
52185bed6e
commit
1df1dbd552
1 changed files with 9 additions and 0 deletions
|
@ -36,6 +36,15 @@ let cobra_completer = {|spans|
|
|||
let cmd = $spans | first
|
||||
let rest = $spans | skip
|
||||
|
||||
def cobra_log [message] {
|
||||
let file = do -i {$env | get NUSHELL_COMP_DEBUG_FILE}
|
||||
if $file != null {
|
||||
echo $"($message)\n" | save $file --append
|
||||
}
|
||||
}
|
||||
|
||||
cobra_log $"External Completer called for cmd ($cmd)"
|
||||
|
||||
def exec_complete [
|
||||
spans: list<string>
|
||||
] {
|
||||
|
|
Loading…
Reference in a new issue