From a8ddb5f764078a6dc41670aa31384cf45912ce1d Mon Sep 17 00:00:00 2001 From: PassiveLemon Date: Fri, 22 Dec 2023 20:00:14 -0500 Subject: [PATCH] Add instructions for Hilbish shell --- Shell-aliases.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Shell-aliases.md b/Shell-aliases.md index 4c09252..10aacc0 100644 --- a/Shell-aliases.md +++ b/Shell-aliases.md @@ -91,4 +91,17 @@ in wsl you may also have to put `export PATH="$PATH:~/.local/bin/"` before the a ``` export PATH="$PATH:~/.local/bin/" eval $(thefuck --alias fuck) +``` + +# Hilbish +Make sure you import the commander library: +```lua +local commander = require 'commander' +``` + +`hilbish.history.get(hilbish.history.size() - 1)` will load the last typed command so you can put it into an alias here: +```lua +commander.register("fuck", function() + os.execute("thefuck " .. hilbish.history.get(hilbish.history.size() - 1)) +end) ``` \ No newline at end of file