This is a big release, coming 9 months after the previous v1.2.0 and featuring over 40+ bug fixes and tons of new features and enhancements, so let’s see what is in this release.
Documentation When querying about the problems people have with Hilbish, one of the issues was its poor documentation." property="og:description"><metacontent="Hilbishv2.0hasbeenreleased!Wellactually,itwasreleasedaweekago,butIonlywrotethisHilbishblogafterthat.
This is a big release, coming 9 months after the previous v1.2.0 and featuring over 40+ bug fixes and tons of new features and enhancements, so let’s see what is in this release.
<emclass=text-muted>by <strong>sammyette</strong><time> // December 29, 2022</time></em><divclass=my-4><p>Hilbish v2.0 has been released!
Well actually, it was released a week ago, but I only wrote this
Hilbish blog <em>after</em> that.</p><p>This is a <strong>big</strong> release, coming 9 months after the previous v1.2.0 and
featuring over 40+ bug fixes and tons of new features and enhancements, so
let’s see what is in this release.</p><h2id=documentationclass=heading>Documentation
<ahref=#documentationclass=heading-link><iclass="fas fa-paperclip"></i></a></h2><p>When querying about the problems people have with Hilbish, one of the
issues was its poor documentation. Hilbish had plain text, autogenerated
documentation which only covered the module functions (bait, hilbish,
commander, etc.) and did not include the interfaces (<code>hilbish.timers</code>,
<code>hilbish.jobs</code> and all that).</p><p>I have tried to improve this by working on documenting all the
interfaces (except for some functions of <code>hilbish.runner</code>, that’s hard to do)
and made the documentation markdown for use on this website. This means
that users can look at documentation here or with the <code>doc</code> command.</p><p>Hopefully this addresses documentation complaints, and if not, please open an issue.</p><h2id=main-bug-fixesclass=heading>Main Bug Fixes
<ahref=#main-bug-fixesclass=heading-link><iclass="fas fa-paperclip"></i></a></h2><p>As this is a piece of software with no unit testing that is maintained by me alone,
there is gonna be either some bug or something that I overlooked when
making a change. I make a lot of mistakes. There’s also the other fact that
sometimes there’s just bugs for any other reasosn. Good thing I fixed
more than 40 of those bugs in this release!</p><h3id=readline-bug-fixesclass=heading>Readline Bug Fixes
<ahref=#readline-bug-fixesclass=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>The pure Go readline library is good in some ways and bad in others.
A good portion of the bug fixes are for the readline library, and also
related to text input with east asian characters and the like (Korean, Japanese,
etc.)</p><p>A few of the fixes (and additions) include:</p><ul><li>Fixing various crashes, including when there is a “stray” newline at the end of text</li><li>Grid completion menu causing spam and duplicate text when there are items longer than
the terminal and/or contain Japanese or other characters.</li><li>Cursor positioning with CJK characters</li><li>Adding new keybinds and fixing others</li></ul><h3id=other-fixesclass=heading>Other fixes
<ahref=#other-fixesclass=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>There are a lot more fixes, even more than the ones listed here, but these are the main ones:
- Don’t put alias expanded command in history (I’ve fixed this 5 times now….)
- Handle stdin being nonblocking
- Completion related fixes, like showing the full name, completing files with spaces</p><h2id=breaking-changesclass=heading>Breaking changes
<ahref=#breaking-changesclass=heading-link><iclass="fas fa-paperclip"></i></a></h2><p>This release is a major version bump not only because there are tons of fixes, but because
there are breaking changes. This means that there are some changes done which would
cause errors with an old user config (breaking).</p><h3id=lua-54class=heading>Lua 5.4
<ahref=#lua-54class=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>The most important is the use of a new Lua VM library. Previously, Hilbish
used gopher-lua, which implements Lua 5.1. This has been changed to
, which implements Lua 5.4.</p><p>Moving from 5.1 to 5.4 does have breaking changes even if it doesn’t seem like it,
and since these are different Lua implementations, there may be some differences there too.</p><h3id=userdataclass=heading>Userdata
<ahref=#userdataclass=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>Previously, objects such as jobs or timers were represented by tables.
This has been changed to userdata to make more sense.</p><h3id=other-changesclass=heading>Other changes
<ahref=#other-changesclass=heading-link><iclass="fas fa-paperclip"></i></a></h3><p>Runner functions are now required to return a table.
It can (at the moment) have 4 variables:</p><ul><li><code>input</code> (user input)</li><li><code>exitCode</code> (exit code)</li><li><code>error</code> (error message)</li><li><code>continue</code> (whether to prompt for more input)
User input has been added to the return to account for runners wanting to
prompt for continued input, and to add it properly to history. <code>continue</code>
got added so that it would be easier for runners to get continued input
without having to actually handle it at all.</li></ul><p>The MacOS config paths now match Linux, since it makes more sense for
a program like Hilbish.</p><p>The Hilbish greeting is now an <em>opt</em>, and is printed by default.</p><h2id=feature-additionsclass=heading>Feature Additions
<ahref=#feature-additionsclass=heading-link><iclass="fas fa-paperclip"></i></a></h2><p>Besides fixes and changes, this release also includes a good portion of
new features! Users can now add handlers for syntax highlighting and
inline hinting.</p><p>Some new hooks have been added, like <code>hilbish.cancel</code> and <code>hilbish.init</code>.
You can look at all the hooks via the <code>doc hooks</code> command</p><p>Job management functions have also been added. You can now put jobs in the
foreground/background and disown them via the expected commands and also
via the Lua API.</p><p>The <code>hilbish.timers</code> API interface was also added in this release!</p><h2id=closing-offclass=heading>Closing Off
<ahref=#closing-offclass=heading-link><iclass="fas fa-paperclip"></i></a></h2><p>Hilbish has gone from something small and simple for myself to a slightly
advanced shell with a decent amount of features, and a few users. It
still hasn’t reached levels of other alt shells in regards to literally
everything, but the goal is to get there!</p><p>If you want to check the FULL changelog, you can <ahref=https://github.com/Rosettea/Hilbish/releases/tag/v2.0.0target=_blankrel=noopener>do so here.</a>
This v2.0 release marks an advancement in Hilbish (and also how long
one of my projects hasn’t died) and I hope it can advance even further.</p><p>Thanks for reading, and I’ll be back for the v2.1 release notes, or maybe