mirror of
https://github.com/rclone/rclone.git
synced 2025-01-20 03:42:44 +08:00
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:
parent
8ac2f52b6e
commit
0e7fc7613f
|
@ -24,10 +24,14 @@ import (
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
name := "cmount"
|
name := "cmount"
|
||||||
if runtime.GOOS == "windows" {
|
cmountOnly := runtime.GOOS == "windows" || runtime.GOOS == "darwin"
|
||||||
|
if cmountOnly {
|
||||||
name = "mount"
|
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)
|
mountlib.AddRc("cmount", mount)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user