- extags="$(printf '%s' "$newtags" |tr , '\n' |grep -e "^-" |cut -d: -f1 )"
- tags="$(UNSTRING "${tags#tags=}" |tr , '\n' |grep -vwFe "$extags")"
- if printf %s "$extags" |grep -vq :; then
- tags="$(printf %s\\n "$tags" |grep -vE '^-[^:]+$')"
+ extags="$(printf '%s' "${newtags}" |grep -e "^-" |cut -d: -f1 )"
+ [ "$extags" ] && tags="$(printf %s\\n "$tags" |grep -vwFe "$extags")"
+ if printf %s "${newtags}" |grep -e "^-" |grep -qEe "^-[^:]+$"; then
+ tags="$(printf %s\\n "$tags" |grep -vEe '^-[^:]+$')"