Server: Bash autocompletion

Created on 20 Feb 2019  路  7Comments  路  Source: nextcloud/server

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 https://github.com/stecman/symfony-console-completion/issues/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?

0. Needs triage bug needs info

All 7 comments

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.

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?

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 ?

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.

@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

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.

@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 ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mama21mama picture mama21mama  路  3Comments

MariusBluem picture MariusBluem  路  3Comments

e-alfred picture e-alfred  路  3Comments

juliushaertl picture juliushaertl  路  3Comments

williambargent picture williambargent  路  3Comments