mirror of https://github.com/Hilbis/Hilbish
Compare commits
12 Commits
1e884e7c89
...
84dce8c537
Author | SHA1 | Date |
---|---|---|
sammyette | 84dce8c537 | |
TorchedSammy | 3345c51064 | |
TorchedSammy | a7e450904c | |
TorchedSammy | 23efc8e54d | |
TorchedSammy | 1d4c8a7645 | |
TorchedSammy | 7272e035d9 | |
TorchedSammy | 8a215ad742 | |
TorchedSammy | 6e69ee20f6 | |
TorchedSammy | bc15da2f1a | |
TorchedSammy | dd9e827735 | |
TorchedSammy | 3636efe7f8 | |
TorchedSammy | 053914ec45 |
|
@ -20,8 +20,6 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
|
|
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -1,6 +1,6 @@
|
|||
# 🎀 Changelog
|
||||
|
||||
## [1.1.0] - 2021-03-17
|
||||
## [1.1.0] - 2022-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] - 2021-03-12
|
||||
## [1.0.4] - 2022-03-12
|
||||
### Fixed
|
||||
- Panic when history directory doesn't exist
|
||||
|
||||
## [1.0.3] - 2021-03-12
|
||||
## [1.0.3] - 2022-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] - 2021-03-06
|
||||
## [1.0.2] - 2022-03-06
|
||||
### Fixed
|
||||
- Cases where Hilbish's history directory doesn't exist will no longer cause a panic
|
||||
|
||||
## [1.0.1] - 2021-03-06
|
||||
## [1.0.1] - 2022-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] - 2021-03-06
|
||||
## [1.0.0] - 2022-03-06
|
||||
### Added
|
||||
- MacOS is now officialy supported, default compile time vars have been added
|
||||
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-text.png" width=256><br>
|
||||
<blockquote>
|
||||
🌺 The flower shell. A comfy and nice little shell for Lua users and fans!
|
||||
🌺 The flower shell. A comfy and nice little shell for Lua 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,12 +14,25 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
Hilbish is a Unix-y shell which uses Lua for scripting. Things like the prompt,
|
||||
general configuration and such are done with Lua.
|
||||
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.
|
||||
|
||||
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.
|
||||
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)
|
||||
|
||||
# Screenshots
|
||||
<div align="center">
|
||||
|
@ -54,7 +67,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
|
||||
|
@ -76,13 +89,27 @@ 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 to Hilbish are welcome!
|
||||
Read [CONTRIBUTING.md](CONTRIBUTING.md) before getting started.
|
||||
Any kind of contributions are welcome! Hilbish is very easy to contribute to.
|
||||
Read [CONTRIBUTING.md](CONTRIBUTING.md) as a guideline to doing so.
|
||||
|
||||
**Thanks to everyone below who's contributed!**
|
||||
<a href="https://github.com/Hilbis/Hilbish/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=Hilbis/Hilbish" />
|
||||
<a href="https://github.com/Rosettea/Hilbish/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=Rosettea/Hilbish" />
|
||||
</a>
|
||||
|
||||
*Made with [contributors-img](https://contrib.rocks).*
|
||||
|
|
1
api.go
1
api.go
|
@ -483,6 +483,7 @@ 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() {
|
||||
|
|
|
@ -31,3 +31,10 @@ 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
|
||||
|
|
|
@ -74,7 +74,8 @@ 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.
|
||||
function hilbish.runnerMode() end
|
||||
--- @param mode string|function
|
||||
function hilbish.runnerMode(mode) end
|
||||
|
||||
--- Runs the `cb` function after `time` in milliseconds
|
||||
--- @param cb function
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 99 KiB |
|
@ -78,3 +78,9 @@ 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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue