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

bashly add completions error #346

Closed
dddachui opened this issue Feb 15, 2023 · 8 comments
Closed

bashly add completions error #346

dddachui opened this issue Feb 15, 2023 · 8 comments
Labels
question Further information is requested

Comments

@dddachui
Copy link

Bashly Version

Latest Ruby Gem

Description

use docker run --rm -it --user $(id -u):$(id -g) --volume "$PWD:/app" dannyben/bashly
and when bashly add completions error

https://bashly.dannyb.co/advanced/bash-completion/#bashly-add-completions
error for this

[ikunOS] 09:52:14 root@dev ~/project/bashly-test bashly  add completions
Usage:
  bashly add colors [--force]
  bashly add comp FORMAT [OUTPUT --force]
  bashly add config [--force]
  bashly add lib [--force]
  bashly add settings [--force]
  bashly add strings [--force]
  bashly add test [--force]
  bashly add validations [--force]
  bashly add yaml [--force]
  bashly add (-h|--help)

Contents of bashly.yml

No response

Reproduction Steps

bashly add completions

Actual Behavior

No response

Expected Behavior

No response

@dddachui dddachui added the bug Something isn't working label Feb 15, 2023
@dddachui
Copy link
Author

The three ways I read the document report errors. Is it my operation problem

@dddachui
Copy link
Author

OS: centos7.9
ruby : ruby 2.0.0p648 (2015-12-16) [x86_64-linux]

@DannyBen
Copy link
Owner

There is a difference in the completion command name between the 0.9.x version and the pre-release 1.0.x

Since you are using the docker image, pull the latest release candidate:

$ docker pull dannyben/bashly

Then check version:

$ docker run --rm -it dannyben/bashly --version
1.0.0.rc1

then run this command to see available libraries to add:

$ docker run --rm -it dannyben/bashly add --list

If you are using the 0.9.x version, it is bashly add comp function instead of bashly add completions

@DannyBen
Copy link
Owner

I will release the final 1.0 version in a few days (maybe tomorrow), so everything will be in sync.

@DannyBen DannyBen added question Further information is requested and removed bug Something isn't working labels Feb 15, 2023
@dddachui
Copy link
Author

ok, i know ,thank you very much!!

@DannyBen
Copy link
Owner

Sure thing - sorry for the confusion, and thanks for taking the time to report.

@dddachui
Copy link
Author

dddachui commented Feb 15, 2023

When I click the TAB auto-complete command, is this "Bash complete" the same as Linux's "bash-complete"?

@DannyBen
Copy link
Owner

the bashly add completions (or bashly add comp in the old version) adds a completions function that provides tab completion. See https://bashly.dannyb.co/advanced/bash-completion/

You can either create a standalone completions script, or a function that is a part of your bashly-generated bash script.
If you do the function, there are a couple of additional steps you need to take, as noted in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants