More descriptive alias
This is my quick and dirty way to solve the problem mentioned in https://github.com/Aloxaf/fzf-tab/issues/394
Not even certain if this is the correct approach (not very efficient to me) - feel free to close mine and make another PR if a better approach exists.
Short demo: https://youtu.be/L-Yml_kN9eU
This is a really neat feature. It however doesn't work when fzf-tab-source is used.
Can be tested with the following:
cd /tmp
cd "$(mktemp -d -- "${PWD}/tmp.XXXXXXXXXX")"
git clone https://github.com/oldfatcrab/fzf-tab
git clone https://github.com/Freed-Wu/fzf-tab-source
> minzshrc << 'EOF'
autoload -Uz compinit
compinit
zstyle ':completion:*:descriptions' format '[%d]'
alias tree='tree -a -I .git'
source fzf-tab/fzf-tab.plugin.zsh
source fzf-tab-source/fzf-tab-source.plugin.zsh
EOF
Then just run zsh -d -f
and then:
source minzshrc
tree will only show its alias content when fzf-tab-source is commented
@Sneethe at first I thought it was my branch is too old but it wasn't caused by that.
I am not even certain that my change is proper because the searching is not (that) efficient.
My recommendation is to check how zstyle ':fzf-tab:complete:*:*' fzf-preview is set in fzf-tab-source.
On my machine I set it like this
So the preview for directories works for me like:
@Sneethe Actually I just (briefly) went through the code of fzf-tab-source, and I think it is better for you to submit a feature request - I think a code change on that side could yield more sufficient result.