Skip to content

Ranger Plugin to easily copy or move files to a remote location with rclone.

License

Notifications You must be signed in to change notification settings

einsiedlerspiel/ranger-rclone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ranger-rclone

Ranger Plugin to easily copy or move files to a remote location with rclone.

At the moment it’s only supported to copy/move files from ranger to a remote, not the other way around.

Usage

:rclone <command> <rclone-target> <dir>

Available <commands> are:

copy
https://rclone.org/commands/rclone_copy/
copyto
https://rclone.org/commands/rclone_copyto/
move
https://rclone.org/commands/rclone_move/
moveto
https://rclone.org/commands/rclone_moveto/

<rclone-target> can be either a destination as you would provide to rclone copy directly or the key of a bookmarked destination.

<dir> is an optional argument that is appended to <rclone-target> after bookmark resolution. This is useful to specify a subdirectory of a bookmark as destination.

Tab completion for <command> and <rclone-target> (from bookmarks) is implemented.

A note on rclone sync

rclone sync is not by default available through this plugin. I made this choice mostly because sync riskier to use without the possiblity of dry-running it than copy and move are, especially on bookmarked locations where you don’t see the actual path.

If you really want to use sync through this interface, you can add sync to the available commands by adding it to the command_list variable in the definition of the rclone command. Autocomplete will work.

I might add some form of support for sync at some point.

Bookmarks

Bookmarked destinations are a pair of a key and a destination.

add a bookmark
:add_rclone_target <key> <target>
remove a bookmark
:remove_rclone_target <key>
change target to existing key
:change_rclone_target <key> <new-target>

The bookmarked targets are stored in a file in the ranger config directory that is automatically created when a bookmark is added for the first time.

Dependencies

Installation

cd ~/.config/ranger/plugins
git clone https://github.com/einsiedlerspiel/ranger-rclone.git

About

Ranger Plugin to easily copy or move files to a remote location with rclone.

Topics

Resources

License

Stars

Watchers

Forks

Languages