Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash completion #207

Merged
merged 5 commits into from
Aug 16, 2022
Merged

Bash completion #207

merged 5 commits into from
Aug 16, 2022

Conversation

outscale-mgo
Copy link
Contributor

add bash completion.

I was originally planing to use COGNAC, but I won't as this require to support FCU, which I doesn't plain to add in COGNAC yet.

thoses patch do:

  • add a rule in pkg/ to auto generate a bash-completion file in pkg/Makefile using bash scripts
  • add the generated file in osc_sdk, and add the path in a newly create MANIFEST.in
  • add --bash-completion option to the cli

I've add a --bash-completion option that print the file

@outscale-mgo outscale-mgo force-pushed the bash-completion branch 2 times, most recently from ba3afa5 to 6a22c35 Compare July 1, 2022 10:53
pkg/Makefile Outdated
@@ -43,7 +43,62 @@ osc-cli-x86_64.zip: osc-cli
osc-cli:
$(SUDO) docker run --rm -v ${PWD}/..:/src outscale/wine-pyinstaller:0.0.1 --distpath ./pkg --clean --name osc-cli osc_sdk/sdk.py

fcu.json:
curl -s https://git.unice.fr/com/foundation_email_edit/-/raw/8702ba3efcb35ab7c4d9240d620582cc52b79eeb/node_modulesold/aws-sdk-apis/apis/ec2-2014-06-15.api.json > fcu.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this specific version is hard to be found online as it is a bit old.
Please secure this file by importing it in this commit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • check original project license

Makefile Outdated
make -C pkg/ osc-cli-completion.bash

osc-cli-completion.bash: pkg/osc-cli-completion.bash
cp pkg/osc-cli-completion.bash .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to remove

print(f.read())
sys.exit()
return 0

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add in README.md how to setup completion

if argc > 1:
for i in range(1, argc):
a = argv[i]
if a == "--bash_completion":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--bash-completion ?

this commit is here in preparation of bash completion script.
as thoses files are big, I put htem in a diferent commit

Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
@jerome-jutteau jerome-jutteau merged commit 7da12d2 into master Aug 16, 2022
@jerome-jutteau jerome-jutteau deleted the bash-completion branch August 16, 2022 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants