krebs types.filename: admit <underscore>
This commit is contained in:
parent
e48ecf1e1c
commit
c80aee7a0b
@ -325,10 +325,7 @@ types // rec {
|
|||||||
# POSIX.1‐2013, 3.278 Portable Filename Character Set
|
# POSIX.1‐2013, 3.278 Portable Filename Character Set
|
||||||
filename = mkOptionType {
|
filename = mkOptionType {
|
||||||
name = "POSIX filename";
|
name = "POSIX filename";
|
||||||
check = let
|
check = x: match "[0-9A-Za-z._-]+" x != null;
|
||||||
filename-chars = stringToCharacters
|
|
||||||
"-.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
||||||
in s: all (flip elem filename-chars) (stringToCharacters s);
|
|
||||||
merge = mergeOneOption;
|
merge = mergeOneOption;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user