feat: add executed commands to history

This commit is contained in:
iff 2025-04-10 16:39:31 +02:00
parent 7d41d2ba43
commit 3b9b2c662e
8 changed files with 114 additions and 21 deletions

5
core/templates/eval.bash Normal file
View file

@ -0,0 +1,5 @@
history -s {{ command }};
{%- if let Some(cd) = self.cd %}
cd {{ cd }}
{% endif %}

6
core/templates/eval.fish Normal file
View file

@ -0,0 +1,6 @@
builtin history append "{{ command }}";
builtin history merge;
{%- if let Some(cd) = self.cd %}
cd {{ cd }}
{% endif %}

3
core/templates/eval.nu Normal file
View file

@ -0,0 +1,3 @@
{%- if let Some(cd) = self.cd %}
{{ cd }}
{% endif %}

3
core/templates/eval.sh Normal file
View file

@ -0,0 +1,3 @@
{%- if let Some(cd) = self.cd %}
cd {{ cd }}
{% endif %}

5
core/templates/eval.zsh Normal file
View file

@ -0,0 +1,5 @@
print -s {{ command }};
{%- if let Some(cd) = self.cd %}
cd {{ cd }}
{% endif %}