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 completions for xtools #207

Open
gt7-void opened this issue Apr 1, 2021 · 0 comments
Open

bash completions for xtools #207

gt7-void opened this issue Apr 1, 2021 · 0 comments

Comments

@gt7-void
Copy link

gt7-void commented Apr 1, 2021

There are some zsh completions but not bash completions. Here's a first attempt for some useful commands:

__load_completion xbps

_xi() {
	shift
	_xbps_complete xbps-install "$@"
}

_xls() {
	shift
	_xbps_complete xbps-query "$@"
}

_xq() {
	shift
	_xbps_complete xbps-query "$@"
}

_xrm() {
	shift
	_xbps_complete xbps-remove "$@"
}

complete -F _xi xi
complete -F _xls xls
complete -F _xq xq
complete -F _xrm xrm

I have this file as .local/share/bash-completion/completions/xi and in the same directory symlinks for xls, xq and xrm (the command xrm is from #204 (comment))

For system install it should go into /usr/share/bash-completion/completions/.

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

No branches or pull requests

1 participant