commit c7adf988782fc1b99111d6505845a1c093569712 Author: askiiart Date: Thu Jan 4 19:41:12 2024 -0500 Initial commit - command isn't replace yet, just echoed diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/bangbang.fish b/bangbang.fish new file mode 100755 index 0000000..7776751 --- /dev/null +++ b/bangbang.fish @@ -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 \ No newline at end of file