apache / apache/buildstream

bash autocompletion affects paths to redirection

Open
#1,316 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
140
Forks
45
Avg merge
1d 3h
Merged PRs (30d)
6

Description

[See original issue on GitLab](https://gitlab.com/BuildStream/buildstream/-/issues/1316)
In GitLab by [[Gitlab user @valentindavid]](https://gitlab.com/valentindavid) on May 22, 2020, 13:39

## Summary

[//]: # (Summarize the bug encountered concisely)

When `element-path` is set, then bash completion applies this path. Unfortunately it also applies to non parameters. For example stream redirections.

## Steps to reproduce

[//]: # (How one can reproduce the issue - this is very important)

With freedestkop-sdk:

```
mkdir my-logs
bst show --deps all bootstrap/bootstrap.bst >m
```

Then try to auto-complete to `my-logs` by pressing tab.

## What is the current bug behavior?

[//]: # (What actually happens)

It does not find `my-logs`, instead it proposes `manifests/` or `multiarch/` which are in `elements`.

## What is the expected correct behavior?

[//]: # (What you should see instead)

It should auto-complete to `my-logs`.

## Relevant logs and/or screenshots

[//]: # (Paste any relevant logs - please use code blocks ``` to format console output, logs, and code as it's hard to read otherwise. You can also add a Snippet and link it here. Check the markdown giude on Gitlab for further tips)

## Possible fixes

[//]: # (If you can, link to the line of code that might be responsible for the problem)

## Other relevant information

[//]: # (Add the BuildStream version. Substitute below the "x" by "1", "2" or the right version. Add more than one version if necessary)

* BuildStream version affected: /milestone %BuildStream_v1.x

----
[//]: # (To review information about possible relevant labels for this issue please view the list of labels: https://gitlab.com/BuildStream/buildstream/labels)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with `bst show --deps all bootstrap/bootstrap.bst >m` in the freedestkop-sdk context, then inspect the bash completion entry point handling `element-path` and redirection targets. Done means pressing Tab completes `my-logs` rather than suggesting paths from `elements` such as `manifests/` or `multiarch/`.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.