mirror of https://github.com/Hilbis/Hilbish
Compare commits
No commits in common. "84dce8c53781f95d14e87e55ab8f527b87647f58" and "1e884e7c89da58df3b31690345b12c9473f84e30" have entirely different histories.
84dce8c537
...
1e884e7c89
|
@ -20,6 +20,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
|
|
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -1,6 +1,6 @@
|
||||||
# 🎀 Changelog
|
# 🎀 Changelog
|
||||||
|
|
||||||
## [1.1.0] - 2022-03-17
|
## [1.1.0] - 2021-03-17
|
||||||
### Added
|
### Added
|
||||||
- `hilbish.vimAction` hook (`doc vimMode actions`)
|
- `hilbish.vimAction` hook (`doc vimMode actions`)
|
||||||
- `command.not-executable` hook (will replace `command.no-perm` in a future release)
|
- `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 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
|
- Fix prompt being set to the continue prompt even when exited
|
||||||
|
|
||||||
## [1.0.4] - 2022-03-12
|
## [1.0.4] - 2021-03-12
|
||||||
### Fixed
|
### Fixed
|
||||||
- Panic when history directory doesn't exist
|
- Panic when history directory doesn't exist
|
||||||
|
|
||||||
## [1.0.3] - 2022-03-12
|
## [1.0.3] - 2021-03-12
|
||||||
### Fixed
|
### Fixed
|
||||||
- Removed duplicate executable suggestions
|
- Removed duplicate executable suggestions
|
||||||
- User input is added to history now instead of what's ran by Hilbish
|
- User input is added to history now instead of what's ran by Hilbish
|
||||||
- Formatting issue with prompt on no input
|
- Formatting issue with prompt on no input
|
||||||
|
|
||||||
## [1.0.2] - 2022-03-06
|
## [1.0.2] - 2021-03-06
|
||||||
### Fixed
|
### Fixed
|
||||||
- Cases where Hilbish's history directory doesn't exist will no longer cause a panic
|
- 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
|
### Fixed
|
||||||
- Using `hilbish.appendPath` will no longer result in string spam (debugging thing left being)
|
- Using `hilbish.appendPath` will no longer result in string spam (debugging thing left being)
|
||||||
- Prompt gets set properly on startup
|
- Prompt gets set properly on startup
|
||||||
|
|
||||||
## [1.0.0] - 2022-03-06
|
## [1.0.0] - 2021-03-06
|
||||||
### Added
|
### Added
|
||||||
- MacOS is now officialy supported, default compile time vars have been added
|
- MacOS is now officialy supported, default compile time vars have been added
|
||||||
for it
|
for it
|
||||||
|
|
49
README.md
49
README.md
|
@ -2,7 +2,7 @@
|
||||||
<img src="./assets/hilbish-flower.png" width=128><br>
|
<img src="./assets/hilbish-flower.png" width=128><br>
|
||||||
<img src="./assets/hilbish-text.png" width=256><br>
|
<img src="./assets/hilbish-text.png" width=256><br>
|
||||||
<blockquote>
|
<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>
|
</blockquote>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/Rosettea/Hilbish?style=flat-square">
|
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/Rosettea/Hilbish?style=flat-square">
|
||||||
|
@ -14,25 +14,12 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Hilbish is a extensible shell (framework). It was made to be very customizable
|
Hilbish is a Unix-y shell which uses Lua for scripting. Things like the prompt,
|
||||||
via the Lua programming language. It aims to be easy to use for the casual
|
general configuration and such are done with Lua.
|
||||||
people but powerful for those who want to tinker more with their shell,
|
|
||||||
the thing used to interface with most of the system.
|
|
||||||
|
|
||||||
The motivation for choosing Lua was that its simpler and better to use
|
For interactive use, it uses a library to run sh which works on all
|
||||||
than old shell script. It's fine for basic interactive shell uses,
|
platforms Hilbish can be compiled for. It can also act as a Lua REPL if you want
|
||||||
but that's the only place Hilbish has shell script; everything else is Lua
|
it to be.
|
||||||
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)
|
|
||||||
|
|
||||||
# Screenshots
|
# Screenshots
|
||||||
<div align="center">
|
<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
|
### Prerequisites
|
||||||
- [Go 1.17+](https://go.dev)
|
- [Go 1.17+](https://go.dev)
|
||||||
|
|
||||||
### Build
|
#### Build
|
||||||
First, clone Hilbish. The recursive is required, as some Lua libraries
|
First, clone Hilbish. The recursive is required, as some Lua libraries
|
||||||
are submodules.
|
are submodules.
|
||||||
```sh
|
```sh
|
||||||
|
@ -89,27 +76,13 @@ make build
|
||||||
|
|
||||||
After you did all that, run `sudo make install` to install Hilbish globally.
|
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
|
# Contributing
|
||||||
Any kind of contributions are welcome! Hilbish is very easy to contribute to.
|
Any kind of contributions to Hilbish are welcome!
|
||||||
Read [CONTRIBUTING.md](CONTRIBUTING.md) as a guideline to doing so.
|
Read [CONTRIBUTING.md](CONTRIBUTING.md) before getting started.
|
||||||
|
|
||||||
**Thanks to everyone below who's contributed!**
|
**Thanks to everyone below who's contributed!**
|
||||||
<a href="https://github.com/Rosettea/Hilbish/graphs/contributors">
|
<a href="https://github.com/Hilbis/Hilbish/graphs/contributors">
|
||||||
<img src="https://contrib.rocks/image?repo=Rosettea/Hilbish" />
|
<img src="https://contrib.rocks/image?repo=Hilbis/Hilbish" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
*Made with [contributors-img](https://contrib.rocks).*
|
*Made with [contributors-img](https://contrib.rocks).*
|
||||||
|
|
1
api.go
1
api.go
|
@ -483,7 +483,6 @@ func hlinputMode(L *lua.LState) int {
|
||||||
// Accepted values for mode are hybrid (the default), hybridRev (sh first then Lua),
|
// 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
|
// sh, and lua. It also accepts a function, to which if it is passed one
|
||||||
// will call it to execute user input instead.
|
// will call it to execute user input instead.
|
||||||
// --- @param mode string|function
|
|
||||||
func hlrunnerMode(L *lua.LState) int {
|
func hlrunnerMode(L *lua.LState) int {
|
||||||
mode := L.CheckAny(1)
|
mode := L.CheckAny(1)
|
||||||
switch mode.Type() {
|
switch mode.Type() {
|
||||||
|
|
|
@ -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.
|
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
|
The exit code has to be a number, it will be 0 otherwise and the error can be
|
||||||
`nil` to indicate no error.
|
`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
|
|
||||||
|
|
|
@ -74,8 +74,7 @@ function hilbish.run(cmd) end
|
||||||
--- Accepted values for mode are hybrid (the default), hybridRev (sh first then Lua),
|
--- 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
|
--- sh, and lua. It also accepts a function, to which if it is passed one
|
||||||
--- will call it to execute user input instead.
|
--- will call it to execute user input instead.
|
||||||
--- @param mode string|function
|
function hilbish.runnerMode() end
|
||||||
function hilbish.runnerMode(mode) end
|
|
||||||
|
|
||||||
--- Runs the `cb` function after `time` in milliseconds
|
--- Runs the `cb` function after `time` in milliseconds
|
||||||
--- @param cb function
|
--- @param cb function
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 114 KiB |
|
@ -78,9 +78,3 @@ func (h *fileHistory) Len() int {
|
||||||
func (h *fileHistory) Dump() interface{} {
|
func (h *fileHistory) Dump() interface{} {
|
||||||
return h.items
|
return h.items
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *fileHistory) clear() {
|
|
||||||
h.items = []string{}
|
|
||||||
h.f.Truncate(0)
|
|
||||||
h.f.Sync()
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue