fix nix-shell initalization in bash
This commit is contained in:
parent
8b4ce67189
commit
575c00987e
|
|
@ -73,3 +73,4 @@ alias path='sed "s/:/\n/g" <<< $PATH'
|
||||||
alias utc='date -u +"%Y-%m-%d %H:%M:%S UTC"'
|
alias utc='date -u +"%Y-%m-%d %H:%M:%S UTC"'
|
||||||
alias fonts='fc-list | awk -F: "{ print \$2 }" | sort | uniq | fzf'
|
alias fonts='fc-list | awk -F: "{ print \$2 }" | sort | uniq | fzf'
|
||||||
alias hz='xrandr --output DisplayPort-1 --mode 1920x1080 --rate'
|
alias hz='xrandr --output DisplayPort-1 --mode 1920x1080 --rate'
|
||||||
|
alias ns='nix-shell'
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,16 @@ _exists zoxide && eval "$(zoxide init bash)"
|
||||||
|
|
||||||
# use starship prompt, unless in linux terminal
|
# use starship prompt, unless in linux terminal
|
||||||
if [[ "$TERM" != "linux" ]]; then
|
if [[ "$TERM" != "linux" ]]; then
|
||||||
|
# suppress setting title for the commands run by nix-shell initalization
|
||||||
|
[[ -v IN_NIX_SHELL ]] && _suppress_title=1
|
||||||
function _set_win_title {
|
function _set_win_title {
|
||||||
|
if [[ -v _suppress_title ]]; then
|
||||||
|
# this is the last command run during nix-shell initalization
|
||||||
|
if [[ "$@" == "shopt -s execfail" ]]; then
|
||||||
|
unset _suppress_title
|
||||||
|
fi
|
||||||
|
return
|
||||||
|
fi
|
||||||
# check if still in .bashrc
|
# check if still in .bashrc
|
||||||
if declare -F _bashrc_main > /dev/null; then
|
if declare -F _bashrc_main > /dev/null; then
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue