cobra logging command

This commit is contained in:
Jack Wright 2024-12-08 20:34:38 -08:00
parent 52185bed6e
commit 1df1dbd552

View file

@ -36,6 +36,15 @@ let cobra_completer = {|spans|
let cmd = $spans | first let cmd = $spans | first
let rest = $spans | skip 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 [ def exec_complete [
spans: list<string> spans: list<string>
] { ] {