Skip to content

feat: add shell completion for installed versions in use and uninstall commands#585

Merged
kvendingoldo merged 1 commit intotofuutils:mainfrom
jakubfronczyk:feat/shell-completion-installed-versions
Apr 29, 2026
Merged

feat: add shell completion for installed versions in use and uninstall commands#585
kvendingoldo merged 1 commit intotofuutils:mainfrom
jakubfronczyk:feat/shell-completion-installed-versions

Conversation

@jakubfronczyk
Copy link
Copy Markdown
Contributor

@jakubfronczyk jakubfronczyk commented Apr 29, 2026

Issue #420

Currently tenv <tool> use, tenv <tool> uninstall and tenv <tool> install offer no shell completion for the version argument. Pressing Tab falls back to filename suggestions.

Added ValidArgsFunction to all three commands:

  • use and uninstall suggest locally installed versions via ListLocal (sorted order)
  • install suggests version strategy keywords (latest, latest-stable, latest-pre, latest-allowed, min-required) since it downloads from remote

InitDisplayer is called at the start of each function since it runs before RunE and is required before any filesystem operation that may log.

Tested manually with zsh on macOS.

  commands

Signed-off-by: jakubfronczyk <jakubfronczyk@gmail.com>
@jakubfronczyk jakubfronczyk force-pushed the feat/shell-completion-installed-versions branch from 6fc5528 to ce392ce Compare April 29, 2026 09:09
Copy link
Copy Markdown
Collaborator

@kvendingoldo kvendingoldo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks!

@kvendingoldo kvendingoldo merged commit b5612c8 into tofuutils:main Apr 29, 2026
4 checks passed
@kvendingoldo
Copy link
Copy Markdown
Collaborator

Tested on Ubuntu as well. Thanks again!

Screenshot 2026-04-29 at 16 09 00

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.

2 participants