Support queries as part of the export command + more info sent to the banner endpoint

This commit is contained in:
David Dworken
2022-06-05 18:05:06 -07:00
parent 5fdb922801
commit 5e44e7ef36
3 changed files with 82 additions and 5 deletions

View File

@ -196,7 +196,7 @@ func parseAtomizedToken(token string) (string, interface{}, error) {
return "(instr(hostname, ?) > 0)", val, nil
case "cwd":
// TODO: Can I make this support querying via ~/ too?
return "(instr(current_working_directory, ?) > 0)", val, nil
return "(instr(current_working_directory, ?) > 0)", strings.TrimSuffix(val, "/"), nil
case "exit_code":
return "(exit_code = ?)", val, nil
case "before":