In our current local WIP state, the dotfiles-search-commits helper has evolved well beyond its original form as a simple alias for grepping commit logs. It now supports multiple modes (log, log-recent, code) with aliases, regex options (basic/extended/perl), structured help/error handling, implicit fallbacks for common cases, and clearer usage examples.
While this expansion significantly improves usability, it also introduces complexity around return vs exit behavior when defined as a shell function inside aliases.zsh. Sourcing functions that use exit can inadvertently terminate the entire interactive shell session. At this stage, it’s more sustainable to promote this into a proper bin/ script so that it behaves like a standalone CLI tool without these caveats.
Remaining TODOs / Known Issues:
See Also
In our current local WIP state, the
dotfiles-search-commitshelper has evolved well beyond its original form as a simple alias for grepping commit logs. It now supports multiple modes (log,log-recent,code) with aliases, regex options (basic/extended/perl), structured help/error handling, implicit fallbacks for common cases, and clearer usage examples.While this expansion significantly improves usability, it also introduces complexity around
returnvsexitbehavior when defined as a shell function insidealiases.zsh. Sourcing functions that useexitcan inadvertently terminate the entire interactive shell session. At this stage, it’s more sustainable to promote this into a properbin/script so that it behaves like a standalone CLI tool without these caveats.Remaining TODOs / Known Issues:
zsh/aliases.zshintobin/dotfiles-search-commits(orbin/dotfiles-history? which should be the name and which the alias?) for safer execution.bin/script (if they are still needed)inner_function_test).return_or_exitand similar hacks once promoted to a proper script.See Also