Commit Graph

6 Commits

Author SHA1 Message Date
Etan Kissling c67257660b
return empty completion lines on unsupported `COMP_POINT` (#76)
When `COMP_POINT` is invalid or out of range, return an empty list of
completions instead of raising `ValueError`. This matches behaviour for
`comp_point < 0 or comp_point > len(comp_line)` cases.
2023-07-07 14:03:23 +03:00
Etan Kissling d0d6fb45b2
catch exceptions in `splitCompletionLine` (#77)
We currently return `@[]` in `splitCompletionLine` when there is
unexpected or unsupported input via environment variables, but let
exceptions during parsing propagate to the caller. Catching those
exceptions allows the caller to use same behaviour regardless of
the nature of unexpected input (either through env, or parsing).
Currently, callers don't seem to be aware of the exceptions, so
going with the behaviour used for environment errors of returning `@[]`.
2023-06-13 10:36:33 +02:00
Zahary Karadjov 4ba6c64761
Remove warnings with Nim 1.0 2019-11-08 17:57:44 +00:00
LemonBoy 4c6846733d Handling paths is hard 2019-07-05 16:17:58 +03:00
LemonBoy 68e7691275 Add quoteWord proc 2019-07-05 16:17:58 +03:00
LemonBoy cef93bbd95 Initial support for command-line completion
Using the Bash protocol (COMP_LINE & COMP_POINT).
2019-07-05 16:17:58 +03:00