Commit Graph

25 Commits (2363e6ff2f2b33a3b3b8584f221c007f4229eff3)

Author SHA1 Message Date
sammyette 483e5f6dbe
fix(hilbish.completions): return prefix on the `call` function (from #263) 2023-09-30 19:52:33 -04:00
sammyette 9e1ec1641c
docs: fix return types for functions (closes #229) 2023-02-07 18:18:03 -04:00
sammyette f2ee600c28
fix: check for 0 length slice when splitting input for completions 2023-02-07 15:49:11 -04:00
sammyette 6b27d14f45
fix: check for error on resolving symlink 2023-02-07 10:42:36 -04:00
sammyette efc69ab769
fix: resolve symlinks for completions
1k commits milestone!! 🎉
2023-02-06 17:54:27 -04:00
sammyette a105b8e38d
docs: improve emmy lua annotations 2022-12-20 20:59:55 -04:00
sammyette e5eefb1d2d
refactor!: rework docs and doc command (#218)
changes the actual file format of docs to markup since that's basically what we have been
using in the first place.

the docgen command has been modified to write markdown headings with the function name and
yaml metadata for easy consumption by hugo for the website.

all other docs have been moved to markdown as well this is the main reason this is a "breaking" change
users will have to reinstall hilbish (task uninstall and task install) to remove the old plaintext docs
2022-12-15 00:00:54 -04:00
TorchedSammy b395b70ecd
fix: escape completion prefix if completions are escaped
fixes an issue with duplicated characters when
completing escaped paths
2022-11-30 14:26:43 -04:00
TorchedSammy ebec585690
fix: binary completion with spaces (closes #210) 2022-11-25 19:35:26 -04:00
TorchedSammy 8b547f2af0
feat: make tab completion work with spaces and escaped characters 2022-11-25 16:56:35 -04:00
TorchedSammy 1eed4cc7ee
fix: add back empty string in command line split
this fixes file completion in normal usage without
using quotes. it basically cut out the space at the
end which prevented normal usage without adding an
additional space or using quotes for file
completion
2022-08-30 23:38:46 -04:00
TorchedSammy d27ce26be0
feat: complete files plainly if tab query begins with quotes (workaround #183) 2022-07-09 10:45:42 -04:00
TorchedSammy db437905e0
fix: implicitly expand tilde on args to all fs functions 2022-05-01 00:49:59 -04:00
TorchedSammy 4a4c4d8c74
refactor: rewrite completion handler in lua 2022-04-23 23:59:03 -04:00
TorchedSammy 27ac60b856
fix: remove unused var 2022-04-23 00:03:48 -04:00
TorchedSammy abfbeb5f84
feat: allow overwrite of completion handler (closes #122)
this also makes the completion functions `bins`
and `files` also return the prefix to pass
to the completion handler.

this is an overhaul to the completion system,
which gets the completion handler from lua
instead of being made to only have lua provided
*command* completions.

it does not have any performance deficit, even
though it calls in to golua for completions.
2022-04-23 00:03:47 -04:00
TorchedSammy bd35e3b871
refactor: use foreach function to loop over lua tables 2022-04-21 14:01:59 -04:00
TorchedSammy 1458ecdcab
fix: file completions changes
changed the way file completions are handed
completely, which fixes #130 and makes the
full name appear in the completion menu instead
of it being cut off
2022-04-20 13:06:46 -04:00
TorchedSammy f73c6d4aa8
fix: completions of executables and running absolute paths on windows 2022-03-17 20:22:30 -04:00
TorchedSammy 4da82e872c
fix: completions on files/folders starting with a dot not having it 2022-03-17 19:41:37 -04:00
TorchedSammy 738939e4c9
fix: remove duplicate binary suggestions (fixes #105) 2022-03-07 18:56:22 -04:00
TorchedSammy 0ed365170c
refactor!: completion api, add hilbish.completion interface
this is a pretty big commit which mainly contains a refactor
and breaking change to how command completions are done.

before that, a hilbish.completion interface has been added
which for now just has 2 functions (`files` and `bins`)
for completions of normal files and executables.

hilbish.complete is now expected to return a table of
"completions groups," which are as the name suggests a group
for a completion. a completion group is a table which has
the fields `type`, which can be either `list` or `grid`,
and `items`, being an array (or string keyed table) of items

if an item is string keyed the item itself is the key name
and the value is a table with the first value in it being the
description for the item. this description is only applied
with the list type.

this is probably the longest commit message ive written
2022-03-05 15:59:00 -04:00
TorchedSammy df6a2bb0c7
fix: add missing comma 2022-02-27 19:24:02 -04:00
TorchedSammy f26931d4cb
fix: add missing comma in escape list for file completions and add more cases 2022-02-27 19:19:17 -04:00
TorchedSammy 994daba078
feat: add separate custom file complete function 2022-02-27 19:18:01 -04:00