mount: make mount be cmount under macOS #4393

This also adds an alias to the mount command so it responds as `rclone
cmount` as well as `rclone mount`.
This commit is contained in:
Nick Craig-Wood 2020-10-29 12:19:48 +00:00
parent 8ac2f52b6e
commit 0e7fc7613f

View file

@ -24,10 +24,14 @@ import (
func init() {
name := "cmount"
if runtime.GOOS == "windows" {
cmountOnly := runtime.GOOS == "windows" || runtime.GOOS == "darwin"
if cmountOnly {
name = "mount"
}
mountlib.NewMountCommand(name, false, mount)
cmd := mountlib.NewMountCommand(name, false, mount)
if cmountOnly {
cmd.Aliases = append(cmd.Aliases, "cmount")
}
mountlib.AddRc("cmount", mount)
}