buck icon indicating copy to clipboard operation
buck copied to clipboard

Shell completions do not autocomplete target names

Open tyvsmith opened this issue 5 years ago • 0 comments

Using Zsh 5.8. Notice two issues.

  1. Once sourced buck-completion.bash, autocomplete for a path ends at ":" but will not suggest available names. This does work in bash.

  2. Autocomplete does not work when referencing paths via "//", only with relative path. This does work in bash.


===============================
word=apps/presidio/helix/app:
prev=build
words:
  bw
  build
  apps/presidio/helix/app:
COMP_TYPE=
root=/Users/tys/code/android
buck_file=apps/presidio/helix/app/BUCK
name_prefix=
target_names='src_release test_release'
  considering target 'src_release'
    adding 'src_release' because it has prefix ''
Adding completion: 'src_release'
  considering target 'test_release'
    adding 'test_release' because it has prefix ''
Adding completion: 'test_release'
==========
COMPREPLY:
  src_release
  test_release
===============================
word=apps/presidio/helix/app:
prev=build
words:
  bw
  build
  apps/presidio/helix/app:
COMP_TYPE=
root=/Users/tys/code/android
buck_file=apps/presidio/helix/app/BUCK
name_prefix=
target_names='src_release test_release'
  considering target 'src_release'
    adding 'src_release' because it has prefix ''
Adding completion: 'src_release'
  considering target 'test_release'
    adding 'test_release' because it has prefix ''
Adding completion: 'test_release'
==========
COMPREPLY:
  src_release
  test_release
===============================
word=apps/presidio/helix/app:
prev=build
words:
  bw
  build
  apps/presidio/helix/app:
COMP_TYPE=
root=/Users/tys/code/android
buck_file=apps/presidio/helix/app/BUCK
name_prefix=
target_names='src_release test_release'
  considering target 'src_release'
    adding 'src_release' because it has prefix ''
Adding completion: 'src_release'
  considering target 'test_release'
    adding 'test_release' because it has prefix ''
Adding completion: 'test_release'
==========
COMPREPLY:
  src_release
  test_release

tyvsmith avatar Sep 28 '20 00:09 tyvsmith