AutoYADM commit: 2025-03-28 18:45:08
This commit is contained in:
parent
393973db39
commit
4606237776
78 changed files with 2856 additions and 1 deletions
16
.config/fish/functions/_sponge_on_preexec.fish
Normal file
16
.config/fish/functions/_sponge_on_preexec.fish
Normal file
|
@ -0,0 +1,16 @@
|
|||
function _sponge_on_preexec --on-event fish_preexec \
|
||||
--argument-names command
|
||||
_sponge_clear_state
|
||||
|
||||
set --global _sponge_current_command $command
|
||||
|
||||
builtin history search --case-sensitive --exact --max=1 --null $command \
|
||||
| read --local --null found_entries
|
||||
|
||||
# If a command is in the history and in the queue, ignore it, like if it wasn’t in the history
|
||||
if test (count $found_entries) -ne 0; and not contains $command $_sponge_queue
|
||||
set --global _sponge_current_command_previously_in_history true
|
||||
else
|
||||
set --global _sponge_current_command_previously_in_history false
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue