mirror of https://github.com/Hilbis/Hilbish
refactor: move misc docs for use in hilbish and website
parent
0607a90c30
commit
5be470521f
|
@ -15,11 +15,12 @@ It compiles for Windows (CI ensures it does), but otherwise it is not
|
|||
directly supported. If you'd like to improve this situation,
|
||||
checkout [the discussion](https://github.com/Rosettea/Hilbish/discussions/165).
|
||||
|
||||
# Where is the API documentation?
|
||||
The builtin `doc` command supplies all documentation of Hilbish provided
|
||||
APIs. You can also check the sidebar.
|
||||
|
||||
# Why?
|
||||
Hilbish emerged from the desire of a Lua configured shell.
|
||||
It was the initial reason that it was created, but now it's more:
|
||||
to be hyper extensible, simpler and more user friendly.
|
||||
|
||||
# Does it have "autocompletion" or "tab completion"
|
||||
Of course! This is a modern shell. Hilbish provides a way for users
|
||||
to write tab completion for any command and/or the whole shell.
|
||||
Inline hinting and syntax highlighting are also available.
|
|
@ -1,10 +1,19 @@
|
|||
---
|
||||
title: Hooks
|
||||
description:
|
||||
layout: doc
|
||||
weight: -50
|
||||
menu:
|
||||
docs
|
||||
---
|
||||
|
||||
Here is a list of bait hooks that are thrown by Hilbish. If a hook is related
|
||||
to a command, it will have the `command` scope, as example.
|
||||
|
||||
Here is the format for a doc for a hook:
|
||||
+ <hook name> -> <args> > <description>
|
||||
+ {hook name} -> args > description
|
||||
|
||||
`<args>` just means the arguments of the hook. If a hook doc has the format
|
||||
`{args}` just means the arguments of the hook. If a hook doc has the format
|
||||
of `arg...`, it means the hook can take/recieve any number of `arg`.
|
||||
|
||||
+ error -> eventName, handler, err > Emitted when there is an error in
|
||||
|
|
|
@ -1,12 +1,21 @@
|
|||
+ `command.preexec` -> input, cmdStr > Thrown before a command
|
||||
---
|
||||
title: Command
|
||||
description:
|
||||
layout: doc
|
||||
menu:
|
||||
docs:
|
||||
parent: "Hooks"
|
||||
---
|
||||
|
||||
- `command.preexec` -> input, cmdStr > Thrown before a command
|
||||
is executed. The `input` is the user written command, while `cmdStr`
|
||||
is what will be executed (`input` will have aliases while `cmdStr`
|
||||
will have alias resolved input).
|
||||
|
||||
+ `command.exit` -> code, cmdStr > Thrown when a command exits.
|
||||
- `command.exit` -> code, cmdStr > Thrown when a command exits.
|
||||
`code` is the exit code of the command, and `cmdStr` is the command that was run.
|
||||
|
||||
+ `command.not-found` -> cmdStr > Thrown when a command is not found.
|
||||
- `command.not-found` -> cmdStr > Thrown when a command is not found.
|
||||
|
||||
+ `command.not-executable` -> cmdStr > Thrown when Hilbish attempts to run a file
|
||||
- `command.not-executable` -> cmdStr > Thrown when Hilbish attempts to run a file
|
||||
that is not executable.
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
---
|
||||
title: Hilbish
|
||||
description:
|
||||
layout: doc
|
||||
menu:
|
||||
docs:
|
||||
parent: "Hooks"
|
||||
---
|
||||
|
||||
+ `hilbish.exit` > Sent when Hilbish is about to exit.
|
||||
|
||||
+ `hilbish.vimMode` -> modeName > Sent when Hilbish's Vim mode is changed (example insert to normal mode),
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
---
|
||||
title: Signal
|
||||
description:
|
||||
layout: doc
|
||||
menu:
|
||||
docs:
|
||||
parent: "Hooks"
|
||||
---
|
||||
|
||||
+ `signal.sigint` > Sent when Hilbish receives SIGINT (on Ctrl-C).
|
||||
|
||||
+ `signal.resize` > Sent when the terminal is resized.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../../docs
|
|
@ -1 +0,0 @@
|
|||
../../../docs/api/
|
Loading…
Reference in New Issue