1
0
Fork 0
mirror of https://github.com/SeriousBug/dotfiles synced 2025-12-06 21:12:08 -06:00
dotfiles/fish/functions/_sponge_on_postexec.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

25 lines
746 B
Fish

function _sponge_on_postexec --on-event fish_postexec
set --global _sponge_current_command_exit_code $status
# Remove command from the queue if it's been added previously
if set --local index (contains --index -- $_sponge_current_command $_sponge_queue)
set --erase _sponge_queue[$index]
end
# Ignore empty commands
if test -n $_sponge_current_command
set --local command ''
# Run filters
for filter in $sponge_filters
if $filter \
$_sponge_current_command \
$_sponge_current_command_exit_code \
$_sponge_current_command_previously_in_history
set command $_sponge_current_command
break
end
end
set --prepend --global _sponge_queue $command
end
end