Commit graph

4 commits

Author SHA1 Message Date
PapaCharlie
ee1287cc3f Use the empty string as a parameter to the flag being completed
Also attempt to standardize the bash and zsh implementations

Next up: tests!
2020-02-21 10:14:45 -08:00
PapaCharlie
979059b9c4 Implement bash completions! 2020-02-21 10:14:45 -08:00
PapaCharlie
c87d78cfc6 Add framework for dynamic tab completions
By setting the COBRA_FLAG_COMPLETION environment variable, the normal execution path of the command
is short circuited, and instead the function registered by `MarkCustomFlagCompletion` is executed.

All flags other than the one being completed get parsed according to whatever type they are defined
as, but the flag being completed is parsed as a raw string and passed into the custom compeltion.
2020-02-21 10:14:45 -08:00
Haim Ashkenazi
e2c45ac9eb Started working on Unified API for the various shell completions:
- Moved some general function to a more generic shell_completions file.
- Added functions to mark flag as directory completion.
- Started making the global functions docs more generic (not bash
  specific) and added compatibility matrix.
2019-06-07 10:09:50 -04:00