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

Added completion for dart cli #1852

Merged
merged 2 commits into from
Aug 3, 2021

Conversation

tbhaxor
Copy link
Contributor

@tbhaxor tbhaxor commented Mar 15, 2021

Description

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

@tbhaxor tbhaxor changed the title completion (feature): dart cli Added completion for dart cli Mar 15, 2021
Copy link
Member

@NoahGorny NoahGorny left a comment

Choose a reason for hiding this comment

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

hey @tbhaxor, I added some comments, you are welcome to take a look

nice job 😄

completion/available/dart.completion.bash Outdated Show resolved Hide resolved
completion/available/dart.completion.bash Outdated Show resolved Hide resolved
@tbhaxor
Copy link
Contributor Author

tbhaxor commented Mar 16, 2021

@NoahGorny I will fix this in this weekend

I want to add nested completion for pub command

$ dart pub <TAB> <TAB>
cache deps downgrade get global logout outdated publish run upgrade uploader version

How can I achieve this?

Thanks in advance 😄

Copy link
Contributor Author

@tbhaxor tbhaxor left a comment

Choose a reason for hiding this comment

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

@NoahGorny This is done

completion/available/dart.completion.bash Outdated Show resolved Hide resolved
@tbhaxor
Copy link
Contributor Author

tbhaxor commented Mar 26, 2021

@NoahGorny Its done plz chk

Copy link
Member

@NoahGorny NoahGorny left a comment

Choose a reason for hiding this comment

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

Lgtm

@tbhaxor
Copy link
Contributor Author

tbhaxor commented Mar 29, 2021

I want to add nested completion for pub command

$ dart pub <TAB> <TAB>
cache deps downgrade get global logout outdated publish run upgrade uploader version

How can I achieve this?

Thanks in advance

@NoahGorny ping

@NoahGorny
Copy link
Member

I want to add nested completion for pub command

$ dart pub <TAB> <TAB>
cache deps downgrade get global logout outdated publish run upgrade uploader version

How can I achieve this?
Thanks in advance

@NoahGorny ping

I dont understand what you mean, this is my output:

$ dart pub <TAB> <TAB>
cache        downgrade    global       --help       --no-trace   publish      --trace      uploader     --verbose    --version
deps         get          -h           logout       outdated     run          upgrade      -v           --verbosity  version

This is not what you want?

@tbhaxor
Copy link
Contributor Author

tbhaxor commented Apr 1, 2021

@NoahGorny My bad, I wasn't clear enough

See, we have completed for dart, and its arguments like dart pub. But how to add the completion for dart pub add

image

I need to add the completions for dart pub add somehow in pub case

@tbhaxor
Copy link
Contributor Author

tbhaxor commented Apr 1, 2021

@NoahGorny Also for such KB, it's hard to search through pull requests. Should we start GitHub discussions for such things?

@tbhaxor
Copy link
Contributor Author

tbhaxor commented Apr 11, 2021

@NoahGorny Ping 😄

@NoahGorny
Copy link
Member

@NoahGorny My bad, I wasn't clear enough

See, we have completed for dart, and its arguments like dart pub. But how to add the completion for dart pub add

image

I need to add the completions for dart pub add somehow in pub case

You can use the COMP_WORDS variable for that, see what we do in bash-it.completion.bash, there are nice examples there

@NoahGorny
Copy link
Member

I will merge this as is- after I will release a stable version today

@NoahGorny NoahGorny merged commit 9ea290a into Bash-it:master Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants