2024-01-03 17:58:34 -06:00
|
|
|
function bangbang --on-event fish_preexec
|
|
|
|
set -l command $argv
|
2024-01-06 16:40:14 -06:00
|
|
|
set -l last_command (history --max 1)
|
2024-01-03 17:58:34 -06:00
|
|
|
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
|