Initial commit - command isn't replace yet, just echoed

This commit is contained in:
askiiart 2024-01-04 19:41:12 -05:00
commit c7adf98878
Signed by untrusted user who does not match committer: askiiart
GPG key ID: BC3800E55FB54D67
2 changed files with 7 additions and 0 deletions

0
README.md Normal file
View file

7
bangbang.fish Executable file
View file

@ -0,0 +1,7 @@
function bangbang --on-event fish_preexec
set -l command $argv
set -l last_command (history --max 1)
set -l new_command (echo $command | sed -e "s/\!\!/$last_command/g")
# TODO: Figure out how to replace the current command and run that instead
echo "*** New command: $new_command ***"
end