bash-completion.sh
branchv_0
changeset 27 532953173cd5
parent 25 3f47b43e528d
child 28 9172bd97ae99
--- a/bash-completion.sh	Wed Oct 30 16:47:41 2019 +0100
+++ b/bash-completion.sh	Sun Nov 10 22:55:42 2019 +0100
@@ -50,6 +50,13 @@
 		"dublincore.rights"
 	)
 
+	HASH_FIELDS=(
+		"md5"
+		"sha1"
+		"sha256"
+		"sha512"
+	)
+
 
 	if   [[ "$w1" == "--relation"      && "x$w0" == "x" ]];    then COMPREPLY=("''")
 	elif [[ "$w1" == "--as"            && "x$w0" == "x" ]];    then COMPREPLY=("''")
@@ -57,11 +64,13 @@
 	elif [[ "$w2" == "--option"        && "x$w0" == "x" ]];    then COMPREPLY=("''")
 	elif [[ "$w1" == "--file"                           ]];    then COMPREPLY=($(compgen -W "${FILE_FIELDS[*]}"  -- "$w0"))
 	elif [[ "$w1" == "--xattr"                          ]];    then COMPREPLY=($(compgen -W "${XATTR_FIELDS[*]}" -- "$w0"))
+	elif [[ "$w1" == "--hash"                           ]];    then COMPREPLY=($(compgen -W "${HASH_FIELDS[*]}" -- "$w0"))
 	else
 		OPTIONS=(
 			"--relation"
 			"--file"
 			"--xattr"
+			"--hash"
 			"--as"
 			"--option"
 		)