Closed augustocdias closed 1 year ago
Hello! Your PR made me revisit problem more thoroughly and actually spot problem.
It seems that problem on line 14:
set -l count (echo "$stdin" | _enhancd_command_grep -c "")
should be
set -l count (echo -n "$stdin" | _enhancd_command_grep -c "")
The reason is actually pretty simple, but was hard to spot. Argument for this function read from the stdin with function read -z
that reads everything including last newline. Then new newline added with echo if we are not using -n
option (no newline). This way we always had one empty newline that caused switch never hitting first case.
Fixes #207
Single results are still showing the filter.