From c7adf988782fc1b99111d6505845a1c093569712 Mon Sep 17 00:00:00 2001 From: askiiart Date: Thu, 4 Jan 2024 19:41:12 -0500 Subject: [PATCH] Initial commit - command isn't replace yet, just echoed --- README.md | 0 bangbang.fish | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 README.md create mode 100755 bangbang.fish 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