You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when I type ls /tmp/foo/<TAB>, I get this:
❯ ls /tmp/foo/
> bar
2/2
> bar1/
bar2/
And if I press Ctrl-C, I get this:
❯ ls /tmp/foo/
What I would like is for bar to be inserted automatically when I type ls /tmp/foo/<TAB>. There are two ways it could work, and both would work for me.
Just insert bar and not trigger fzf. In other words, fzf triggers only where there is no common prefix (empty query).
Insert bar and then immediately trigger fzf.
❯ ls /tmp/foo/bar
> bar
2/2
> bar1/
bar2/
Note bar in the command line. If I now hit Ctrl-C, bar should be retained.
❯ ls /tmp/foo/bar
Is (1) and/or (2) possible? I think I've seen a similar question with your answer but I cannot find it.
The reason I want this is that I often want to insert long file prefixes and then manually add *. In the example above my goal was perhaps to execute ls /tmp/foo/bar*
The text was updated successfully, but these errors were encountered:
Yes, it's easy to finish basic support -- just insert $query if it exists. But when it comes to a complex scene, it will be hard to deal with prefix/suffix. eg. print ${ZSH\t will turn into print ${ZSH_}, in which } is not expected.
It may take some time to come up with a workaround.
Thanks! Yes, that was the issue I was looking for. The offered solution doesn't work very well. I'll try to come up with something better. Will let you know if I succeed.
Setup:
Currently, when I type
ls /tmp/foo/<TAB>
, I get this:And if I press Ctrl-C, I get this:
What I would like is for
bar
to be inserted automatically when I typels /tmp/foo/<TAB>
. There are two ways it could work, and both would work for me.bar
and not triggerfzf
. In other words,fzf
triggers only where there is no common prefix (emptyquery
).bar
and then immediately triggerfzf
.Note
bar
in the command line. If I now hit Ctrl-C,bar
should be retained.Is (1) and/or (2) possible? I think I've seen a similar question with your answer but I cannot find it.
The reason I want this is that I often want to insert long file prefixes and then manually add
*
. In the example above my goal was perhaps to executels /tmp/foo/bar*
The text was updated successfully, but these errors were encountered: