withfig/autocomplete

Autocompletion for system commands wrong on macOS

alex-linx opened this issue · 1 comments

Checks

  • I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
  • I have run fig doctor in the affected terminal session
  • I have run fig restart and replicated the issue again

Operating system

macOS 13.3.0 (22E252)

Expected behaviour

When showing autocomplete for the command chsh it shows the option -l/--list-shells. Now --list-shells option does not exist for mac and -l exists but it means something else.
Also for example with mkdir, it shows the option -Z which doesn't exist on macOS.
It would be nice if fig could detect what system it is running on, and give the matching autocomplete options.

Actual behaviour

The autocomplete options are not always reflective of the arguments supported on macos system.

Steps to reproduce

type chsh

Environment

fig-details:
  - 2.15.0
hardware-info:
  - model: 
  - model-id: 
  - chip-id: Apple M2 Max
  - cores: 12
  - mem: 32.00 GB
os-info:
  - macOS 13.3.0 (22E252)
environment:
  - shell: /bin/zsh
  - terminal: iterm
  - install-method: brew
  - env-vars:
    - FIGTERM_SESSION_ID: 88b87970-c161-40db-bf17-f902c3939582
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.15.0
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: com.googlecode.iterm2
    - FIG_PID: 79619
    - FIG_SET_PARENT: 88b87970-c161-40db-bf17-f902c3939582

All of Fig's completion specs are open source. Please create an issue (or contribute the fix!) in the withfig/autocomplete repo.