diff --git a/docs/hilbish.txt b/docs/hilbish.txt index a56b4a6..a32d90e 100644 --- a/docs/hilbish.txt +++ b/docs/hilbish.txt @@ -5,8 +5,10 @@ appendPath(dir) > Appends `dir` to $PATH complete(scope, cb) > Registers a completion handler for `scope`. A `scope` is currently only expected to be `command.`, replacing with the name of the command (for example `command.git`). -`cb` must be a function that returns a table of the entries to complete. -Nested tables will be used as sub-completions. +`cb` must be a function that returns a table of "completion groups." +A completion group is a table with the keys `items` and `type`. +`items` being a table of items and `type` being the display type of +`grid` (the normal file completion display) or `list` (with a description) cwd() > Returns the current directory of the shell diff --git a/emmyLuaDocs/hilbish.lua b/emmyLuaDocs/hilbish.lua index e485931..d0d5068 100644 --- a/emmyLuaDocs/hilbish.lua +++ b/emmyLuaDocs/hilbish.lua @@ -14,8 +14,10 @@ function hilbish.appendPath(dir) end --- Registers a completion handler for `scope`. --- A `scope` is currently only expected to be `command.`, --- replacing with the name of the command (for example `command.git`). ---- `cb` must be a function that returns a table of the entries to complete. ---- Nested tables will be used as sub-completions. +--- `cb` must be a function that returns a table of "completion groups." +--- A completion group is a table with the keys `items` and `type`. +--- `items` being a table of items and `type` being the display type of +--- `grid` (the normal file completion display) or `list` (with a description) --- @param scope string --- @param cb function function hilbish.complete(scope, cb) end