diff options
-rw-r--r-- | krebs/5pkgs/simple/withGetopt.nix | 2 | ||||
-rw-r--r-- | tv/2configs/vim.nix | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/krebs/5pkgs/simple/withGetopt.nix b/krebs/5pkgs/simple/withGetopt.nix index 179051bdf..d20802fb2 100644 --- a/krebs/5pkgs/simple/withGetopt.nix +++ b/krebs/5pkgs/simple/withGetopt.nix @@ -20,7 +20,7 @@ opt-spec: cmd-spec: let # true if b requires a to define its default value opts-before = a: b: - test ".*[$]${stringAsChars (c: "[${c}]") a.varname}\\>.*" (b.default or ""); + test ".*[$]${stringAsChars (c: "[${c}]") a.varname}([^0-9A-Za-z_].*)?" (b.default or ""); opts-list = let sort-out = toposort opts-before (attrValues opts); diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index ca4718646..8a27b606a 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -173,9 +173,13 @@ let { syn cluster nix_ind_strings contains=NixIND_STRING syn cluster nix_strings contains=NixSTRING - ${concatStringsSep "\n" (mapAttrsToList (lang: { extraStart ? null }: let + ${concatStringsSep "\n" (mapAttrsToList (name: { + extraStart ? null, + lang ? name + }: + let startAlts = filter isString [ - ''/\* ${lang} \*/'' + ''/\* ${name} \*/'' extraStart ]; sigil = ''\(${concatStringsSep ''\|'' startAlts}\)[ \t\r\n]*''; |