Last active
July 31, 2018 17:27
-
-
Save grahamc/56597a108f56114e80055345f07c234b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shellcheckHook = makeSetupHook { | |
name = "shellcheck-hook"; | |
substitutions = {}; | |
} | |
(pkgs.writeText "foo" '' | |
( | |
# lol | |
filename=$(cat "$0" | tail -n1 | ${pkgs.utillinux}/bin/rev | cut -d' ' -f2 | ${pkgs.utillinux}/bin/rev) | |
${pkgs.shellcheck}/bin/shellcheck -s bash "$filename" | |
) | |
''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nix-shell | |
#!nix-shell -i bash -p shellcheckHook -I nixpkgs=./ | |
foo=$1 | |
echo $foo | |
echo $((1 + 1))) |
Author
grahamc
commented
Jul 31, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment