Compare commits

..

No commits in common. "84dce8c53781f95d14e87e55ab8f527b87647f58" and "1e884e7c89da58df3b31690345b12c9473f84e30" have entirely different histories.

11 changed files with 23 additions and 63 deletions

View File

@ -12,14 +12,16 @@ jobs:
matrix:
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
exclude:
- goarch: "386"
goos: darwin
goos: darwin
- goarch: arm64
goos: windows
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v2
with:

View File

@ -1,6 +1,6 @@
# 🎀 Changelog
## [1.1.0] - 2022-03-17
## [1.1.0] - 2021-03-17
### Added
- `hilbish.vimAction` hook (`doc vimMode actions`)
- `command.not-executable` hook (will replace `command.no-perm` in a future release)
@ -16,26 +16,26 @@
- Fix removal of dot in the beginning of folders/files that have them for file complete
- Fix prompt being set to the continue prompt even when exited
## [1.0.4] - 2022-03-12
## [1.0.4] - 2021-03-12
### Fixed
- Panic when history directory doesn't exist
## [1.0.3] - 2022-03-12
## [1.0.3] - 2021-03-12
### Fixed
- Removed duplicate executable suggestions
- User input is added to history now instead of what's ran by Hilbish
- Formatting issue with prompt on no input
## [1.0.2] - 2022-03-06
## [1.0.2] - 2021-03-06
### Fixed
- Cases where Hilbish's history directory doesn't exist will no longer cause a panic
## [1.0.1] - 2022-03-06
## [1.0.1] - 2021-03-06
### Fixed
- Using `hilbish.appendPath` will no longer result in string spam (debugging thing left being)
- Prompt gets set properly on startup
## [1.0.0] - 2022-03-06
## [1.0.0] - 2021-03-06
### Added
- MacOS is now officialy supported, default compile time vars have been added
for it

View File

@ -2,7 +2,7 @@
<img src="./assets/hilbish-flower.png" width=128><br>
<img src="./assets/hilbish-text.png" width=256><br>
<blockquote>
🌺 The flower shell. A comfy and nice little shell for Lua fans!
🌺 The flower shell. A comfy and nice little shell for Lua users and fans!
</blockquote>
<p align="center">
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/Rosettea/Hilbish?style=flat-square">
@ -14,25 +14,12 @@
</p>
</div>
Hilbish is a extensible shell (framework). It was made to be very customizable
via the Lua programming language. It aims to be easy to use for the casual
people but powerful for those who want to tinker more with their shell,
the thing used to interface with most of the system.
Hilbish is a Unix-y shell which uses Lua for scripting. Things like the prompt,
general configuration and such are done with Lua.
The motivation for choosing Lua was that its simpler and better to use
than old shell script. It's fine for basic interactive shell uses,
but that's the only place Hilbish has shell script; everything else is Lua
and aims to be infinitely configurable. If something isn't, open an issue!
# Table of Contents
- [Screenshots](#Screenshots)
- [Installation](#Installation)
- [Prebuilt Bins](#Prebuilt-binaries)
- [AUR](#AUR)
- [Nixpkgs](#Nixpkgs)
- [Manual Build](#Manual-Build)
- [Getting Started](#Getting-Started)
- [Contributing](#Contributing)
For interactive use, it uses a library to run sh which works on all
platforms Hilbish can be compiled for. It can also act as a Lua REPL if you want
it to be.
# Screenshots
<div align="center">
@ -67,7 +54,7 @@ If you're new to nix you should probably read up on how to do that [here](https:
### Prerequisites
- [Go 1.17+](https://go.dev)
### Build
#### Build
First, clone Hilbish. The recursive is required, as some Lua libraries
are submodules.
```sh
@ -89,27 +76,13 @@ make build
After you did all that, run `sudo make install` to install Hilbish globally.
# Getting Started
At startup, you should see a message which says to run a `guide` command.
This guide is a *very* simple and basic step through text of what Hilish is
and where to find documentation.
Documentation is primarily viewed via the in shell `doc` command.
Autogenerated function docs and general docs about other things are included
there, so be sure to read it.
Using Hilbish is the same as using any other Linux shell, with an addition
that you can also run Lua. Hilbish can also act as an enhanced Lua REPL
via `hilbish.runnerMode 'lua'`. To switch back to normal, use
`hilbish.runnerMode 'hybrid'`.
# Contributing
Any kind of contributions are welcome! Hilbish is very easy to contribute to.
Read [CONTRIBUTING.md](CONTRIBUTING.md) as a guideline to doing so.
Any kind of contributions to Hilbish are welcome!
Read [CONTRIBUTING.md](CONTRIBUTING.md) before getting started.
**Thanks to everyone below who's contributed!**
<a href="https://github.com/Rosettea/Hilbish/graphs/contributors">
<img src="https://contrib.rocks/image?repo=Rosettea/Hilbish" />
<a href="https://github.com/Hilbis/Hilbish/graphs/contributors">
<img src="https://contrib.rocks/image?repo=Hilbis/Hilbish" />
</a>
*Made with [contributors-img](https://contrib.rocks).*

1
api.go
View File

@ -483,7 +483,6 @@ func hlinputMode(L *lua.LState) int {
// Accepted values for mode are hybrid (the default), hybridRev (sh first then Lua),
// sh, and lua. It also accepts a function, to which if it is passed one
// will call it to execute user input instead.
// --- @param mode string|function
func hlrunnerMode(L *lua.LState) int {
mode := L.CheckAny(1)
switch mode.Type() {

View File

@ -31,10 +31,3 @@ and also provides the sh and Lua runner functions that Hilbish itself uses.
A runner function is expected to return 2 values: the exit code, and an error.
The exit code has to be a number, it will be 0 otherwise and the error can be
`nil` to indicate no error.
## Functions
These are the functions for the `hilbish.runner` interface
+ setMode(mode) > The same as `hilbish.runnerMode`
+ sh(input) -> code, err > Runs `input` in Hilbish's sh interpreter
+ lua(input) -> code, err > Evals `input` as Lua code

View File

@ -74,8 +74,7 @@ function hilbish.run(cmd) end
--- Accepted values for mode are hybrid (the default), hybridRev (sh first then Lua),
--- sh, and lua. It also accepts a function, to which if it is passed one
--- will call it to execute user input instead.
--- @param mode string|function
function hilbish.runnerMode(mode) end
function hilbish.runnerMode() end
--- Runs the `cb` function after `time` in milliseconds
--- @param cb function

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View File

@ -78,9 +78,3 @@ func (h *fileHistory) Len() int {
func (h *fileHistory) Dump() interface{} {
return h.items
}
func (h *fileHistory) clear() {
h.items = []string{}
h.f.Truncate(0)
h.f.Sync()
}

2
rl.go
View File

@ -271,6 +271,6 @@ func (lr *lineReader) luaAllHistory(L *lua.LState) int {
}
func (lr *lineReader) luaClearHistory(l *lua.LState) int {
fileHist.clear()
return 0
}