From 0af324dc6390ca392987c0590847d49cb72c905b Mon Sep 17 00:00:00 2001 From: Andre Henriques Date: Thu, 6 Jul 2023 17:47:00 +0100 Subject: [PATCH] update to node commands --- config.fish | 6 ++++-- other.fish | 36 ++++++++++++++++++++++++++++++------ 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/config.fish b/config.fish index 9c49b6f..acdcd0e 100644 --- a/config.fish +++ b/config.fish @@ -1,4 +1,3 @@ - set fish_greeting #supress fish_greeting zoxide init fish | source @@ -69,7 +68,7 @@ function configGitUni end function pickColor - grim -g "$(slurp -p)" -t ppm - | convert - -format '%[pixel:p{0,0}]' txt:- + grim -g "$(slurp -p -b 00000000)" -t ppm - | convert - -format '%[pixel:p{0,0}]' txt:- end # grim and slurp @@ -91,3 +90,6 @@ set -gx PATH "$PNPM_HOME" $PATH # nix alias nshell "nix-shell --run fish" + +# opam configuration +source /home/andr3/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true diff --git a/other.fish b/other.fish index c6fbced..dc54cdb 100644 --- a/other.fish +++ b/other.fish @@ -1,16 +1,40 @@ function nixsh if test (count $argv) = 0 - nix-shell --run "fish" - return $status + if nix-shell --run "fish" + return 0 + else + nix shell .# + return $status + end end nix-shell --run "fish" -p $argv end -alias n14="nixsh nodejs-slim_14 yarn nodePackages.eslint" +function n14 + export NIXPKGS_ALLOW_INSECURE 1 + NIXPKGS_ALLOW_INSECURE=1 nixsh nodejs-slim_14 yarn nodePackages.eslint nodePackages.svelte-language-server nodePackages.npm $argv +end + alias n14dev="n14 --run 'pnpm dev'" alias n14pl="n14 --run 'pnpm prod-local'" -alias n19="nixsh nodejs-slim_19 yarn nodePackages.eslint" -alias n19dev="n19 --run 'pnpm dev'" -alias n19pl="n19 --run 'pnpm prod-local'" +alias n14="nixsh nodejs_14 yarn nodePackages.svelte-language-server nodePackages.npm" +alias n14dev="n14 --run 'pnpm dev'" +alias n14pl="n14 --run 'pnpm prod-local'" + +function n16 + export NIXPKGS_ALLOW_INSECURE 1 + NIXPKGS_ALLOW_INSECURE=1 nixsh nodejs-slim_16 yarn nodePackages.svelte-language-server nodePackages.npm $argv +end + +alias n16dev="n16 --run 'pnpm dev'" +alias n16pl="n16 --run 'pnpm prod-local'" + +alias n18="nixsh nodejs-slim_18 yarn nodePackages.svelte-language-server" +alias n18dev="n18 --run 'pnpm dev'" +alias n18pl="n18 --run 'pnpm prod-local'" + +alias n20="nixsh nodejs-slim_20 yarn nodePackages.svelte-language-server" +alias n20dev="n20 --run 'pnpm dev'" +alias n20pl="n20 --run 'pnpm prod-local'"