diff --git a/config/neovim-packer/install b/config/neovim-packer/install index c6152e8..74b99b0 100755 --- a/config/neovim-packer/install +++ b/config/neovim-packer/install @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e set -o nounset diff --git a/dotfiles/bashrc b/dotfiles/bashrc index 58c4010..2d7b7c5 100644 --- a/dotfiles/bashrc +++ b/dotfiles/bashrc @@ -6,12 +6,6 @@ test -f ~/.bashrc-defaults && . ~/.bashrc-defaults . ~/.commonrc -# brew install starship -if which starship >/dev/null 2>/dev/null; then - export STARSHIP_THIS_PID=$$ - eval "$(starship init bash 2>/dev/null)" -fi - for fun in ~/.shell-functions/*; do . $fun done @@ -78,3 +72,7 @@ if which starship >/dev/null 2>/dev/null; then fi [ -f ~/.fzf.bash ] && source ~/.fzf.bash + +if which direnv >/dev/null 2>/dev/null; then + eval "$(direnv hook bash)" +fi diff --git a/dotfiles/shell-functions/start-direnv b/dotfiles/shell-functions/start-direnv deleted file mode 100644 index 8f1c0c0..0000000 --- a/dotfiles/shell-functions/start-direnv +++ /dev/null @@ -1,9 +0,0 @@ -start-direnv() { - if ! type _direnv_hook >& /dev/null; then - eval "$(direnv hook zsh)" - else - echo "direnv already started" - fi -} - -# ok: zsh diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 31eca59..002b2f5 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -12,6 +12,10 @@ fi __commonrc_step ZSHRCINIT source ~/.commonrc +if which direnv >/dev/null 2>/dev/null; then + eval "$(direnv hook zsh)" +fi + __commonrc_step ZSHRCLOADFUNCS for fun in ~/.shell-functions/*; do # Look for a line like "# ok: zsh" diff --git a/script/install-config b/script/install-config index 56a67cf..10efa60 100755 --- a/script/install-config +++ b/script/install-config @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e set -o nounset diff --git a/script/install-dotfiles b/script/install-dotfiles index 7fe308d..5e7d6d8 100755 --- a/script/install-dotfiles +++ b/script/install-dotfiles @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e set -o nounset diff --git a/script/install-nix-dev b/script/install-nix-dev new file mode 100755 index 0000000..78f7f2f --- /dev/null +++ b/script/install-nix-dev @@ -0,0 +1,10 @@ +#!/bin/sh +#/ Usage: script/install-nix-dev + +set -e +set -o nounset + +cd `dirname "$0"`/.. +set -x +script/install-dotfiles +script/install-config config/neovim-packer