facebook / buck

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
https://buck.build
Apache License 2.0
8.56k stars 1.16k forks source link

Shell completions do not autocomplete target names #2548

Open tyvsmith opened 3 years ago

tyvsmith commented 3 years ago

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