[Nix-dev] Re: What about making addToSearchPathWithCustomDelimiter only add uniq items?
Marc Weber
marco-oweber at gmx.de
Tue Aug 25 18:31:02 CEST 2009
> # if removing one of vale: :value: :value succeeds or value = list then don't item because its present
> [ "${!1}${!1}${!1}" == "${!1/#$3$2/}${!1/$2$3$2/}${!1/%$2$3/}" ] && [ "$3" != "${!1}" ] &&
This can be written shorter using case as \amethyst (on ##bash) pointed out:
case ..
*$2$3|$3$2*|*$2$3$2*|$2) ;;
*) add the item
esac
Marc
More information about the nix-dev
mailing list