Commit Graph

76 Commits (d8a7a4332d7dc9e5ef9e450634c430d162350893)

Author SHA1 Message Date
sammyette d8a7a4332d
fix(commands/greenhouse): remove extra space in title, set pipe page title to stdin 2023-10-25 00:00:59 -04:00
sammyette 8fabdf4502
fix: correct no files check to compensate for pipes 2023-10-24 23:59:53 -04:00
sammyette 003100d3c4
fix: dont concat subdocs list if on main page 2023-10-24 23:52:53 -04:00
sammyette 7288f85e9a
feat(commands/doc): add subdocs as additional pages 2023-10-24 23:51:42 -04:00
sammyette 554fb009f8
fix(greenhouse): add enter bind to goto page on table of contents 2023-10-24 23:38:19 -04:00
sammyette 264043dc1e
fix: show usage when no args are passed to greenhouse
also niced up the display of the page title
2023-10-24 20:10:53 -04:00
sammyette 19bb05f001
feat: pager improvements
- make use of full terminal space properly in doc and greenhouse
commands
- add some info in doc command like currently viewed doc
and description at the bottom instead of top of doc (this makes it persistent)
- add contents function to Greenhouse to allow showing custom contents
in the table of contents (this will be used for lazy loading in the future)
2023-07-11 22:29:15 -04:00
sammyette b9bb14497f
fix(greenhouse): print contents properly
on the last line that can be displayed, don't print with a newline
this removes the space at the end
2023-07-11 22:28:11 -04:00
sammyette 7d0c3f3bf0
fix: set old moddocpath 2023-07-11 22:27:11 -04:00
sammyette 48a06f8022
fix: doc command not displaying correct subdocs when using shorthand api doc access 2023-07-11 20:56:24 -04:00
sammyette 5b4b055c6c
fix(greenhouse): set scroll boundary properly, fix text cutoff
this means you can no longer scroll away the text until it isnt seen
this commit also fixes text cutoff when using lunacolors
(like in the doc command)
2023-07-11 20:25:25 -04:00
sammyette 9b39d5ffcf
fix(commands/greenhouse): set nil page title 2023-07-11 20:24:20 -04:00
sammyette ade14a6238
fix(greenhouse): fix toc disappearing on any key press 2023-07-10 18:00:49 -04:00
sammyette 4c6758c732
chore: merge from master (update branch) 2023-07-09 23:40:30 -04:00
sammyette 11da2c0c45
feat(greenhouse): add goto command
made some other minor changes (in terms of how much it
matters to the user)

the toc page is now a "special page"
in a next commit itll also be used for a help page

cursor gets hidden unless typing a command
2023-07-09 23:39:11 -04:00
sammyette 8b672f5b95
feat(greenhouse): add command handling 2023-07-09 23:07:32 -04:00
sammyette 0bb97a6f3b
feat: add table of contents to pager
another change in this commit is having a separate render
function for the greenhouse caller to handle ui

this means there isnt a hardcoded space at the bottom to
display command and status line
2023-07-09 22:38:34 -04:00
sammyette 713f24aa3e
feat(greenhouse): add functions for custom keybinds 2023-07-09 20:22:59 -04:00
sammyette cbc5e81c9d
feat: show indexes on cdr list and change home to tilde (#253)
* feat: show indexes on cdr list and change home to tilde

* fix: remove underline in cdr help page
2023-07-09 18:43:21 -04:00
sammyette b6315639b2
feat: add getChar function to editor interface
this is a simple command that returns a single key from the user.
this can be used to read keystrokes in an interactive program
like how greenhouse (the pager) does it
2023-07-09 16:27:11 -04:00
sammyette 076118d237
feat: make doc command use pager 2023-04-11 20:44:29 -04:00
sammyette d196799abf
feat(commands/greenhouse): support reading from pipes 2023-03-25 18:12:51 -04:00
sammyette 7531bbfd14
chore: merge from master 2023-03-25 17:45:45 -04:00
sammyette ec0692edeb
fix(nature/greenhouse): reset line offset when switching pages 2023-02-19 17:05:25 -04:00
sammyette 179bec7ae5
feat(nature/greenhouse): support setting multiple pages 2023-02-19 16:53:39 -04:00
sammyette 013fa30658
fix: correct job management commands to call with colon 2023-02-19 15:11:55 -04:00
sammyette 8b5b9b3c1c
fix(nature/greenhouse): dont redraw if scroll pos stays the same 2023-02-18 18:58:44 -04:00
sammyette bb9a6fe39e
fix(nature/greenhouse): handle raw mode and term resize 2023-02-18 18:58:16 -04:00
sammyette e368ba3e0a
fix(nature/greenhouse): add limit to text offset for scrolling 2023-02-18 17:57:46 -04:00
sammyette 45eb3d17e3
fix(nature/greenhouse): draw pager body properly 2023-02-18 17:57:03 -04:00
sammyette e454ab0d70
feat: add greenhouse pager 2023-02-18 16:57:27 -04:00
sammyette 7bfd7b12c4
fix(commands/doc): only highlight real headings 2023-02-10 17:03:03 -04:00
sammyette 6dbb39d404
chore: change motd for 2.1 (closes #237) 2023-02-07 10:46:47 -04:00
sammyette cdd07a4981
fix(commands/doc): run stat in pcall 2023-02-05 13:02:50 -04:00
sammyette 2f6ab5fd92
feat: add sink for commanders to write output/read input (#232)
to write output, you would usually just use the print builtin
since commanders are just lua custom commands but this does not
consider the fact of pipes or other shell operators being used
to redirect or whatever.

this adds readable/writable "sinks" which is a type for input
or output and is currently only used for commanders but can be
used for other hilbish things in the future
2023-01-20 19:07:42 -04:00
sammyette 088e326bd1
fix(commands/doc): properly block out index doc 2023-01-20 18:43:46 -04:00
sammyette 6530d48b00
docs: document types properly (#227) 2023-01-18 06:39:26 -04:00
sammyette d99e056a76
feat: add function to get current runner name 2023-01-17 22:04:54 -04:00
sammyette a6bcfdfca9
feat(commands/doc): return 1 exit code when doc not found 2023-01-07 14:02:21 -04:00
sammyette 4e023703b6
feat(commands/doc): use local docs directory if hilbish branch is found 2023-01-07 14:01:57 -04:00
sammyette 354f257c03
feat(commands/doc): make it easier to get interface docs 2023-01-07 13:54:08 -04:00
sammyette 887260cd8a
fix: print error on event error and dont release hook (closes #226) 2023-01-07 07:39:36 -04:00
sammyette c2db9e65fa
fix(commands/cd): set oldpwd when cd-ing with no args (fixes #225) 2022-12-28 19:18:04 -04:00
sammyette 1a2d29aee7
fix: list subdocs for hilbish module 2022-12-20 01:42:58 -04:00
sammyette b46bd0059e
fix: fixes for doc command
- get docs properly for hilbish module and its interfaces
- deal with negative numbers causing yaml metadata parsing to fail
- change from index to _index to match hugo
2022-12-20 01:38:19 -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
sammyette 0a49e1a4ef
feat: print command errors via hook
this allows users to remove the handlers and print
a custom message to their liking
2022-12-13 12:57:27 -04:00
TorchedSammy 26ff6c9a46
fix(nature/completions): get command name properly for custom completions 2022-12-05 23:15:35 -04:00
sammy 0d32a10ca3
feat: add builtins clear, exec and cat (#208)
* feat: add clear and exec command

* docs: add builtins to changelog

* feat: add cat command
2022-10-14 19:15:40 -04:00
TorchedSammy 068a5b5149
feat(bait): add error hook and hooks function (closes #205)
an `error` hook is now thrown when an event in lua
throws an error (errors from go side should not happen)
it includes the event name, handler, and error message

a hooks function has also been added. it returns a table
of handlers for a specific event.
2022-10-11 17:41:13 -04:00