Reduce type -q calls by storing awk/filter commands in variables
Avoid reading the whole input before piping it to the fuzzy finder so streaming works
Fix help message not displayed correctly
Fix alt+f shortcut not triggering the filter
WHY
Bring feature parity with zsh (piping) and improve overall latency by storing directories in memory instead of a file and freeing up execution time by moving some checks at shell init.
The existing ~/.enhancd/enhancd.log file will be read to fill the variable if it's empty to make the migration seamless.
The rewrite in _enhancd_filter_interactive.fish is mainly due to avoid buffering so we can take
advantage of finders able to stream stdin, like fzf.
Simplistic benchmarks
Here are some benchmarks with the filter disabled for each version.
WHAT
type -q
calls by storing awk/filter commands in variablesWHY
Bring feature parity with zsh (piping) and improve overall latency by storing directories in memory instead of a file and freeing up execution time by moving some checks at shell init.
The existing
~/.enhancd/enhancd.log
file will be read to fill the variable if it's empty to make the migration seamless.The rewrite in
_enhancd_filter_interactive.fish
is mainly due to avoid buffering so we can take advantage of finders able to stream stdin, like fzf.Simplistic benchmarks
Here are some benchmarks with the filter disabled for each version.
Log file / variable size: 345 Fish version: 3.6.1 Platform: WSL 1.3.15.0
10 runs
Command:
Results:
Latest enhancd (230695f8da8463b18121f58d748851a67be19a00)
perf/in-memory-logs
500 runs
Command:
Results:
Latest enhancd (230695f8da8463b18121f58d748851a67be19a00)
perf/in-memory-logs