Autocompletion not working

Using oh-my-zsh
Have wanted autocompletion for arguments and remote paths for a long time, saw this issue.
So I ran
sudo rclone genautocomplete zsh
..but nothing has changed, still no autocompletion anywhere.

What am I doing wrong?

Is there any output or anything at all returned when you run that?


[adding characters to bypass minimum character limit)

This should help :slight_smile:

$ rclone genautocomplete zsh --help

Generates a zsh autocompletion script for rclone.

This writes to /usr/share/zsh/vendor-completions/_rclone by default so will
probably need to be run with sudo or as root, eg

    sudo rclone genautocomplete zsh

Logout and login again to use the autocompletion scripts, or source
them directly

    autoload -U compinit && compinit

If you supply a command line argument the script will be written

  rclone genautocomplete zsh [output_file] [flags]

  -h, --help   help for zsh

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.
➜  ~ rclone cinder-log kc:co

Nope, closest thing to completing to rclone copy is a file in my home directory (cinder-log) and remote path doesn't offer anything. Only folder in remote kc: starting with c is cold/

Can you run the following command and share the terminal output?

  sudo rclone genautocomplete zsh
 autoload -U compinit && compinit

Still nothing on all three commands.

Can you type them into a window and share the output like this:

textere@seraphim Downloads %   sudo rclone genautocomplete zsh
 autoload -U compinit && compinit
2019/12/07 11:35:38 open /usr/share/zsh/vendor-completions/_rclone: no such file or directory
textere@seraphim Downloads %

➜ ~ sudo rclone genautocomplete zsh
[sudo] password for me:
➜ ~ autoload -U compinit && compinit
➜ ~

Can you validate it made the file:

ls -al /usr/share/zsh/vendor-completions/
➜  ~ ls -al /usr/share/zsh/vendor-completions/
total 2112
drwxr-xr-x. 2 root root    4096 Dec  6 20:15 .
drwxr-xr-x. 5 root root    4096 Dec  6 03:22 ..
-rw-r--r--. 1 root root  126012 Nov 13 09:20 _docker
-rw-r--r--. 1 root root 2026722 Dec  7 18:36 _rclone
➜  ~

Do your docker commands autocomplete or just not rclone?

Seems like the file is present and it should auto complete based on your setup.

It seems, that docker as well does not autocomplete. (tried with docker st for stop, got Standard\ Notes\ Backups/)

Mac just switched to zsh so I know it worked for bash for me as I tested and used it.

For me, I can tell the file is present and should be loaded:

textere@seraphim completion % print -rl -- $fpath


textere@seraphim completion % ls -al
total 3960
drwxr-xr-x  3 textere  staff       96 Dec  7 11:27 .
drwxr-xr-x  3 textere  staff       96 Dec  7 11:27 ..
-rw-r--r--  1 textere  staff  2027280 Dec  7 11:18 _rclone
textere@seraphim completion % pwd

I'm trying to figure out how to do a bit more digging in zsh to validate it loaded as it doesn't seem to work for me either on zsh, but I think it's a zsh question rather than clone since it seems to be all correct. Let me play around a bit while I eat lunch :slight_smile:

I'm on Fedora 31 and oh-my-zsh.
So the command outputs differ:

➜  ~ print -rl -- $fpath

I'd note, that under ~/.oh-my-zsh there is no folder or file named completion(s).

Just to validate when you say autocomplete, you are speaking in terms of the command auto completion?

Like if I hit rclone l and hit tab it shows:


I remember on bash though it would continue to list out my remotes on a tab if I hit something like rclone ls GD: and hit tab it would show the directories on my remote.

Like for bash and I hit tab on a remote, it lists out the items in that path:

Well I want both. Remote completion would be more important.

Does the first work for you though with the command completion? Want to break it down as I have that working and will see the remote completion next as I'd like to fix it for myself too.

Neither command or remote directory autocompletion is working.