X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=.bashrc;h=c1dbd77fc6ab7a7182e3462c86b8c1baa31f1d16;hb=8d33c68549c02c45ed78a05f7de703a08ec245c6;hp=35db9aca99cdf150e10654f17a13e4f3fc38edb4;hpb=ce4cacd36c5b5babeea85d0f93771017e6169180;p=distro-setup diff --git a/.bashrc b/.bashrc index 35db9ac..c1dbd77 100644 --- a/.bashrc +++ b/.bashrc @@ -29,19 +29,20 @@ HISTCONTROL=ignoredups # This works in addition to HISTCONTROL to do more flexible things # it could also do the same things as HISTCONTROL and thus replace it, # but meh. dunno why, but just " *" does glob expansion, so use [ ] to avoid it. -HISTIGNORE='pass *:[ ]*:otp *:oathtool *:histrm *' +HISTIGNORE='pass *:otp *:oathtool *:histrm *' -#### begin section that works with sl() function to return from -# noninteractive ssh shells, or tty. tty because often i -# use it when something is going and io is slow and my bashrc -# is too slow. + +#### if (in +# noninteractive ssh shells or tty). tty because often i use it when +# something is going and io is slow and my bashrc is too slow. if [[ $LC_USEBASHRC != t && ( $SSH_CONNECTION || $TERM == linux ) ]]; then # Here we did not opt-in to running our .bashrc file so we just # return, but we still setup a function to source it without returning # so if we want it we don't have to restart our ssh connection. brc() { export LC_USEBASHRC=t + # shellcheck disable=SC1090 # obviously, no need to follow a sourcing of this file source ~/.bashrc } return 0 @@ -50,9 +51,8 @@ else ###### Begin sourcing of files ##### # The distinction between login and non-login shells is super lame - # and pretty random. get rid of that distinction. The var check is - # just a random variable i set there and no where else. - if ! shopt -q login_shell && [[ ! $PITHOSFLY_SAVE_DIR ]]; then + # and pretty random. get rid of that distinction. + if ! shopt -q login_shell; then if [[ -r /etc/profile ]]; then source /etc/profile fi @@ -85,6 +85,9 @@ else source $_tmp fi fi + if [[ $IANK_BASHRC_RUN ]]; then + $IANK_BASHRC_RUN ||: + fi ###### End sourcing of files ##### fi #### end section that works with sl() function to return from @@ -97,6 +100,13 @@ return 0 # kitty puts this here on startup, i need to build with some option to # avoid it, whatever. -# BEGIN_KITTY_SHELL_INTEGRATION -if test -n "$KITTY_INSTALLATION_DIR" -a -e "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; then source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; fi -# END_KITTY_SHELL_INTEGRATION +## BEGIN_KITTY_SHELL_INTEGRATION +# if test -n "$KITTY_INSTALLATION_DIR" -a -e "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; then source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; fi +## END_KITTY_SHELL_INTEGRATION + +# Automatically added by the Guix install script. +if [ -n "$GUIX_ENVIRONMENT" ]; then + if [[ $PS1 =~ (.*)"\\$" ]]; then + PS1="${BASH_REMATCH[1]} [env]\\\$ " + fi +fi