Parsable list of colors when executing in pipe/subshell

This commit is contained in:
Sergei Eremenko 2021-10-15 21:15:19 +03:00
parent d3d4f0c28b
commit cce23c2918
No known key found for this signature in database
GPG key ID: AB6D54C1C16D2507

View file

@ -509,12 +509,16 @@ main() {
do_restore_color
;;
list-colors)
cat <<- EOF
List of available colors:
if [ -t 1 ]; then
cat <<- EOF
List of available colors:
$(list_colors)
$(list_colors)
EOF
EOF
else
list_colors
fi
;;
update-icon-caches)
verify_privileges