Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single results are still showing the filter #207 #220

Closed
wants to merge 1 commit into from

Conversation

augustocdias
Copy link

Fixes #207

Single results are still showing the filter.

@github-actions github-actions bot added area/fish Catch all for changes in fish files missing/bash Denotes a PR that needs to include changes against missing area labels Nov 10, 2023
@Darkclainer
Copy link

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.

@augustocdias augustocdias deleted the branch babarot:master November 13, 2023 11:16
@augustocdias augustocdias deleted the master branch November 13, 2023 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fish Catch all for changes in fish files missing/bash Denotes a PR that needs to include changes against missing area
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Going to existing directory is still showing the filter
2 participants