1
mirror of https://github.com/rclone/rclone synced 2024-07-31 21:59:57 +02:00
Go to file
Florian Gamböck 3c4407442d cmd: fix completion of remotes
The previous behavior of the remotes completion was that only
alphanumeric characters were allowed in a remote name. This limitation
has been lifted somewhat by #2985, which also allowed an underscore.

With the new implementation introduced in this commit, the completion of
the remote name has been simplified: If there is no colon (":") in the
current word, then complete remote name. Otherwise, complete the path
inside the specified remote. This allows correct completion of all
remote names that are allowed by the config (including - and _).
Actually it matches much more than that, even remote names that are not
allowed by the config, but in such a case there already would be a wrong
identifier in the configuration file.

With this simpler string comparison, we can get rid of the regular
expression, which makes the completion multiple times faster. For a
sample benchmark, try the following:

     # Old way
     $ time bash -c 'for _ in {1..1000000}; do
         [[ remote:path =~ ^[[:alnum:]]*$ ]]; done'

     real    0m15,637s
     user    0m15,613s
     sys     0m0,024s

     # New way
     $ time bash -c 'for _ in {1..1000000}; do
         [[ remote:path != *:* ]]; done'

     real    0m1,324s
     user    0m1,304s
     sys     0m0,020s
2019-03-15 13:16:42 +00:00
.circleci build: don't attempt to upload artifacts for pull requests on circleci 2019-01-25 17:27:02 +00:00
.github Revamp issue and PR templates and CONTRIBUTING guide 2018-09-21 18:17:32 +01:00
backend webdav: fix About/df when reading the available/total returns 0 2019-03-15 12:03:04 +00:00
bin koofr: implemented a backend for Koofr cloud storage service. 2019-03-06 13:41:43 +00:00
cmd cmd: fix completion of remotes 2019-03-15 13:16:42 +00:00
docs docs: onedrive: Add guide to refreshing token after MFA is enabled 2019-03-14 00:21:05 +08:00
fs filter: reload filter when the options are set via the rc - fixes #3018 2019-03-10 13:09:44 +00:00
fstest koofr: implemented a backend for Koofr cloud storage service. 2019-03-06 13:41:43 +00:00
graphics New graphics used by forum.rclone.org 2016-10-04 11:31:42 +01:00
lib lib/pacer: fix test on macOS 2019-03-01 12:27:33 +00:00
vendor vendor: add github.com/koofr/go-koofrclient 2019-03-06 13:41:43 +00:00
vfs vfs: shorten the locking window for vfs/refresh 2019-03-05 14:17:42 +00:00
.appveyor.yml build: make CIs available for forks 2018-09-07 10:17:26 +01:00
.gitignore cache: first version 2017-11-15 15:23:21 +00:00
.golangci.yml golangci: enable lints excluded by default 2019-02-09 18:18:22 +00:00
.pkgr.yml Updated .pkgr.yml file to use rclone as its own cli. 2017-03-29 17:48:53 +01:00
.travis.yml build: update to use go1.12 for the build 2019-02-26 13:18:31 +00:00
CONTRIBUTING.md doc: Add more info on testing to CONTRIBUTING 2019-01-12 18:28:51 +00:00
COPYING Initial commit - some small parts working 2012-11-18 17:32:31 +00:00
go.mod vendor: add github.com/koofr/go-koofrclient 2019-03-06 13:41:43 +00:00
go.sum vendor: add github.com/koofr/go-koofrclient 2019-03-06 13:41:43 +00:00
MAINTAINERS.md Add Sebastian Bünger - @buengese to the MAINTAINERS list 2018-12-29 16:08:40 +00:00
Makefile build: update to use go1.12 for the build 2019-02-26 13:18:31 +00:00
MANUAL.html Version v1.46 2019-02-09 10:42:57 +00:00
MANUAL.md Version v1.46 2019-02-09 10:42:57 +00:00
MANUAL.txt Version v1.46 2019-02-09 10:42:57 +00:00
notes.txt Replace test_all.sh with test_all.go which is cross platform and parallel 2015-12-30 09:26:34 +00:00
rclone.1 Version v1.46 2019-02-09 10:42:57 +00:00
rclone.go build: fixup code formatting after goimports change 2018-10-13 22:47:12 +01:00
README.md koofr: implemented a backend for Koofr cloud storage service. 2019-03-06 13:41:43 +00:00
RELEASE.md vendor: update to latest versions of everything 2018-10-25 17:06:33 +01:00

Logo

Website | Documentation | Download | Contributing | Changelog | Installation | Forum | G+

Build Status Windows Build Status CircleCI GoDoc

Rclone

Rclone ("rsync for cloud storage") is a command line program to sync files and directories to and from different cloud storage providers.

Storage providers

Please see the full list of all storage providers and their features

Features

  • MD5/SHA-1 hashes checked at all times for file integrity
  • Timestamps preserved on files
  • Partial syncs supported on a whole file basis
  • Copy mode to just copy new/changed files
  • Sync (one way) mode to make a directory identical
  • Check mode to check for file hash equality
  • Can sync to and from network, e.g. two different cloud accounts
  • Optional encryption (Crypt)
  • Optional cache (Cache)
  • Optional FUSE mount (rclone mount)

Installation & documentation

Please see the rclone website for:

Downloads

License

This is free software under the terms of MIT the license (check the COPYING file included in this package).