lsf: implement 'i' format for showing object ID - fixes #1476

This commit is contained in:
Nick Craig-Wood
2018-05-13 12:17:55 +01:00
parent 826975c341
commit 909c3a92d6
3 changed files with 17 additions and 0 deletions
+3
View File
@@ -63,6 +63,7 @@ output:
s - size
t - modification time
h - hash
i - ID of object if known
So if you wanted the path, size and modification time, you would use
--format "pst", or maybe --format "tsp" to put the path last.
@@ -138,6 +139,8 @@ func Lsf(fsrc fs.Fs, out io.Writer) error {
list.AddSize()
case 'h':
list.AddHash(hashType)
case 'i':
list.AddID()
default:
return errors.Errorf("Unknown format character %q", char)
}