We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Is it possible to enable bash completion ?
I've tried terraform -install-autocomplete but don't work.
terraform -install-autocomplete
And i found this bash completion script from gist
The text was updated successfully, but these errors were encountered:
Sorry , terraform -install-autocomplete works. I forget restart my shell.
But is it possbile that enable bash completion by default with snap?
Sorry, something went wrong.
+1 on this.
Doing quick examination, terraform -install-autocomplete simply adds the following line to your bashrc:
complete -C /snap/terraform/711/terraform terraform
(Or I guess equivalent for the particular revision.)
A completion file that simply contains complete -C /snap/bin/terraform terraform and a completer key in the app entry should be sufficient.
complete -C /snap/bin/terraform terraform
Hmm, gave that a go locally, but no dice.
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index c86522d..398fb3a 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -30,6 +30,7 @@ icon: snap/gui/terraform.png apps: terraform: command: terraform + completer: terraform-completer platforms: amd64: @@ -56,5 +57,9 @@ parts: go mod download go build -ldflags "${LDFLAGS}" cp terraform $SNAPCRAFT_PART_INSTALL/terraform + + echo -e '#!/usr/bin/env bash\ncomplete -C terraform terraform' > $CRAFT_PART_INSTALL/terraform-completer + chmod +x $CRAFT_PART_INSTALL/terraform-completer stage: - terraform + - terraform-completer
Will try a bit later if I get time, but feel free to have a play!
No branches or pull requests
What changes would you like?
Is it possible to enable bash completion ?
Any extra information?
I've triedterraform -install-autocomplete
but don't work.And i found this bash completion script from gist
The text was updated successfully, but these errors were encountered: