Skip to content

Commit

Permalink
cobra logging command
Browse files Browse the repository at this point in the history
  • Loading branch information
ayax79 committed Dec 9, 2024
1 parent 52185be commit 1df1dbd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nushell_completions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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>
] {
Expand Down

0 comments on commit 1df1dbd

Please sign in to comment.