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 autocompletion #14309

Closed
ggeorgg opened this issue Feb 20, 2019 · 7 comments
Closed

Bash autocompletion #14309

ggeorgg opened this issue Feb 20, 2019 · 7 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info

Comments

@ggeorgg
Copy link

ggeorgg commented Feb 20, 2019

Enabling the autocompletion from the documention (https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html#enabling-autocompletion) is not working for me. I am not quite sure if it is working at all (See stecman/symfony-console-completion#71)
If I try the command from the nextcloud documentation, I always get "Persmission denied".
If it is not working, maybe it should be removed from the documentation? If it normally works, could we improve the documentation?
@nickvergessen What do you think? I guess you have already struggled a lot with it?

@ggeorgg ggeorgg added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Feb 20, 2019
@nickvergessen
Copy link
Member

Works pretty fine here and I use it all the time.

I guess the most important thing to note is this sentence from the docs:

Command autocompletion currently only works if the user you use to execute the occ commands has a profile. www-data in most cases is nologon and therefor cannot use this feature.

But on my dev enviroment I simply added my user to the www-data group and so I can autocomplete everything.

@ggeorgg
Copy link
Author

ggeorgg commented Feb 20, 2019

What exactly means "if the user ... has a profile"?
I now did
sudo usermod -a -G www-data myUserName
on my Ubuntu machine virtualbox and added
eval $(/var/www/html/nextcloud/occ _completion --generate-hook)
to the end of the file /home/myUserName/.bashrc.
When I I login to this account or when I open a new bash, I get the "Permission denied" message.
Then I switched to
source <(/var/www/html/nextcloud/occ _completion --generate-hook)
and when I login now, I get
grafik
What am I doing wrong? You wrote, that you simply added your user to the www-data group. Did you also do the source <(/var ... ? Or is this even not necessary when adding the user to www-data group?

@skjnldsv
Copy link
Member

skjnldsv commented Jun 4, 2019

What exactly means "if the user ... has a profile"?

www-data usually doesn't have a real profile.
Have you successfully got it to work @ggeorgg ?

@ggeorgg
Copy link
Author

ggeorgg commented Jun 5, 2019

Unfortunately I have not been successful and I have given up for a while now. I am currently working on some ansible stuff. If I get it to work, I will try again to implement the bash autocompletion.

@skjnldsv
Copy link
Member

skjnldsv commented Jun 5, 2019

@ggeorgg I understand.

Though this repo is more for bug and features tickets.
I'll close it and ask you to open a thread (search before) on the forum :)
The autocompletion is properly working and this is most likely a setup issue https://help.nextcloud.com

@skjnldsv skjnldsv closed this as completed Jun 5, 2019
@ggeorgg
Copy link
Author

ggeorgg commented Jun 5, 2019

I was able to get the autocompletion work partly now.
I opened a thread in the forum (did not find anything that was similar).
I still would suggest to improve the documentation as for me it was / is not 100% clear how to implement it.

@skjnldsv
Copy link
Member

skjnldsv commented Jun 6, 2019

@ggeorgg that is nice to hear! :)
Could you help us improve? You can edit the documentation yourself and suggest a change on the documentation repo.
On the docs, you will find a 'edit this page' button on top that you can click ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info
Projects
None yet
Development

No branches or pull requests

3 participants