mission-control icon indicating copy to clipboard operation
mission-control copied to clipboard

Add zsh and bash shell completion

Open srid opened this issue 3 years ago • 4 comments

In the example nix shell, typing , followed by hitting the TAB should auto-complete the user-configured script names (hello and fmt in the case of the example). This should work on both bash and zsh (inasmuch as macOS uses zsh by default).

The code for this could potentially go here:

https://github.com/Platonic-Systems/mission-control/blob/3b1c773f4677b4b892b85363ea252f2be00f7d7d/nix/wrapper.nix#L48-L50

For reference, see how purs-nix implements it: https://github.com/purs-nix/purs-nix/blob/0fae0fd9316a20e2312cfdbcb8135b0e56330e01/purs-nix-command.nix#L254-L271

srid avatar Dec 17 '22 15:12 srid

Should also add -h and --help to the completion list.

srid avatar Dec 19 '22 19:12 srid

https://stackoverflow.com/a/74981309/55246

srid avatar Jan 03 '23 06:01 srid

We have a larger problem: https://github.com/direnv/direnv/issues/443

Even nix develop doesn't provide shell completion for nativeBuildInputs (eg: exa).

srid avatar Jan 29 '23 19:01 srid

The alternative we now recommend supports shell completion through just.

See https://github.com/juspay/just-flake

srid avatar Apr 16 '24 07:04 srid