Repository: rclone/rclone (language: go)

Issue:
Display names / description field for remotes.
#### What problem are you are trying to solve?
 - Have many, many remotes, with easy to type, cryptic names
 - You don't exactly remember, what all the remotes do
 - So you name everything with 30 various characters
 - but I think that's too much to type, and copy pasta isn't the fastest

#### How do you think rclone should be changed to solve that?
What about 'display names'? They would only appear in rclone config and listremotes (with optional flag, bc lsremotes could be used by scripts). Other alternative for display names could be a description field.


Discussion / hints:
This is a nice idea - I like the name `description`

To implement we probably need to ask the user for the description at the point they make the remote.

Do you want to have a go at this?


> This is a nice idea - I like the name `description`
> 
> To implement we probably need to ask the user for the description at the point they make the remote.

I think it should be shoved under advanced (the last thing before confirming). Thoughs/do you agree?

> Do you want to have a go at this?

Suuureee.. I'll assign myself, but as with the previous time, can't promise anything.
@jtagcat wrote
>  I might throw this under hacktoberfest.
Go for it!

> Talking about backlog, I did some stats. Tab count (backlog, net total compared to the previous hour online) (around ¼-⅓ of the actual measure):

Nice stats! I don't know what they are measuring - can you explain more?
..I still didn't get the answer to: `I think it should be shoved under advanced (the last thing before confirming). Thoughs/do you agree?`
> ..I still didn't get the answer to: `I think it should be shoved under advanced (the last thing before confirming). Thoughs/do you agree?`

That sounds reasonable :-)
Hello everyone! My name is Paul and I am just starting my GitHub activity. I'm looking for my first issues to fix and found this one as it is labeled as 'good first' one. Is there anybody assigned to it now? If not, can I be assigned for it and try to fix it, providing it is suitable for beginners?
There is nobody assigned, and it's probably suitable. I haven't worked on it.

I would start by looking at stuff interacting with configs. Description (I assume) is only shown in commands interacting purely with config, and not elsewhere. Look at how the config is created (can be through cli commands or interactively exists) and reading/showing the field (`$ rclone config` without doing anything). There is most likely a generic remote configuration holder. (the key-value what holds remote name, etc; non-generic: (sftp) host, (sftp) username)

Make sure you have a command to set-get the description programatically. If you have the time, maybe add an option to `$ rclone listremotes` to also print descriptions.

When stuck, I think you can ping ncw, who helped me out, including some of my first Go steps. Check README if they are still the person to ask help from.
Definitely have a look at https://github.com/rclone/rclone/pull/6019, as it is probably usable with very few minor changes.
Thank you so much for your feedback! I guess, I will be able to start working on it soon.
Can I get some feedback about my PR?

Fix patch:
diff --git a/backend/googlephotos/googlephotos.go b/backend/googlephotos/googlephotos.go
index df031b606d8df..0b0290d3ac962 100644
--- a/backend/googlephotos/googlephotos.go
+++ b/backend/googlephotos/googlephotos.go
@@ -1143,6 +1143,9 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
 			info = results[0]
 		}
 	}
+	if err != nil {
+		return fmt.Errorf("failed to commit batch: %w", err)
+	}
 
 	o.setMetaData(info)
 
diff --git a/cmd/listremotes/listremotes.go b/cmd/listremotes/listremotes.go
index 6f63ba26b5856..68dd291c6f363 100644
--- a/cmd/listremotes/listremotes.go
+++ b/cmd/listremotes/listremotes.go
@@ -19,7 +19,7 @@ var (
 func init() {
 	cmd.Root.AddCommand(commandDefinition)
 	cmdFlags := commandDefinition.Flags()
-	flags.BoolVarP(cmdFlags, &listLong, "long", "", listLong, "Show the type as well as names", "")
+	flags.BoolVarP(cmdFlags, &listLong, "long", "", listLong, "Show the type and the description as well as names", "")
 }
 
 var commandDefinition = &cobra.Command{
@@ -28,7 +28,7 @@ var commandDefinition = &cobra.Command{
 	Long: `
 rclone listremotes lists all the available remotes from the config file.
 
-When used with the ` + "`--long`" + ` flag it lists the types too.
+When used with the ` + "`--long`" + ` flag it lists the types and the descriptions too.
 `,
 	Annotations: map[string]string{
 		"versionIntroduced": "v1.34",
@@ -38,15 +38,21 @@ When used with the ` + "`--long`" + ` flag it lists the types too.
 		remotes := config.FileSections()
 		sort.Strings(remotes)
 		maxlen := 1
+		maxlentype := 1
 		for _, remote := range remotes {
 			if len(remote) > maxlen {
 				maxlen = len(remote)
 			}
+			t := config.FileGet(remote, "type")
+			if len(t) > maxlentype {
+				maxlentype = len(t)
+			}
 		}
 		for _, remote := range remotes {
 			if listLong {
 				remoteType := config.FileGet(remote, "type")
-				fmt.Printf("%-*s %s\n", maxlen+1, remote+":", remoteType)
+				description := config.FileGet(remote, "description")
+				fmt.Printf("%-*s %-*s %s\n", maxlen+1, remote+":", maxlentype+1, remoteType, description)
 			} else {
 				fmt.Printf("%s:\n", remote)
 			}
diff --git a/docs/content/authors.md b/docs/content/authors.md
index 44fe472d4a77a..8e797320a67b7 100644
--- a/docs/content/authors.md
+++ b/docs/content/authors.md
@@ -811,3 +811,4 @@ put them back in again.` >}}
   * Anthony Metzidis <anthony.metzidis@gmail.com>
   * emyarod <afw5059@gmail.com>
   * keongalvin <keongalvin@gmail.com>
+  * rarspace01 <rarspace01@users.noreply.github.com>
diff --git a/fs/registry.go b/fs/registry.go
index 1ecd2c3054405..ddabfd6df87ec 100644
--- a/fs/registry.go
+++ b/fs/registry.go
@@ -19,6 +19,13 @@ import (
 // Registry of filesystems
 var Registry []*RegInfo
 
+// optDescription is a basic description option
+var optDescription = Option{
+	Name:     "description",
+	Help:     "Description of the remote",
+	Advanced: true,
+}
+
 // RegInfo provides information about a filesystem
 type RegInfo struct {
 	// Name of this fs
@@ -283,6 +290,7 @@ func Register(info *RegInfo) {
 	if info.Prefix == "" {
 		info.Prefix = info.Name
 	}
+	info.Options = append(info.Options, optDescription)
 	Registry = append(Registry, info)
 	for _, alias := range info.Aliases {
 		// Copy the info block and rename and hide the alias and options


Test patch:
diff --git a/fs/config/ui_test.go b/fs/config/ui_test.go
index 6a4d5aee09142..172921c9b709b 100644
--- a/fs/config/ui_test.go
+++ b/fs/config/ui_test.go
@@ -104,6 +104,7 @@ func TestCRUD(t *testing.T) {
 		"y",                  // type my own password
 		"secret",             // password
 		"secret",             // repeat
+		"n",                  // don't edit advanced config
 		"y",                  // looks good, save
 	})
 	require.NoError(t, config.NewRemote(ctx, "test"))