refactor!: initialization through templates

This commit is contained in:
iff 2025-04-05 18:31:45 +02:00
parent 4f637c1e1b
commit 885dc081e1
9 changed files with 230 additions and 211 deletions

9
core/templates/init.fish Normal file
View file

@ -0,0 +1,9 @@
function {{ alias }} -d "Suggest fixes to the previous command"
eval $(_PR_LAST_COMMAND="$(history | head -n 1)" _PR_ALIAS="$(alias)" _PR_SHELL="fish" "{{ binary_path }}")
end
{%if cnf %}
function fish_command_not_found --on-event fish_command_not_found
eval $(_PR_LAST_COMMAND="$argv" _PR_ALIAS="$(alias)" _PR_SHELL="fish" _PR_MODE="cnf" "{{ binary_path }}")
end
{% endif %}