Skip to content

Conversation

rgoldberg
Copy link
Contributor

Add 2 index arguments to custom shell completion calls.

They indicate to the Swift custom completion function:

  1. the word for which completions are being requested.
  2. the location of the cursor within that word.

Resolve #757

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

They indicate to the Swift custom completion function:

1. the word for which completions are being requested.
2. the location of the cursor within that word.

Signed-off-by: Ross Goldberg <[email protected]>
@rgoldberg
Copy link
Contributor Author

rgoldberg commented May 7, 2025

@natecook1000 This is the last of my completed PRs.

The next one would be for ToolInfoV0 (#758), but that can only be a draft because I think ToolInfoV0 must be updated for completions to be based on it.

I will look into #761 & try to resolve it soon.

Other issues remain with the completions, but all shells should be in a better state than before.

Copy link
Member

@natecook1000 natecook1000 left a comment

Choose a reason for hiding this comment

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

Looks great! I verified locally that the deprecation messages are coming through properly. 👍🏻

@rgoldberg
Copy link
Contributor Author

@natecook1000 Pushed a spacing fix using Scripts/format.sh.

@natecook1000
Copy link
Member

@swift-ci Please test

@natecook1000 natecook1000 merged commit 42585ad into apple:main May 7, 2025
24 checks passed
@rgoldberg rgoldberg deleted the 757-custom-completion-indicies branch May 7, 2025 21:53
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.

Add 2 index parameters to custom shell completion function calls

2 participants