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

nvOC commands autocomplete #230

Open
papampi opened this issue Nov 20, 2018 · 3 comments
Open

nvOC commands autocomplete #230

papampi opened this issue Nov 20, 2018 · 3 comments

Comments

@papampi
Copy link
Owner

papampi commented Nov 20, 2018

Any one has any good ideas on how to add auto completion to nvOC commands?
Would be nice if we could use double tab to get the valid commands and use auto complete with it.

@LuKePicci
Copy link
Collaborator

This was in my "could do" list, never got time to check, but it can be done for sure by adding some definitions somewhere. See here: https://askubuntu.com/questions/68175/how-to-create-script-with-auto-complete , for nvOC static autocomplete should be enough.

@papampi
Copy link
Owner Author

papampi commented Nov 20, 2018

@LuKePicci
Thanks,
I checked that and looked at some of the already installed scripts in "/etc/bash_completion.d/" but i feel like it needs your magic.
So I leave it to be in your To Do / Could Do list to play with it whenever you get time.

@papampi
Copy link
Owner Author

papampi commented Nov 20, 2018

I just read the other answers in that post and it looks like it can be much easier with .bashrc
We just need to add these to .bashrc:

_nvOC_options='clearlogs gpuinfo gpumap report restore upgrade miners-upgrade reboot stop start restart install-service start-service stop-service main-log miner-log cpuminer-log wdog-log temp-log wtm-log master-log restore-xorg'
complete -W "${_nvOC_options}" 'nvOC'

Edit:
Not working with bash ~/NVOC/mining/nvOC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants