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
|
||||
filename = mkOptionType {
|
||||
name = "POSIX filename";
|
||||
check = let
|
||||
filename-chars = stringToCharacters
|
||||
"-.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
in s: all (flip elem filename-chars) (stringToCharacters s);
|
||||
check = x: match "[0-9A-Za-z._-]+" x != null;
|
||||
merge = mergeOneOption;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user