mirror of
https://github.com/hcartiaux/dotfiles.git
synced 2024-10-18 17:25:23 +02:00
[direnv] compatibility for zsh & bash fixed, SHELL give the default shell, not the current shell)
This commit is contained in:
parent
a3c773c95b
commit
3880062e95
1 changed files with 2 additions and 1 deletions
|
@ -2,7 +2,8 @@
|
||||||
# See https://direnv.net/
|
# See https://direnv.net/
|
||||||
|
|
||||||
if [ -n "$(which direnv 2>/dev/null)" ]; then
|
if [ -n "$(which direnv 2>/dev/null)" ]; then
|
||||||
eval "$(direnv hook $(basename $SHELL))"
|
current_shell=$(ps -p $$ | awk '$1 != "PID" {print $(NF)}')
|
||||||
|
eval "$(direnv hook $(basename $current_shell))" | true
|
||||||
|
|
||||||
# See https://github.com/direnv/direnv/wiki/Python#restoring-the-ps
|
# See https://github.com/direnv/direnv/wiki/Python#restoring-the-ps
|
||||||
show_virtual_env() {
|
show_virtual_env() {
|
||||||
|
|
Loading…
Reference in a new issue