bash-completion icon indicating copy to clipboard operation
bash-completion copied to clipboard

expansion of special vars (`TZ`, `LANG`, etc.) without export or declare?

Open calestyo opened this issue 9 months ago • 1 comments

Describe the feature/solution

Only recently I've noted that bash-completion provides completion of some "special" env vars via: https://github.com/scop/bash-completion/blob/15b74b1050333f425877a7cbd99af2998b95c476/bash_completion#L1257

However, that only seems to be the case after export or declare: https://github.com/scop/bash-completion/blob/15b74b1050333f425877a7cbd99af2998b95c476/completions/export#L28

Not sure whether this would technically be even possible (I tried a few naive approaches, but they all failed ^^)... but could those vars also be exported without export or declare, probably not, cause the completion would need to find out whether the word is an assignment at all possibly places.

But if it were somehow possible, that would be nice, especially as LANG is often already declared and exported, so I typically just set it with the new value, without writing export or declare again.

If not easily possible, than don't hesitate to close this issue as wontfix.

Thanks, Chris.

Maintenance (please complete the following information)

Well I guess this part doesn't apply, since it's not a new program that shall be completed?

  • [ ] This is a request for new completion
  • [ ] Link to upstream project query about shipping the completion:

calestyo avatar Oct 04 '23 22:10 calestyo