-
Notifications
You must be signed in to change notification settings - Fork 24
Bash completion #226
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 #226
Conversation
_shellcomp/volt
Outdated
| } | ||
|
|
||
| all_plugs() { | ||
| volt list -f "{{ range .Repos }}{{ println .Path }}{{ end }}" | sed -e 's/github\.com\///' | sed -e '/^www\./d' | sort |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed those lines, because the completion is only for username/package.
If the packages, which have to be parsed, were repeated ( because of github and www.github duality), there would be twice the same package in the list and I didn't want this to give me any problems, so I removed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. So how about this?
... | sed -E 's@^(www\.)?github\.com/@@' | sort -u
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes! this solves it!
I didn't know that '-u' option for sort. This is good 👍
_shellcomp/volt
Outdated
| } | ||
|
|
||
| this_plug() { | ||
| volt list -f "{{ range .Profiles }}{{ if eq \"$1\" .Name }}{{ range .ReposPath }}{{ println . }}{{ end }}{{ end }}{{ end }}" | sed -e 's/github\.com\///' | sed -e '/^www\./d' | sort |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
|
oops, wrongly merged into master... this should be merged into devel. |
Fix #225
Add modified version of @AvianY's script.