Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
3.35k stars 97 forks source link

[BUG] $realpath is empty for adb. #325

Closed Freed-Wu closed 1 year ago

Freed-Wu commented 2 years ago

Describe the bug

$realpath is empty for adb.

I can make sure:

To Reproduce

Steps to reproduce the behavior:

  1. Type 'adb pull'
  2. Press Tab

Expected behavior

test
/sdcard/amap

Screenshots

only test

screen-2022-11-04-18-11-34

Environment:

Minimal zshrc

case $group in
  'file/folder on device')
    echo test
    echo $realpath
    # [[ -f $realpath ]] && adb shell cat $realpath || adb shell ls $realpath
    ;;
  'local file/folder')
    less $realpath
    ;;
esac
Aloxaf commented 1 year ago

adb pull's completion result is not a valid path in your host machine.

You can use $ctxt[hpre]$word to get the full path here.

zstyle ':fzf-tab:complete:adb-pull:*' fzf-preview 'echo $ctxt[hpre]$word'
Freed-Wu commented 6 months ago

Similar for dconf, however, $ctxt[hpre]$word cannot work.

zstyle ':fzf-tab:complete:dconf-list:*' fzf-preview 'echo $ctxt[hpre]$word'

Screenshot from 2024-04-24 00-25-40

Expected behaviour: /org/gnome/cheese

Actual: cheese