-
Notifications
You must be signed in to change notification settings - Fork 125
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
Idea: Empty output if no matches #105
Comments
Hello Asbjørn,
Asbjørn Apeland writes:
Currently, if I pipe in some lines to `fzy`, input the garble `oSh3ahngah1e` and press `Enter`, this happens:
```
$ ls | fzy
oSh3ahngah1e
```
I think I would prefer no output in case there is no match:
```
$ ls | fzy
```
I would be easier to use together with a Bash widget I use, that opens a fuzzy find file dialog via `rg` and `fzy`. Then I'd rather get no output than incorrect output for the filename.
What do you think?
[...]
I would find it a bit strange because it would limit the fzy output
to its piped input instead of giving the freedom to type and output
a possible user's input.
I like the dmenu behaviour where:
- `Return' confirms the current selection
- `Shift-Return' confirm the input
E.g.:
% printf "foo\nfooo\nbar\nbaz\n" | dmenu
Typing `f' and pressing `Return' will confirm `foo' (the first
selection), like fzy.
Typing `f' and pressing `Shift-Return' will just output `f'.
|
That makes sense to me. The point I am interested in is, in your example, what happens if I type If I press What do you think about that? |
necessary if not this issue leads to change in upstream `fzf`: jhawthorn/fzy#105
necessary if not this issue leads to change in upstream `fzy`: jhawthorn/fzy#105
Asbjørn Apeland writes:
[...]
That makes sense to me.
The point I am interested in is, in your example, what happens if I type `c`? I would want empty output, as there is no selection (because nothing matches `c`).
What do you think about that?
[...]
In dmenu (both if pressing `Return' or if pressing `Shift+Return')
the same of what happens in fzy: `c' is printed out.
|
That is true, that's what happens in dmenu. I would personally like if it behaved differently. Is that a possibility, or do you think it will not happen? |
Good idea. I would accept a PR which added |
@jhawthorn say:
They forgot to mention the use of cd /usr/bin
$(ls | fzy)
|
Currently, if I pipe in some lines to
fzy
, input the garbleoSh3ahngah1e
and pressEnter
, this happens:I think I would prefer no output in case there is no match:
I would be easier to use together with a Bash widget I use, that opens a fuzzy find file dialog via
rg
andfzy
. Then I'd rather get no output than incorrect output for the filename.What do you think?
The text was updated successfully, but these errors were encountered: