Skip to content

COMP_* environment variables undocumented #2134

@JoshCooley

Description

@JoshCooley

Product

Terraform

Issue type

New content

Describe your issue to request changes to the content on developer.hashicorp.com. Be specific and provide as much detail as possible. Include page URLs and screenshots if applicable.

I ran into an issue where terraform was behaving in an unexpected way due to COMP_LINE being set in the environment. This causes terraform to shift into the auto-completion mode used by bash/zsh/fish shell completion (via the posener/complete lib).

I would have resolved the issue quicker if all variables used by that library were documented here: https://developer.hashicorp.com/terraform/cli/config/environment-variables

Perhaps that document is not supposed to be exhaustive, but it seems there should be some document that details ALL environment variable used by the core terraform CLI, including those used by any libraries upon which it depends, so that one can search for each argument and environment variable used in the execution environment.

Alternatively, those environment variables could be documented in a page specifically about auto-completion (which I did not find), w/ the environment-variables page linking to it.

I don't think we need to describe what they do, just that they're used for completion, so if terraform is behaving unexpectedly they'll show up in a documentation search.

For posener/complete those variables are:

  • COMP_LINE
  • COMP_POINT
  • COMP_DEBUG

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions