From ec1271818f45184a74fe20b09dd70f52ce922154 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 11 Feb 2020 12:05:43 +0000 Subject: [PATCH] mount2: hide mount2 command for the moment --- cmd/cmount/mount.go | 2 +- cmd/mount/mount.go | 2 +- cmd/mount2/mount.go | 2 +- cmd/mountlib/mount.go | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cmd/cmount/mount.go b/cmd/cmount/mount.go index 4c11b470d..330029d0b 100644 --- a/cmd/cmount/mount.go +++ b/cmd/cmount/mount.go @@ -31,7 +31,7 @@ func init() { if runtime.GOOS == "windows" { name = "mount" } - mountlib.NewMountCommand(name, Mount) + mountlib.NewMountCommand(name, false, Mount) } // mountOptions configures the options from the command line flags diff --git a/cmd/mount/mount.go b/cmd/mount/mount.go index a0cc958f6..c5fc7f1a4 100644 --- a/cmd/mount/mount.go +++ b/cmd/mount/mount.go @@ -22,7 +22,7 @@ import ( ) func init() { - mountlib.NewMountCommand("mount", Mount) + mountlib.NewMountCommand("mount", false, Mount) } // mountOptions configures the options from the command line flags diff --git a/cmd/mount2/mount.go b/cmd/mount2/mount.go index fc6362639..3e6da0152 100644 --- a/cmd/mount2/mount.go +++ b/cmd/mount2/mount.go @@ -23,7 +23,7 @@ import ( ) func init() { - mountlib.NewMountCommand("mount2", Mount) + mountlib.NewMountCommand("mount2", true, Mount) } // mountOptions configures the options from the command line flags diff --git a/cmd/mountlib/mount.go b/cmd/mountlib/mount.go index 78479a79f..30d30dda6 100644 --- a/cmd/mountlib/mount.go +++ b/cmd/mountlib/mount.go @@ -98,10 +98,11 @@ func checkMountpointOverlap(root, mountpoint string) error { } // NewMountCommand makes a mount command with the given name and Mount function -func NewMountCommand(commandName string, Mount func(f fs.Fs, mountpoint string) error) *cobra.Command { +func NewMountCommand(commandName string, hidden bool, Mount func(f fs.Fs, mountpoint string) error) *cobra.Command { var commandDefinition = &cobra.Command{ - Use: commandName + " remote:path /path/to/mountpoint", - Short: `Mount the remote as file system on a mountpoint.`, + Use: commandName + " remote:path /path/to/mountpoint", + Hidden: hidden, + Short: `Mount the remote as file system on a mountpoint.`, Long: ` rclone ` + commandName + ` allows Linux, FreeBSD, macOS and Windows to mount any of Rclone's cloud storage systems as a file system with