Skip to content

Commit d76246a

Browse files
authored
Initialize direnv in bling.sh (#1011)
1 parent d9bf699 commit d76246a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/ublue-bling/src/bling.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,21 @@ HOMEBREW_PREFIX="${HOMEBREW_PREFIX:-/home/linuxbrew/.linuxbrew}"
3232
ATUIN_INIT_FLAGS=${ATUIN_INIT_FLAGS:-""}
3333

3434
if [ "$(basename $(readlink /proc/$$/exe))" = "bash" ]; then
35+
# Initialize direnv before bash-preexec to avoid PROMPT_COMMAND conflicts
36+
# See: https://github.com/rcaloras/bash-preexec/pull/143
37+
[ "$(command -v direnv)" ] && eval "$(direnv hook bash)"
3538
[ -f "/etc/profile.d/bash-preexec.sh" ] && . "/etc/profile.d/bash-preexec.sh"
3639
[ -f "/usr/share/bash-prexec" ] && . "/usr/share/bash-prexec"
3740
[ -f "/usr/share/bash-prexec.sh" ] && . "/usr/share/bash-prexec.sh"
3841
[ -f "${HOMEBREW_PREFIX}/etc/profile.d/bash-preexec.sh" ] && . "${HOMEBREW_PREFIX}/etc/profile.d/bash-preexec.sh"
3942
# Initialize atuin before starship to ensure proper command history capture
40-
# See: https://github.com/atuinsh/atuin/issues/2804
43+
# See: https://github.com/atuinsh/atuin/issues/2804
4144
[ "$(command -v atuin)" ] && eval "$(atuin init bash ${ATUIN_INIT_FLAGS})"
4245
[ "$(command -v starship)" ] && eval "$(starship init bash)"
4346
[ "$(command -v zoxide)" ] && eval "$(zoxide init bash)"
4447
elif [ "$(basename $(readlink /proc/$$/exe))" = "zsh" ]; then
48+
# Initialize direnv before atuin to avoid PROMPT_COMMAND conflicts
49+
[ "$(command -v direnv)" ] && eval "$(direnv hook zsh)"
4550
# Initialize atuin before starship to ensure proper command history capture
4651
[ "$(command -v atuin)" ] && eval "$(atuin init zsh ${ATUIN_INIT_FLAGS})"
4752
[ "$(command -v starship)" ] && eval "$(starship init zsh)"

packages/ublue-bling/ublue-bling.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%global debug_package %{nil}
22

33
Name: ublue-bling
4-
Version: 0.1.12
4+
Version: 0.1.13
55
Release: 1%{?dist}
66
Summary: Universal Blue Bling CLI setup scripts
77

0 commit comments

Comments
 (0)