mount2: hide mount2 command for the moment

This commit is contained in:
Nick Craig-Wood 2020-02-11 12:05:43 +00:00
parent 8318020387
commit ec1271818f
4 changed files with 7 additions and 6 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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