add history append subcommand

This commit is contained in:
Anurag Singh
2024-04-13 18:21:51 +08:00
committed by Johannes Altmanninger
parent 6f408211a1
commit c044d5e3f0
7 changed files with 30 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
# Note that when a completion file is sourced a new block scope is created so `set -l` works.
set -l __fish_history_all_commands search delete save merge clear clear-session
set -l __fish_history_all_commands search delete save merge clear clear-session append
complete -c history -s h -l help -d "Display help and exit"
@@ -35,3 +35,5 @@ complete -f -c history -n "not __fish_seen_subcommand_from $__fish_history_all_c
-a clear -d "Clears history file"
complete -f -c history -n "not __fish_seen_subcommand_from $__fish_history_all_commands" \
-a clear-session -d "Clears all history from the current session"
complete -f -c history -n "not __fish_seen_subcommand_from $__fish_history_all_commands" \
-a append -d "Appends commands to the history without needing to execute them"