mirror of https://github.com/Hilbis/Hilbish
Compare commits
No commits in common. "e4d87afab3dd46cc784785171dcae46cc22163c4" and "fc82d4f5ebb168d245311a94d84d998b82735a1b" have entirely different histories.
e4d87afab3
...
fc82d4f5eb
24
CHANGELOG.md
24
CHANGELOG.md
|
@ -1,6 +1,6 @@
|
||||||
# 🎀 Changelog
|
# 🎀 Changelog
|
||||||
|
|
||||||
## [2.0.0] - 2022-12-20
|
## Unreleased
|
||||||
**NOTES FOR USERS/PACKAGERS UPDATING:**
|
**NOTES FOR USERS/PACKAGERS UPDATING:**
|
||||||
- Hilbish now uses [Task] insead of Make for builds.
|
- Hilbish now uses [Task] insead of Make for builds.
|
||||||
- The doc format has been changed from plain text to markdown.
|
- The doc format has been changed from plain text to markdown.
|
||||||
|
@ -48,7 +48,7 @@ without arguments will disown the last job.
|
||||||
fields on a job object.
|
fields on a job object.
|
||||||
- Documentation for jobs is now available via `doc jobs`.
|
- Documentation for jobs is now available via `doc jobs`.
|
||||||
- `hilbish.alias.resolve(cmdstr)` to resolve a command alias.
|
- `hilbish.alias.resolve(cmdstr)` to resolve a command alias.
|
||||||
- `hilbish.opts` for shell options.
|
- `hilbish.opts` for shell options. Currently, the only opt is `autocd`.
|
||||||
- `hilbish.editor` interface for interacting with the line editor that
|
- `hilbish.editor` interface for interacting with the line editor that
|
||||||
Hilbish uses.
|
Hilbish uses.
|
||||||
- `hilbish.vim` interface to dynamically get/set vim registers.
|
- `hilbish.vim` interface to dynamically get/set vim registers.
|
||||||
|
@ -83,9 +83,8 @@ disables commands being added to history.
|
||||||
random errors introduced with the new Lua runtime (see [#197])
|
random errors introduced with the new Lua runtime (see [#197])
|
||||||
- `bait.release(name, catcher)` removes `handler` for the named `event`
|
- `bait.release(name, catcher)` removes `handler` for the named `event`
|
||||||
- `exec`, `clear` and `cat` builtin commands
|
- `exec`, `clear` and `cat` builtin commands
|
||||||
- `hilbish.cancel` hook thrown when user cancels input with Ctrl-C
|
- `hilbish.cancel` hook
|
||||||
- 1st item on history is now inserted when history search menu is opened ([#148])
|
- 1st item on history is now inserted when history search menu is opened ([#148])
|
||||||
- Documentation has been improved vastly!
|
|
||||||
|
|
||||||
[#148]: https://github.com/Rosettea/Hilbish/issues/148
|
[#148]: https://github.com/Rosettea/Hilbish/issues/148
|
||||||
[#197]: https://github.com/Rosettea/Hilbish/issues/197
|
[#197]: https://github.com/Rosettea/Hilbish/issues/197
|
||||||
|
@ -93,9 +92,6 @@ random errors introduced with the new Lua runtime (see [#197])
|
||||||
### Changed
|
### Changed
|
||||||
- **Breaking Change:** Upgraded to Lua 5.4.
|
- **Breaking Change:** Upgraded to Lua 5.4.
|
||||||
This is probably one of (if not the) biggest things in this release.
|
This is probably one of (if not the) biggest things in this release.
|
||||||
To recap quickly on what matters (mostly):
|
|
||||||
- `os.execute` returns 3 values instead of 1 (but you should be using `hilbish.run`)
|
|
||||||
- I/O operations must be flushed (`io.flush()`)
|
|
||||||
- **Breaking Change:** MacOS config paths now match Linux.
|
- **Breaking Change:** MacOS config paths now match Linux.
|
||||||
- Overrides on the `hilbish` table are no longer permitted.
|
- Overrides on the `hilbish` table are no longer permitted.
|
||||||
- **Breaking Change:** Runner functions are now required to return a table.
|
- **Breaking Change:** Runner functions are now required to return a table.
|
||||||
|
@ -130,7 +126,7 @@ replacing the last character.
|
||||||
- `hilbish.login` being the wrong value.
|
- `hilbish.login` being the wrong value.
|
||||||
- Put full input in history if prompted for continued input
|
- Put full input in history if prompted for continued input
|
||||||
- Don't put alias expanded command in history (sound familiar?)
|
- Don't put alias expanded command in history (sound familiar?)
|
||||||
- Handle cases of stdin being nonblocking (in the case of [#136](https://github.com/Rosettea/Hilbish/issues/136))
|
- Handle cases of stdin being nonblocking (in the case of [#130](https://github.com/Rosettea/Hilbish/issues/130))
|
||||||
- Don't prompt for continued input if non interactive
|
- Don't prompt for continued input if non interactive
|
||||||
- Don't insert unhandled control keys.
|
- Don't insert unhandled control keys.
|
||||||
- Handle sh syntax error in alias
|
- Handle sh syntax error in alias
|
||||||
|
@ -140,12 +136,11 @@ certain color rules.
|
||||||
- Home/End keys now go to the actual start/end of the input.
|
- Home/End keys now go to the actual start/end of the input.
|
||||||
- Input getting cut off on enter in certain cases.
|
- Input getting cut off on enter in certain cases.
|
||||||
- Go to the next line properly if input reaches end of terminal width.
|
- Go to the next line properly if input reaches end of terminal width.
|
||||||
- Cursor position with CJK characters has been corrected ([#145](https://github.com/Rosettea/Hilbish/pull/145))
|
- Cursor position with CJK characters. ([#145](https://github.com/Rosettea/Hilbish/pull/145))
|
||||||
- Files with same name as parent folder in completions getting cut off [#130](https://github.com/Rosettea/Hilbish/issues/130))
|
- Files with same name as parent folder in completions getting cut off [#136](https://github.com/Rosettea/Hilbish/issues/136))
|
||||||
- `hilbish.which` now works with commanders and aliases.
|
- `hilbish.which` now works with commanders and aliases.
|
||||||
- Background jobs no longer take stdin so they do not interfere with shell
|
- Background jobs no longer take stdin so they do not interfere with shell
|
||||||
input.
|
input.
|
||||||
- Full name of completion entry is used instead of being cut off
|
|
||||||
- Completions are fixed in cases where the query/line is an alias alone
|
- Completions are fixed in cases where the query/line is an alias alone
|
||||||
where it can also resolve to the beginning of command names.
|
where it can also resolve to the beginning of command names.
|
||||||
(reference [this commit](https://github.com/Rosettea/Hilbish/commit/2790982ad123115c6ddbc5764677fdca27668cea))
|
(reference [this commit](https://github.com/Rosettea/Hilbish/commit/2790982ad123115c6ddbc5764677fdca27668cea))
|
||||||
|
@ -167,21 +162,15 @@ an error of missing format variable
|
||||||
- Fix an error with sh syntax in aliases
|
- Fix an error with sh syntax in aliases
|
||||||
- Prompt now works with east asian characters (CJK)
|
- Prompt now works with east asian characters (CJK)
|
||||||
- Set back the prompt to normal after exiting the continue prompt with ctrl-d
|
- Set back the prompt to normal after exiting the continue prompt with ctrl-d
|
||||||
- Take into account newline in input when calculating input width. Prevents
|
|
||||||
extra reprinting of the prompt, but input with newlines inserted is still a problem
|
|
||||||
- Put cursor at the end of input when exiting $EDITOR with Vim mode bind
|
|
||||||
- Calculate width of virtual input properly (completion candidates)
|
|
||||||
- Users can now tab complete files with spaces while quoted or with escaped spaces.
|
- Users can now tab complete files with spaces while quoted or with escaped spaces.
|
||||||
This means a query of `Files\ to\ ` with file names of `Files to tab complete` and `Files to complete`
|
This means a query of `Files\ to\ ` with file names of `Files to tab complete` and `Files to complete`
|
||||||
will result in the files being completed.
|
will result in the files being completed.
|
||||||
- Fixed grid menu display if cell width ends up being the width of the terminal
|
- Fixed grid menu display if cell width ends up being the width of the terminal
|
||||||
- Cut off item names in grid menu if its longer than cell width
|
- Cut off item names in grid menu if its longer than cell width
|
||||||
- Fix completion search menu disappearing
|
- Fix completion search menu disappearing
|
||||||
- Make binary completion work with bins that have spaces in the name
|
|
||||||
- Completion paths having duplicated characters if it's escaped
|
- Completion paths having duplicated characters if it's escaped
|
||||||
- Get custom completion command properly to call from Lua
|
- Get custom completion command properly to call from Lua
|
||||||
- Put proper command on the line when using up and down arrow keys to go through command history
|
- Put proper command on the line when using up and down arrow keys to go through command history
|
||||||
- Don't do anything if length of input rune slice is 0 ([commit for explanation](https://github.com/Rosettea/Hilbish/commit/8d40179a73fe5942707cd43f9c0463dee53eedd8))
|
|
||||||
|
|
||||||
## [2.0.0-rc1] - 2022-09-14
|
## [2.0.0-rc1] - 2022-09-14
|
||||||
This is a pre-release version of Hilbish for testing. To see the changelog,
|
This is a pre-release version of Hilbish for testing. To see the changelog,
|
||||||
|
@ -611,7 +600,6 @@ This input for example will prompt for more input to complete:
|
||||||
|
|
||||||
First "stable" release of Hilbish.
|
First "stable" release of Hilbish.
|
||||||
|
|
||||||
[2.0.0]: https://github.com/Rosettea/Hilbish/compare/v1.2.0...v2.0.0
|
|
||||||
[2.0.0-rc1]: https://github.com/Rosettea/Hilbish/compare/v1.2.0...v2.0.0-rc1
|
[2.0.0-rc1]: https://github.com/Rosettea/Hilbish/compare/v1.2.0...v2.0.0-rc1
|
||||||
[1.2.0]: https://github.com/Rosettea/Hilbish/compare/v1.1.4...v1.2.0
|
[1.2.0]: https://github.com/Rosettea/Hilbish/compare/v1.1.4...v1.2.0
|
||||||
[1.1.0]: https://github.com/Rosettea/Hilbish/compare/v1.0.4...v1.1.0
|
[1.1.0]: https://github.com/Rosettea/Hilbish/compare/v1.0.4...v1.1.0
|
||||||
|
|
|
@ -8,8 +8,7 @@ vars:
|
||||||
BINDIR: '{{default .bindir__ .BINDIR}}'
|
BINDIR: '{{default .bindir__ .BINDIR}}'
|
||||||
libdir__: '{{.PREFIX}}/share/hilbish'
|
libdir__: '{{.PREFIX}}/share/hilbish'
|
||||||
LIBDIR: '{{default .libdir__ .LIBDIR}}'
|
LIBDIR: '{{default .libdir__ .LIBDIR}}'
|
||||||
goflags__: '-ldflags "-s -w -X main.dataDir={{.LIBDIR}}"'
|
GOFLAGS: '-ldflags "-s -w -X main.dataDir={{.LIBDIR}}"'
|
||||||
GOFLAGS: '{{default .goflags__ .GOFLAGS}}'
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
%global _missing_build_ids_terminate_build 0
|
|
||||||
%global debug_package %{nil}
|
|
||||||
|
|
||||||
Name: hilbish-git
|
|
||||||
Version: {{{ git_tag_version }}}.{{{ git_short_hash }}}
|
|
||||||
Release: 1%{?dist}
|
|
||||||
Summary: The flower shell. A comfy and nice little shell for Lua fans!
|
|
||||||
License: MIT
|
|
||||||
|
|
||||||
Source: {{{ git_dir_pack }}}
|
|
||||||
BuildRequires: git golang go-task
|
|
||||||
Requires: inspect succulent lunacolors
|
|
||||||
|
|
||||||
Url: https://github.com/Rosettea/Hilbish
|
|
||||||
VCS: {{{ git_dir_vcs }}}
|
|
||||||
|
|
||||||
%description
|
|
||||||
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.
|
|
||||||
|
|
||||||
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!
|
|
||||||
|
|
||||||
%prep
|
|
||||||
{{{ git_dir_setup_macro }}}
|
|
||||||
sed -i '\|/etc/shells|d' Taskfile.yaml
|
|
||||||
|
|
||||||
%build
|
|
||||||
go-task
|
|
||||||
|
|
||||||
%install
|
|
||||||
go-task install PREFIX=%{buildroot}/usr BINDIR=%{buildroot}/%{_bindir}
|
|
||||||
|
|
||||||
%post
|
|
||||||
if [ "$1" = 1 ]; then
|
|
||||||
if [ ! -f %{_sysconfdir}/shells ] ; then
|
|
||||||
echo "%{_bindir}/hilbish" > %{_sysconfdir}/shells
|
|
||||||
echo "/bin/hilbish" >> %{_sysconfdir}/shells
|
|
||||||
else
|
|
||||||
grep -q "^%{_bindir}/hilbish$" %{_sysconfdir}/shells || echo "%{_bindir}/hilbish" >> %{_sysconfdir}/shells
|
|
||||||
grep -q "^/bin/hilbish$" %{_sysconfdir}/shells || echo "/bin/hilbish" >> %{_sysconfdir}/shells
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun
|
|
||||||
if [ "$1" = 0 ] && [ -f %{_sysconfdir}/shells ] ; then
|
|
||||||
sed -i '\!^%{_bindir}/hilbish$!d' %{_sysconfdir}/shells
|
|
||||||
sed -i '\!^/bin/hilbish$!d' %{_sysconfdir}/shells
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files
|
|
||||||
%doc README.md
|
|
||||||
%license LICENSE
|
|
||||||
%{_bindir}/hilbish
|
|
||||||
%{_datadir}/hilbish
|
|
25
rpkg.macros
25
rpkg.macros
|
@ -1,25 +0,0 @@
|
||||||
function git_short_hash {
|
|
||||||
short_hash="$(cached git_short_hash)"
|
|
||||||
|
|
||||||
if [ -z "$short_hash" ]; then
|
|
||||||
short_hash="$(git rev-parse --short HEAD)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
output "$short_hash"
|
|
||||||
}
|
|
||||||
|
|
||||||
function git_tag_version {
|
|
||||||
tag="$(cached git_tag_version)"
|
|
||||||
|
|
||||||
if [ -z "$tag" ]; then
|
|
||||||
tag="$(git describe --tags --abbrev=0)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove the potential prefix of `v`
|
|
||||||
if [[ $tag =~ ^v[0-9].* ]]; then
|
|
||||||
tag="${tag:1}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
tag="${tag/"-"/"."}"
|
|
||||||
output "$tag"
|
|
||||||
}
|
|
2
vars.go
2
vars.go
|
@ -11,7 +11,7 @@ var (
|
||||||
|
|
||||||
// Version info
|
// Version info
|
||||||
var (
|
var (
|
||||||
ver = "v2.0.0"
|
ver = "v2.0.0-rc1"
|
||||||
releaseName = "Hibiscus"
|
releaseName = "Hibiscus"
|
||||||
gitCommit string
|
gitCommit string
|
||||||
gitBranch string
|
gitBranch string
|
||||||
|
|
|
@ -17,7 +17,7 @@ checkout [the discussion](https://github.com/Rosettea/Hilbish/discussions/165).
|
||||||
|
|
||||||
# Where is the API documentation?
|
# Where is the API documentation?
|
||||||
The builtin `doc` command supplies all documentation of Hilbish provided
|
The builtin `doc` command supplies all documentation of Hilbish provided
|
||||||
APIs. You can also check the sidebar.
|
APIs. This will be on the website in the near future.
|
||||||
|
|
||||||
# Why?
|
# Why?
|
||||||
Hilbish emerged from the desire of a Lua configured shell.
|
Hilbish emerged from the desire of a Lua configured shell.
|
||||||
|
|
|
@ -16,23 +16,6 @@ For the latest **stable release**, check here: https://github.com/Rosettea/Hilbi
|
||||||
For a **development build**: https://nightly.link/Rosettea/Hilbish/workflows/build/master
|
For a **development build**: https://nightly.link/Rosettea/Hilbish/workflows/build/master
|
||||||
|
|
||||||
## Package Repositories
|
## Package Repositories
|
||||||
### Fedora (COPR)
|
|
||||||
An official COPR is offered to install Hilbish easily on Fedora.
|
|
||||||
Enable the repo:
|
|
||||||
```
|
|
||||||
sudo dnf copr enable sammyette/Hilbish
|
|
||||||
```
|
|
||||||
|
|
||||||
And install Hilbish:
|
|
||||||
```
|
|
||||||
sudo dnf install hilbish
|
|
||||||
```
|
|
||||||
|
|
||||||
Or for the latest development build from master:
|
|
||||||
```
|
|
||||||
sudo dnf install hilbish-git
|
|
||||||
```
|
|
||||||
|
|
||||||
### Arch Linux (AUR)
|
### Arch Linux (AUR)
|
||||||
Hilbish is on the AUR. Setup an AUR helper, and install.
|
Hilbish is on the AUR. Setup an AUR helper, and install.
|
||||||
Example with yay:
|
Example with yay:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="container py-3 row">
|
<div class="container py-3 row">
|
||||||
<div class="container" style="width: 240px;">
|
<div class="container" style="width: 240px;">
|
||||||
<div class="p-3 col">
|
<div class="p-3 col">
|
||||||
<ul class="nav nav-pills mb-auto-collapse" id="navbarSupportedContent">
|
<ul class="nav nav-pills mb-auto collapse navbar-collapse" id="navbarSupportedContent">
|
||||||
{{ $currentPage := . }}
|
{{ $currentPage := . }}
|
||||||
{{ range .Site.Menus.docs.ByWeight.Reverse }}
|
{{ range .Site.Menus.docs.ByWeight.Reverse }}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
|
|
Loading…
Reference in New Issue