Skip to content

Add tab completion for julia +channel selection#1420

Open
IanButterworth wants to merge 1 commit intomainfrom
ib/tab_complete_julia
Open

Add tab completion for julia +channel selection#1420
IanButterworth wants to merge 1 commit intomainfrom
ib/tab_complete_julia

Conversation

@IanButterworth
Copy link
Member

Add shell tab completion so users can type 'julia +' and see available channels. Completions for both juliaup commands and julia channel selection are auto-installed for bash and zsh, and available for all 6 supported shells (bash, zsh, fish, powershell, elvish, nushell).

ian@Mac julia % julia +
1.10          1.11-nightly  1.11.6        1.12-nightly  1.13          1.7           1.9           n             pr60943
1.11          1.11.5        1.12          1.12.4        1.13-nightly  1.8           lts           nightly       release

and julia +pr{tab} etc.

Changes:

  • Add hidden '_list-channels' subcommand that prints sorted installed channel names, used by completion scripts
  • Generate per-shell completion scripts that combine juliaup subcommand completions with julia +channel completions
  • Write pre-generated completion files to ~/.juliaup/completions/ during initial setup and self-update to avoid eval overhead on shell startup
  • Add 'source' line to managed shell init blocks in .bashrc/.zshrc
  • Add hidden '_post-update' subcommand invoked by the old binary after extracting a new one, to refresh completion files and shell init blocks
  • Update README to document auto-installed completions

Add shell tab completion so users can type 'julia +<TAB>' and see
available channels. Completions for both juliaup commands and julia
channel selection are auto-installed for bash and zsh, and available
for all 6 supported shells (bash, zsh, fish, powershell, elvish, nushell).

Changes:
- Add hidden '_list-channels' subcommand that prints sorted installed
  channel names, used by completion scripts
- Generate per-shell completion scripts that combine juliaup subcommand
  completions with julia +channel completions
- Write pre-generated completion files to ~/.juliaup/completions/ during
  initial setup and self-update to avoid eval overhead on shell startup
- Add 'source' line to managed shell init blocks in .bashrc/.zshrc
- Add hidden '_post-update' subcommand invoked by the old binary after
  extracting a new one, to refresh completion files and shell init blocks
- Update README to document auto-installed completions

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant