Add fish shell completion by aldisruiz · Pull Request #5954 · wp-cli/wp-cli

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@aldisruiz

Copy link

Contributor

Summary

This pull request adds a Fish shell completion script for wp-cli.

Changes

  • Adds a Fish completion script for the wp command.
  • Handles file completions when completions include <file> .
  • Handles unnecessary whitespace in completions.

Testing

  • Tested in Fish shell version 3.7.1.
  • Verified completions for various wp commands and options.
  • Works with aliases when in a directory that contains them.

Documentation

Included a link to the Fish shell documentation for where to put completions.

Retro64XYZ reacted with hooray emoji
Add Fish shell dynamic completions for wp-cli.

@aldisruiz aldisruiz requested a review from a team as a code owner

May 31, 2024 03:38

@Retro64XYZ

Copy link

This works for me. Thank you for creating this.

@ernilambar

Copy link

Member

I have tested PR locally and it is working as expected.

@aldisruiz Can you please create PR with the instruction for setting up Fish tab completion? Suitable place for the instruction is here https://github.com/wp-cli/handbook/blob/main/installing.md#tab-completions

pothi reacted with thumbs up emoji

@ernilambar ernilambar added this to the 2.11.0 milestone

Jun 6, 2024

@ernilambar ernilambar merged commit f7db3c1 into wp-cli:main

Jun 17, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ernilambar ernilambar ernilambar approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

2.11.0

Development

Successfully merging this pull request may close these issues.

3 participants

@aldisruiz @Retro64XYZ @ernilambar