Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#75675 - [terraform] fish completion broken; throws error on an unknown flag

Attached to Project: Community Packages
Opened by dmr (dmr) - Tuesday, 23 August 2022, 03:00 GMT
Last edited by Daurnimator (daurnimator) - Friday, 09 September 2022, 00:01 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jerome Leclanche (Adys)
Daurnimator (daurnimator)
Christian Rebischke (Shibumi)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

If I try to complete a terraform command which includes a flag which does not exist for that command, such as `terraform apply -z` (none of apply's flags begin with z), this produces the error from the completion

string join: -z: unknown option

As well as a lot of other debug output.

The problem is caused by the line

set -lx COMP_LINE (string join ' ' (commandline -o))

Which should actually be

set -lx COMP_LINE (string join -- ' ' (commandline -o))

to ensure that flags in the command line are not interpreted as flags to `string join`.

However, another option would be to simply remove the fish completion shipped with the arch terraform package, as the arch fish package ships with its own terraform completion, and the one in the terraform package appears to just shadow the one in the fish package.

~ 19:59 $ pacman -Qi terraform | grep Version
Version : 1.2.7-1
~ 19:59 $ pacman -Qi fish | grep Version
Version : 3.5.1-1
This task depends upon

Closed by  Daurnimator (daurnimator)
Friday, 09 September 2022, 00:01 GMT
Reason for closing:  Implemented
Comment by Daurnimator (daurnimator) - Thursday, 08 September 2022, 23:04 GMT
Indeed it looks like the completions for fish were removed from upstream.
https://github.com/hashicorp/terraform/pull/26717
Comment by Daurnimator (daurnimator) - Friday, 09 September 2022, 00:01 GMT

Loading...