diff options
author | Marc Coquand <marc@mccd.space> | 2024-05-06 17:07:49 -0500 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-05-06 17:07:49 -0500 |
commit | 80b95fcaab9149466e656430eb4c0041e28ee455 (patch) | |
tree | c9161d0815b3f81cea9f522891ee148bb5f427af /bashrc | |
download | rcm-80b95fcaab9149466e656430eb4c0041e28ee455.tar.gz rcm-80b95fcaab9149466e656430eb4c0041e28ee455.tar.bz2 rcm-80b95fcaab9149466e656430eb4c0041e28ee455.zip |
Initial commit
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -0,0 +1,33 @@ +alias grep="ugrep --exclude-dir=node-modules --exclude-dir=_build" +alias e="emacsclient -nw" +alias pf="" +alias g="git" +alias f-commit="fossil commit && fossil git export" +# Bash initialization for interactive non-login shells and +# for remote shells (info "(bash) Bash Startup Files"). + +# Export 'SHELL' to child processes. Programs such as 'screen' +# honor it and otherwise use /bin/sh. +export SHELL + +if [[ $- != *i* ]] +then + # We are being invoked from a non-interactive shell. If this + # is an SSH session (as in "ssh host command"), source + # /etc/profile so we get PATH and other essential variables. + [[ -n "$SSH_CLIENT" ]] && source /etc/profile + + # Don't do anything else. + return +fi + +# Source the system-wide file. +[ -f /etc/bashrc ] && source /etc/bashrc + +parse_git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1 ∘︎ /' +} + +PS1='\A ${GUIX_ENVIRONMENT:+︎v }$(parse_git_branch)\W ' +eval "$(zoxide init bash)" +eval "$(direnv hook bash)" |