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