withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.05k stars 63 forks source link

`loadSpec` not working at the spec level #281

Closed QuiiBz closed 2 years ago

QuiiBz commented 3 years ago

Sanity checks

Issue Details

Summary

The loadSpec property does not work at the spec level, only on sub-commands.

Steps to Reproduce

export const completionSpec: Fig.Spec = {
  name: "pnpx",
  description: "Execute binaries from npm packages",
  loadSpec: "npx",
};

Expected Results

The spec above (pnpx) should load the npx spec (they share the same api)

Actual Results

Nothing is suggested

Environment

Version 1.0.46 (B242) [Beta] [Dev] [French – PC] 
UserShell: /bin/zsh
Bundle path: /Applications/Fig.app
Autocomplete: true
Settings.json: true
CLI installed: true
CLI tool path: /Users/tom/.fig/bin/fig
Accessibility: true
Number of specs: 141
SSH Integration: true
Tmux Integration: false
Keybindings path: /Users/tom/.fig/user/keybindings
iTerm Integration: true 
Hyper Integration: true
VSCode Integration: true
Docker Integration: false
Symlinked dotfiles: false
Only insert on tab: false
Installation Script: true
PseudoTerminal Path: /Users/tom/.nvm/versions/node/v15.9.0/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/Users/tom/.cargo/bin:/usr/ucb:/Users/tom/.fig/bin
SecureKeyboardInput: false
SecureKeyboardProcess: <none>
Current active process: /bin/zsh (9513) - ttys004
Current working directory: /Users/tom/dev/fig/autocomplete
Current window identifier: 236/code:9503% (com.microsoft.VSCode)
PATH: /Users/tom/.nvm/versions/node/v15.9.0/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/Users/tom/.cargo/bin:/Users/tom/.fig/bin
FIG_INTEGRATION_VERSION: 4

More Detail

No response

Anything else?

No response

mschrage commented 2 years ago

Using loadSpec at the top level now works as expected!