lincheney / fzf-tab-completion

Tab completion using fzf
GNU General Public License v3.0
623 stars 40 forks source link

Disabling the Tilde-Expansion #106

Open KGoodacre opened 2 months ago

KGoodacre commented 2 months ago

When using tab autocomplete, how can I fix the bash completion so it’ll maintain the “~” instead of expanding the tilde, outputting the full home directory path name.

Running: Linux RedHat CentOS | Bash

Expected Behavior:

$ ~/Fol<TAB>
$ ~/Folder

Current Behavior:

$ ~/Fol<TAB>
$ /home/users/username/Folder

If there are common parts, the tilde appears in the FZF selection menu but once an option is chosen, the tilde is not preserved; instead it outputs the full expanded path. Please provide a quick fix or point me to where I can alter this behavior; it’s frustrating when dealing with shared VMs and long path names.

lincheney commented 1 month ago

Unfortunately I am unable to reproduce this issue. The tilde is preserved when I do the bash tab completion. You may have to try debug this yourself by adding some set -x to the script to see where it is going wrong.