diff --git a/nushell_completions.go b/nushell_completions.go index 8523652..7a8962d 100644 --- a/nushell_completions.go +++ b/nushell_completions.go @@ -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 ] {