bash: use zsh if in a nix-shell
This commit is contained in:
parent
064de4e0d9
commit
a6af9c6a1c
1 changed files with 12 additions and 3 deletions
15
.bashrc
15
.bashrc
|
@ -1,8 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Blake's bashrc 99.99% of this is the default bashrc for manjaro, I just liked
|
||||
# it so I took it. The main job of this is to load my basic shell
|
||||
# configuration, which works in any `sh`-compatible shell
|
||||
# Blake's bashrc
|
||||
|
||||
# ZSH supremacy
|
||||
|
||||
# 99.99% of this is the default bashrc for manjaro, I just liked it so I took
|
||||
# it, and I don't use bash enough to care. The main job of this is to load my
|
||||
# basic shell configuration, which works in any POSIX shell.
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
@ -13,6 +17,11 @@ export SHELL_CONFIG_DIR="${SHELL_CONFIG_DIR:-"${XDG_CONFIG_HOME:-"$HOME/.config"
|
|||
# Source standard shell configuration
|
||||
[ -f "$SHELL_CONFIG_DIR/shrc" ] && source "$SHELL_CONFIG_DIR/shrc"
|
||||
|
||||
# if in nix shell, run zsh instead of bash - not sure if there's a better way to do this
|
||||
if ! "${FORCE_BASH:-false}" && [ -n "$IN_NIX_SHELL" ]; then
|
||||
SHELL="/etc/profiles/per-user/$USER/bin/zsh" exec zsh
|
||||
fi
|
||||
|
||||
### Manjaro default bashrc >>>
|
||||
colors() {
|
||||
local fgc bgc vals seq0
|
||||
|
|
Loading…
Add table
Reference in a new issue