Open aude opened 5 years ago
Hello Asbjørn,
Asbjørn Apeland writes:
Currently, if I pipe in some lines to
fzy
, input the garbleoSh3ahngah1e
and pressEnter
, 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
andfzy
. 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:
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 c
?
If I press Return
, I would want empty output, as there is no selection (because nothing matches c
).
If I press Shift+Return
, it might be a good idea to just output c
. It sounds like you've got more experience than me there.
What do you think about that?
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 matchesc
).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 --only-exact
(or something similar) but I'd like to keep the default behaviour.
@jhawthorn say:
I would accept a PR which added --only-exact
They forgot to mention the use of fzy
, which requires an exact match:
cd /usr/bin
$(ls | fzy)
--only-exact
is needed.
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?