Commit Graph

36 Commits (3636efe7f8a5f158db48b1bbeecdb14fdcb11be1)

Author SHA1 Message Date
TorchedSammy 1e899bf18e
chore: set name of history in menu to History instead of file 2022-03-19 13:24:12 -04:00
TorchedSammy 726d265cca
feat: add hilbish.vimAction hook (closes #108) 2022-03-13 16:44:11 -04:00
TorchedSammy 7d9c7ddf18
fix: empty multiline prompt if entire prompt is single line 2022-03-13 16:42:14 -04:00
TorchedSammy 0e4f552be2
refactor: panic in history.go for more context 2022-03-12 21:43:02 -04:00
TorchedSammy ec886e17fa
fix: dont refresh prompt at startup 2022-03-06 17:20:41 -04:00
TorchedSammy 4ef6c7d5c0
fix: hilbish.read overriding history 2022-03-06 14:38:27 -04:00
TorchedSammy 0637f2763b
fix: dont write history automatically with rl library 2022-03-05 21:29:13 -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 70724ec015
feat: make hilbish.history functional for go readline 2022-03-05 15:57:46 -04:00
TorchedSammy 59963add14
fix: dont complete binaries in path if complete req starts with file prefix 2022-03-05 08:58:12 -04:00
TorchedSammy f26ef935dd
feat: add file history (closes #97) 2022-03-04 21:55:37 -04:00
TorchedSammy 237bc19f68
fix: prompt handling 2022-03-04 21:16:45 -04:00
TorchedSammy 065d752b82
feat: accessible vim input mode (closes #95) 2022-03-01 22:00:46 -04:00
TorchedSammy f292245c23
chore: remove unneeded comments 2022-02-27 19:29:05 -04:00
TorchedSammy aaeecceabf
chore: remove unneded build directive 2022-02-27 19:28:12 -04:00
TorchedSammy 3cdd21a4fa
refactor: remove gnu readline 2022-02-27 19:27:18 -04:00
TorchedSammy 3165552c21
refactor: make go readline lib default, remove hilbiline 2022-02-27 19:21:34 -04:00
TorchedSammy 22d8a61544
feat: add hilbish.history interface (closes #85) 2022-01-27 17:02:21 -04:00
TorchedSammy bcc249a4bd
feat: add aliases interface (closes #87 and #86)
500th commit!
adds the `hilbish.aliases` interface
it allows you to add, delete and get all aliases

there was also a slight refactor with alias resolving in this commit,
there is a single resolve function instead of duplicate code.
with consideration this could be exported to lua side,
but i see no reason for it
2021-12-14 20:54:23 -04:00
TorchedSammy 11aaa0cd36
feat: accept a function in complete
the `complete` function will now also accept a nested function in the table
for you to have more fine control over what is suggested and easily
filter specific things
2021-12-07 17:58:56 -04:00
TorchedSammy 6653fa2e03
feat: add new readline lib
this is an almost 100% working readline implementation
in go, will add tab completion in another commit
2021-12-06 20:48:16 -04:00
TorchedSammy 5c6310b1ca
refactor: dont export functions and types 2021-12-06 17:21:31 -04:00
TorchedSammy 28fcdb3122
fix: take care of readline segfault, update deps 2021-12-06 16:24:25 -04:00
TorchedSammy 2e21af4d6b
refactor: use curuser to get homedir everywhere 2021-12-01 18:31:04 -04:00
TorchedSammy e8a69d36bb
fix: executable tab completion 2021-11-23 19:09:07 -05:00
TorchedSammy 4aafddfdb1
fix: tab complete absolute path binaries properly 2021-11-22 22:52:14 -05:00
TorchedSammy 7ab81a61df
fix: dont trim trailing space for completion field 2021-11-22 21:52:58 -05:00
TorchedSammy 43ddab699f
feat: add in shell documentation for module properties 2021-11-22 18:59:28 -05:00
TorchedSammy 812de48558
fix: completions not working with aliases commands (resolves #82) 2021-11-22 18:01:59 -05:00
TorchedSammy 123f8992b1
feat: add tab completion api
tab complete is better than it was before!
there is a new `complete` function which allows adding custom arguments
to complete specific functions.
hilbish will now also complete executables if it's the first input
argument (this also works with ./)
if no completion is added for a command, hilbish will just complete
files
2021-11-22 11:24:31 -05:00
TorchedSammy 77cc7fe24a
fix: only resize term if not running command 2021-11-22 10:41:27 -05:00
sammyette 71b72bbdd4
chore: move comments below package declaration 2021-10-16 11:31:01 -04:00
sammyette 4596159b8f
feat: add command.precmd hook 2021-10-13 22:53:09 -04:00
sammyette 0977110e79
feat: add default history dir to xdg dir, or fallback to home 2021-10-13 10:42:35 -04:00
sammyette be5ebd6ada
feat: add back cancel input on ctrl c 2021-06-08 21:00:01 -04:00
sammyette e0851809ab
feat: make readline agnostic, add hilbiline to test 2021-05-17 19:03:56 -04:00