Bash autocompletion

Hi nexcloud community!

At the beginning of this year I tried to implement the bash autocompletion like it is described in the documentation but I didn’t get it to work.
This is why I opened a Github issue and asked to improve the documentation. Unfortunately, the comments on Github did not help.
In the meantime I have switched to OpenSuse and nginx (Before that I used Ubuntu with apache)

I now figured out, that can use the auto completion when I do the following:

  1. sudo chmod 760 /var/www/nextcloud/occ
  2. sudo su nginx
  3. eval $(/var/www/nextcloud/occ _completion --generate-hook)
  4. /var/www/nextcloud/occ [TAB] is working!

Is it also possible to have this enabled when logged in as a user different than nginx?
I already tried this:

  1. ls -l /var/www/nextcloud/occ gives back-rw-r----- 1 nginx nginx 283 May 15 16:39 /var/www/nextcloud/occ
  2. sudo chmod 670 /var/www/nextcloud/occ
  3. sudo usermod -a -G nginx myUserName
  4. eval $(/var/www/nextcloud/occ _completion --generate-hook)
    Problem is, that I get If 'Cannot' is not a typo you can use command-not-found to lookup the package that contains it, like this:cnf Cannot at the bash standard output.

Is this the correct behavior? I am just curious, because @nickvergessen mentioned on Github, that he added his user to the www-data group and he was able to autocomplete everything. How is that possible?

Thanks in advance!

/var/www/nextcloud/occ _completion --generate-hook
try running this manually as your user. That is what needs to work.

Unfortunately, this is not working either:
I guess there is still something different in you setup…