Skip to content

Commit

Permalink
add: mk bash href
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Dec 13, 2023
1 parent d402be4 commit 8c3f30b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drv-tools/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@
framedBrackets = framedBrackets_ "\n\n" "\n\n";
framedBrackets_ = pref: suff: framed_ "${pref}[ " " ]${suff}";

mkBashHref = text: url: ''\e]8;;${url}\a${text}\e]8;;\a'';

# concat strings and separate them by a newline character
concatStringsNewline = list: concatStringsSep "\n" (flatten list);

Expand Down Expand Up @@ -427,6 +429,7 @@
mergeValues
mkAccessors
mkAccessors_
mkBashHref
mkBin
mkBinName
mkShellApp
Expand Down Expand Up @@ -466,6 +469,9 @@
buildInputs = [ pkgs.tree json2nix pkgs.fish ];
LC_ALL = "C.utf8";
};
devShells.href = pkgs.mkShell {
shellHook = ''printf '${mkBashHref "github link" "https://github.com"}\n' '';
};

tests = {
s = subDirectories ../. "templates";
Expand Down

0 comments on commit 8c3f30b

Please sign in to comment.