[server][cli] Rename some commands

This commit is contained in:
Abhishek Shroff
2025-06-09 00:52:58 +05:30
parent 6da29b93b4
commit 3eea19af83
5 changed files with 23 additions and 19 deletions
+4 -4
View File
@@ -16,12 +16,12 @@ func SetupCommand() *cobra.Command {
cmd.AddCommand(
setupCatCommand(),
setupSetfaclCommand(),
setupCpCommand(),
setupCopyCommand(),
setupImportCommand(),
setupLsCommand(),
setupInfoCommand(),
setupMkdirCommand(),
setupMvCommand(),
setupRmCommand(),
setupMoveCommand(),
setupDeleteCommand(),
setupSearchCommand(),
publink.SetupCommand(),
trash.SetupCommand(),
@@ -10,11 +10,12 @@ import (
"github.com/spf13/cobra"
)
func setupCpCommand() *cobra.Command {
func setupCopyCommand() *cobra.Command {
cmd := cobra.Command{
Use: "cp <src> <dest>",
Short: "Copy Resource",
Args: cobra.ExactArgs(2),
Use: "copy <src> <dest>",
Aliases: []string{"cp"},
Short: "Copy Resource",
Args: cobra.ExactArgs(2),
Run: func(cmd *cobra.Command, args []string) {
f := common.UserFileSystem(cmd)
srcPath := args[0]
@@ -8,11 +8,12 @@ import (
"github.com/spf13/cobra"
)
func setupRmCommand() *cobra.Command {
func setupDeleteCommand() *cobra.Command {
cmd := cobra.Command{
Use: "rm <path>",
Short: "Delete Resource",
Args: cobra.ExactArgs(1),
Use: "delete <path>",
Aliases: []string{"rm"},
Short: "Delete Resource",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
f := common.UserFileSystem(cmd)
pathOrUUID := args[0]
@@ -15,10 +15,11 @@ import (
"github.com/spf13/cobra"
)
func setupLsCommand() *cobra.Command {
func setupInfoCommand() *cobra.Command {
cmd := cobra.Command{
Use: "ls <path>",
Short: "Print Resource Details",
Use: "info <path>",
Aliases: []string{"ls"},
Short: "Print Resource Details",
Long: `Prints all relevant details about a resource.
Columns for children:
@@ -9,11 +9,12 @@ import (
"github.com/spf13/cobra"
)
func setupMvCommand() *cobra.Command {
func setupMoveCommand() *cobra.Command {
cmd := cobra.Command{
Use: "mv <src> <dest>",
Short: "Move Resource",
Args: cobra.ExactArgs(2),
Use: "move <src> <dest>",
Aliases: []string{"mv", "rename"},
Short: "Move Resource",
Args: cobra.ExactArgs(2),
Run: func(cmd *cobra.Command, args []string) {
f := common.UserFileSystem(cmd)
srcPath := args[0]