diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 547673b..6ee4349 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -1,10 +1,8 @@ name: Build website on: - push: - branches: - - master - - docs-refactor + - push + - pull_request jobs: deploy: @@ -21,11 +19,29 @@ jobs: hugo-version: 'latest' extended: true + - name: Set branch name + id: branch + run: echo "::set-output name=BRANCH_NAME::${GITHUB_REF##*/}" + + - name: Fix base URL + if: steps.branch.outputs.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea' + run: sed -i "s%baseURL = 'https://rosettea.github.io/Hilbish/'%baseURL = 'https://rosettea.github.io/Hilbish/versions/${{ steps.branch.outputs.BRANCH_NAME }}'%" website/config.toml + - name: Build run: 'cd website && hugo --minify' - name: Deploy + if: steps.branch.outputs.BRANCH_NAME == 'master' && github.repository_owner == 'Rosettea' uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./website/public + keep_files: true + - name: Deploy + if: steps.branch.outputs.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./website/public + destination_dir: versions/${{ steps.branch.outputs.BRANCH_NAME }} + keep_files: true diff --git a/.hilbishrc.lua b/.hilbishrc.lua index 5d6382b..249f97e 100644 --- a/.hilbishrc.lua +++ b/.hilbishrc.lua @@ -1,18 +1,39 @@ -- Default Hilbish config +local hilbish = require 'hilbish' local lunacolors = require 'lunacolors' local bait = require 'bait' local ansikit = require 'ansikit' +local unreadCount = 0 +local running = false local function doPrompt(fail) hilbish.prompt(lunacolors.format( '{blue}%u {cyan}%d ' .. (fail and '{red}' or '{green}') .. '∆ ' )) end +local function doNotifyPrompt() + if running or unreadCount == hilbish.messages.unreadCount() then return end + + local notifPrompt = string.format('• %s unread notification%s', hilbish.messages.unreadCount(), hilbish.messages.unreadCount() > 1 and 's' or '') + unreadCount = hilbish.messages.unreadCount() + hilbish.prompt(lunacolors.blue(notifPrompt), 'right') + + hilbish.timeout(function() + hilbish.prompt('', 'right') + end, 3000) +end + doPrompt() +bait.catch('command.preexec', function() + running = true +end) + bait.catch('command.exit', function(code) + running = false doPrompt(code ~= 0) + doNotifyPrompt() end) bait.catch('hilbish.vimMode', function(mode) @@ -22,3 +43,7 @@ bait.catch('hilbish.vimMode', function(mode) ansikit.cursorStyle(ansikit.lineCursor) end end) + +bait.catch('hilbish.notification', function(notif) + doNotifyPrompt() +end) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec8db20..36b82da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,32 @@ # 🎀 Changelog ## Unreleased +### Added +- Made a few additions to the sink type: + - `read()` method for retrieving input (so now the `in` sink of commanders is useful) + - `flush()` and `autoFlush()` related to flushing outputs + - `pipe` property to check if a sink with input is a pipe (like stdin) +- Add fuzzy search to history search (enable via `hilbish.opts.fuzzy = true`) +- Show indexes on cdr list +- `hilbish.messages` interface (details in [#219]) +- `hilbish.notification` signal when a message/notification is sent +- `notifyJobFinish` opt to send a notification when background jobs are +completed. + +[#219]: https://github.com/Rosettea/Hilbish/issues/219 ### Fixed - Replaced `sed` in-place editing with `grep` and `mv` for compatibility with BSD utils +## [2.1.2] - 2022-04-10 +### Removed +- Bad april fools code ;( + +## [2.1.1] - 2022-04-01 +### Added +- Validation checks for command input +- Improved runtime performance +- Validate Lua code + ## [2.1.0] - 2022-02-10 ### Added - Documented custom userdata types (Job and Timer Objects) diff --git a/README.md b/README.md index 3a3dbbb..469630b 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,35 @@ -
++🌓 The Moon-powered shell! A comfy and extensible shell for Lua fans! 🌺 ✨ +-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 the new interactive shell for Lua fans.
- Extensible, scriptable, configurable: All in Lua.
+ 🌺 Hilbish is the new Moon-powered interactive shell for Lua fans!
+ Extensible, scriptable, configurable: All in Lua. ✨
Hilbish is your interactive shell as well as a just a Lua interpreter
and enhanced REPL.
Hilbish is known to run on the 3 major platforms (Windows, MacOS, Linux)
- but likely builds on other Unixes!
-
- Windows doesn't work as well as it should, so if you're a Windows user,
+ but likely builds on other Unixes! Windows doesn't work as well as it should,
+ so if you're a Windows user,
say something!
-