1
0
Fork 0
mirror of https://github.com/SeriousBug/dotfiles synced 2025-12-07 05:22:34 -06:00
dotfiles/fish/functions/_sponge_on_preexec.fish
Kaan Barmore-Genc 7c6ca0f18b Add Neovim, Fish, Zellij, Htop, and ASDF configurations to Dotter
Migrated all high-priority development configs to Dotter management:
- Neovim: Lazy.nvim setup with hop and mini-surround plugins
- Fish Shell: Complete config with Fisher plugins (done, z, sponge)
- Zellij: Terminal multiplexer with vim-like keybindings
- Htop: System monitor preferences
- ASDF: Version manager configuration

Templates created for git/gitconfig and fish/config.fish to handle
machine-specific variables (git_name, git_email, brew_path).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 22:16:04 -06:00

17 lines
604 B
Fish
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 wasnt 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