fifc icon indicating copy to clipboard operation
fifc copied to clipboard

Improve path expansion

Open gazorby opened this issue 3 years ago • 0 comments

The current fix accounts for 99% use cases, but it doesn't completely fix the problem, for example ~root won't work.

See comment by @kidonng in https://github.com/gazorby/fifc/pull/16#discussion_r945158930_

As per the docs, there are four cases where fish understands commandline as path without explicit use of cd:

cases file completion in fifc
1. starting with . ❌ display fish completions but doesn't trigger find/fd
2. starting with /
3. starting with ~ ~/* works but not ~*
4. ending with /

While 3 is a bug, 1 follows the same logic as other completion rules:

If not all item from fish completion output doesn't belong to any particuluar group (path, process ids, commands etc) we use fish completion instead of a custom command to feed fzf.

So when tabbing on .config fifc won't trigger find/fd completion as fish doesn't path-complete.

gazorby avatar Aug 15 '22 11:08 gazorby