From 3eb4afeea7c005a7e7fee5a90748d10d00f53391 Mon Sep 17 00:00:00 2001 From: TorchedSammy Date: Sun, 24 Dec 2023 22:23:30 +0000 Subject: [PATCH] deploy: 633658463f94fe9148b9079964ac1b5cd03ff601 --- .../docs/hooks/command/index.html | 56 +++++++++++++++---- .../docs/hooks/hilbish/index.html | 35 ++++++++---- .../doc-improvements/docs/hooks/index.xml | 31 +++++++--- .../docs/hooks/signal/index.html | 33 ++++++++--- versions/doc-improvements/index.xml | 35 ++++++++---- 5 files changed, 140 insertions(+), 50 deletions(-) diff --git a/versions/doc-improvements/docs/hooks/command/index.html b/versions/doc-improvements/docs/hooks/command/index.html index eaa6666..2911a6b 100644 --- a/versions/doc-improvements/docs/hooks/command/index.html +++ b/versions/doc-improvements/docs/hooks/command/index.html @@ -1,13 +1,47 @@ Command — Hilbish -

Command

command.preexec +

Thrown right before a command is executed.

Variables +

string input
The raw string that the user typed. This will include the text +without changes applied to it (argument substitution, alias expansion, +etc.)

string cmdStr
The command that will be directly executed by the current runner.


command.exit +

Thrown after the user’s ran command is finished.

Variables +

number code
The exit code of what was executed.

string cmdStr
The command or code that was executed


command.not-found +

Thrown if the command attempted to execute was not found. +This can be used to customize the text printed when a command is not found. +Example:

 1local bait = require 'bait'
+ 2-- Remove any present handlers on `command.not-found`
+ 3
+ 4local notFoundHooks = bait.hooks 'command.not-found'
+ 5for _, hook in ipairs(notFoundHooks) do
+ 6	bait.release('command.not-found', hook)
+ 7end
+ 8
+ 9-- then assign custom
+10bait.catch('command.not-found', function(cmd)
+11	print(string.format('The command "%s" was not found.', cmd))
+12end)
+
Variables +

string cmdStr
The name of the command.


command.not-executable +

Thrown when the user attempts to run a file that is not executable +(like a text file, or Unix binary without +x permission).

Variables +

string cmdStr
The name of the command.

\ No newline at end of file diff --git a/versions/doc-improvements/docs/hooks/hilbish/index.html b/versions/doc-improvements/docs/hooks/hilbish/index.html index e7d2202..62c66ae 100644 --- a/versions/doc-improvements/docs/hooks/hilbish/index.html +++ b/versions/doc-improvements/docs/hooks/hilbish/index.html @@ -1,13 +1,26 @@ Hilbish — Hilbish -

Hilbish

hilbish.exit +

Sent when Hilbish is going to exit.

Variables +

This signal returns no variables.


hilbish.vimMode +

Sent when the Vim mode of Hilbish is changed (like from insert to normal mode). +This can be used to change the prompt and notify based on Vim mode.

Variables +

string modeName
The mode that has been set. +Can be these values: insert, normal, delete or replace


hilbish.cancel +

Sent when the user cancels their command input with Ctrl-C

Variables +

This signal returns no variables.


hilbish.notification +

Thrown when a notification +is sent.

Variables +

table notification
The notification. The properties are defined in the link above.


  • hilbish.vimAction -> actionName, args > Sent when the user does a “vim action,” being something +like yanking or pasting text. See doc vim-mode actions for more info.
\ No newline at end of file diff --git a/versions/doc-improvements/docs/hooks/index.xml b/versions/doc-improvements/docs/hooks/index.xml index 9dd11e3..27ff9b9 100644 --- a/versions/doc-improvements/docs/hooks/index.xml +++ b/versions/doc-improvements/docs/hooks/index.xml @@ -1,11 +1,24 @@ Signals on Hilbishhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/Recent content in Signals on HilbishHugo -- gohugo.ioen-us<link>https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/job/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/job/</guid><description>Note: job refers to a job object. You can check doc jobs for more detail. job.start -&gt; job &gt; Thrown when a new background job starts. -job.done -&gt; job &gt; Thrown when a background jobs exits.</description></item><item><title>Commandhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/command/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/command/command.preexec -&gt; input, cmdStr &gt; 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 -&gt; code, cmdStr &gt; Thrown when a command exits. code is the exit code of the command, and cmdStr is the command that was run. -command.not-found -&gt; cmdStr &gt; Thrown when a command is not found.Hilbishhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/hilbish/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/hilbish/hilbish.exit &gt; Sent when Hilbish is about to exit. -hilbish.vimMode -&gt; modeName &gt; Sent when Hilbish&rsquo;s Vim mode is changed (example insert to normal mode), modeName is the name of the mode changed to (can be insert, normal, delete or replace). -hilbish.vimAction -&gt; actionName, args &gt; Sent when the user does a &ldquo;vim action,&rdquo; being something like yanking or pasting text. See doc vim-mode actions for more info. -hilbish.cancel &gt; Sent when the user cancels their input with Ctrl-C.Signalhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/signal/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/signal/signal.sigint &gt; Sent when Hilbish receives SIGINT (on Ctrl-C). -signal.resize &gt; Sent when the terminal is resized. -signal.sigusr1 -signal.sigusr2 \ No newline at end of file +job.done -&gt; job &gt; Thrown when a background jobs exits.Commandhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/command/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/command/command.preexec Thrown right before a command is executed. +Variables string input +The raw string that the user typed. This will include the text without changes applied to it (argument substitution, alias expansion, etc.) +string cmdStr +The command that will be directly executed by the current runner. +command.exit Thrown after the user&rsquo;s ran command is finished. +Variables number code +The exit code of what was executed. +string cmdStr +The command or code that was executedHilbishhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/hilbish/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/hilbish/hilbish.exit Sent when Hilbish is going to exit. +Variables This signal returns no variables. +hilbish.vimMode Sent when the Vim mode of Hilbish is changed (like from insert to normal mode). This can be used to change the prompt and notify based on Vim mode. +Variables string modeName +The mode that has been set. Can be these values: insert, normal, delete or replace +hilbish.cancel Sent when the user cancels their command input with Ctrl-CSignalhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/signal/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/signal/signal.sigint Thrown when Hilbish receive the SIGINT signal, aka when Ctrl-C is pressed. +Variables This signal returns no variables. +signal.resize Thrown when the terminal is resized. +Variables This signal returns no variables. +signal.sigusr1 Thrown when SIGUSR1 is sent to Hilbish. +Variables This signal returns no variables. +signal.sigusr2 Thrown when SIGUSR2 is sent to Hilbish. +Variables This signal returns no variables. \ No newline at end of file diff --git a/versions/doc-improvements/docs/hooks/signal/index.html b/versions/doc-improvements/docs/hooks/signal/index.html index c01f17f..5fa2f7c 100644 --- a/versions/doc-improvements/docs/hooks/signal/index.html +++ b/versions/doc-improvements/docs/hooks/signal/index.html @@ -1,10 +1,27 @@ Signal — Hilbish -

Signal

signal.sigint +

Thrown when Hilbish receive the SIGINT signal, +aka when Ctrl-C is pressed.

Variables +

This signal returns no variables.


signal.resize +

Thrown when the terminal is resized.

Variables +

This signal returns no variables.


signal.sigusr1 +

Thrown when SIGUSR1 is sent to Hilbish.

Variables +

This signal returns no variables.


signal.sigusr2 +

Thrown when SIGUSR2 is sent to Hilbish.

Variables +

This signal returns no variables.

\ No newline at end of file diff --git a/versions/doc-improvements/index.xml b/versions/doc-improvements/index.xml index b918fcf..61a3c33 100644 --- a/versions/doc-improvements/index.xml +++ b/versions/doc-improvements/index.xml @@ -19,14 +19,23 @@ This is a big release, coming 9 months after the previous v1.2.0 and featuring o Documentation When querying about the problems people have with Hilbish, one of the issues was its poor documentation.<link>https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/job/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/job/</guid><description>Note: job refers to a job object. You can check doc jobs for more detail. job.start -&gt; job &gt; Thrown when a new background job starts. job.done -&gt; job &gt; Thrown when a background jobs exits.</description></item><item><title/><link>https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/runner-mode/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/runner-mode/</guid><description>Hilbish allows you to change how interactive text can be interpreted. This is mainly due to the fact that the default method Hilbish uses is that it runs Lua first and then falls back to shell script. -In some cases, someone might want to switch to just shell script to avoid it while interactive but still have a Lua config, or go full Lua to use Hilbish as a REPL. This also allows users to add alternative languages like Fennel as the interactive script runner.</description></item><item><title/><link>https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/timers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/timers/</guid><description>This has been moved to the hilbish.timers API doc (accessible by doc api hilbish.timers)</description></item><item><title>Commandhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/command/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/command/command.preexec -&gt; input, cmdStr &gt; 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 -&gt; code, cmdStr &gt; Thrown when a command exits. code is the exit code of the command, and cmdStr is the command that was run. -command.not-found -&gt; cmdStr &gt; Thrown when a command is not found.Completionshttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/completions/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/completions/Hilbish has a pretty good completion system. It has a nice looking menu, with 2 types of menus: grid (like file completions) or list. +In some cases, someone might want to switch to just shell script to avoid it while interactive but still have a Lua config, or go full Lua to use Hilbish as a REPL. This also allows users to add alternative languages like Fennel as the interactive script runner.<link>https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/timers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/timers/</guid><description>This has been moved to the hilbish.timers API doc (accessible by doc api hilbish.timers)</description></item><item><title>Commandhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/command/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/command/command.preexec Thrown right before a command is executed. +Variables string input +The raw string that the user typed. This will include the text without changes applied to it (argument substitution, alias expansion, etc.) +string cmdStr +The command that will be directly executed by the current runner. +command.exit Thrown after the user&rsquo;s ran command is finished. +Variables number code +The exit code of what was executed. +string cmdStr +The command or code that was executedCompletionshttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/completions/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/completions/Hilbish has a pretty good completion system. It has a nice looking menu, with 2 types of menus: grid (like file completions) or list. Like most parts of Hilbish, it&rsquo;s made to be extensible and customizable. The default handler for completions in general can be overwritten to provide more advanced completions if needed. -Completion Handler By default, it provides 3 things: for the first argument, binaries (with a plain name requested to complete, those in $PATH), files, or command completions.Hilbishhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/hilbish/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/hilbish/hilbish.exit &gt; Sent when Hilbish is about to exit. -hilbish.vimMode -&gt; modeName &gt; Sent when Hilbish&rsquo;s Vim mode is changed (example insert to normal mode), modeName is the name of the mode changed to (can be insert, normal, delete or replace). -hilbish.vimAction -&gt; actionName, args &gt; Sent when the user does a &ldquo;vim action,&rdquo; being something like yanking or pasting text. See doc vim-mode actions for more info. -hilbish.cancel &gt; Sent when the user cancels their input with Ctrl-C.Installhttps://rosettea.github.io/Hilbish/versions/doc-improvements/install/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/install/Official Binaries The best way to get Hilbish is to get a build directly from GitHub. At any time, there are 2 versions of Hilbish recommended for download: the latest stable release, and development builds from the master branch. +Completion Handler By default, it provides 3 things: for the first argument, binaries (with a plain name requested to complete, those in $PATH), files, or command completions.Hilbishhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/hilbish/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/hilbish/hilbish.exit Sent when Hilbish is going to exit. +Variables This signal returns no variables. +hilbish.vimMode Sent when the Vim mode of Hilbish is changed (like from insert to normal mode). This can be used to change the prompt and notify based on Vim mode. +Variables string modeName +The mode that has been set. Can be these values: insert, normal, delete or replace +hilbish.cancel Sent when the user cancels their command input with Ctrl-CInstallhttps://rosettea.github.io/Hilbish/versions/doc-improvements/install/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/install/Official Binaries The best way to get Hilbish is to get a build directly from GitHub. At any time, there are 2 versions of Hilbish recommended for download: the latest stable release, and development builds from the master branch. You can download both at any time, but note that the development builds may have breaking changes. For the latest stable release, check here: https://github.com/Rosettea/Hilbish/releases/latest For a development build: https://nightly.link/Rosettea/Hilbish/workflows/build/master Compiling To read the steps for compiling Hilbish, head over to the GitHub repository.Jobshttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/jobs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/jobs/Hilbish has pretty standard job control. It&rsquo;s missing one or two things, but works well. One thing which is different from other shells (besides Hilbish) itself is the API for jobs, and of course it&rsquo;s in Lua. You can add jobs, stop and delete (disown) them and even get output. Job Interface The job interface refers to hilbish.jobs. @@ -51,7 +60,11 @@ Functions restoreState() Restores the last saved state of the terminal saveState Parameters This function has no parameters.Notificationhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/features/notifications/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/features/notifications/Hilbish features a simple notification system which can be used by other plugins and parts of the shell to notify the user of various actions. This is used via the hilbish.message interface. A message is defined as a table with the following properties: icon: A unicode/emoji icon for the notification. title: The title of the message text: Message text/body channel: The source of the message. This should be a unique and easily readable text identifier.Runner Modehttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/features/runner-mode/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/features/runner-mode/Hilbish allows you to change how interactive text can be interpreted. This is mainly due to the fact that the default method Hilbish uses is that it runs Lua first and then falls back to shell script. -In some cases, someone might want to switch to just shell script to avoid it while interactive but still have a Lua config, or go full Lua to use Hilbish as a REPL. This also allows users to add alternative languages like Fennel as the interactive script runner.Signalhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/signal/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/signal/signal.sigint &gt; Sent when Hilbish receives SIGINT (on Ctrl-C). -signal.resize &gt; Sent when the terminal is resized. -signal.sigusr1 -signal.sigusr2Welcome to the Hilbish bloghttps://rosettea.github.io/Hilbish/versions/doc-improvements/blog/welcome/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/blog/welcome/Hello! Welcome to the Hilbish blog. This will mainly contain release announcements and some other things relating to Hilbish (development). \ No newline at end of file +In some cases, someone might want to switch to just shell script to avoid it while interactive but still have a Lua config, or go full Lua to use Hilbish as a REPL. This also allows users to add alternative languages like Fennel as the interactive script runner.Signalhttps://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/signal/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/docs/hooks/signal/signal.sigint Thrown when Hilbish receive the SIGINT signal, aka when Ctrl-C is pressed. +Variables This signal returns no variables. +signal.resize Thrown when the terminal is resized. +Variables This signal returns no variables. +signal.sigusr1 Thrown when SIGUSR1 is sent to Hilbish. +Variables This signal returns no variables. +signal.sigusr2 Thrown when SIGUSR2 is sent to Hilbish. +Variables This signal returns no variables.Welcome to the Hilbish bloghttps://rosettea.github.io/Hilbish/versions/doc-improvements/blog/welcome/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/versions/doc-improvements/blog/welcome/Hello! Welcome to the Hilbish blog. This will mainly contain release announcements and some other things relating to Hilbish (development). \ No newline at end of file