Skip to content

Commit

Permalink
feat: update bash configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Oct 8, 2023
1 parent 2a15af7 commit aa8ba46
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions bash/bashrc.shared
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

# run emacs tui on terminal instead of emacs itself.
alias emacs="emacs -nw"

# source profiles in home and etc directories

test -f /etc/profile && source /etc/profile
test -f "$HOME/.profile" && source "$HOME/.profile"

Expand All @@ -30,11 +30,9 @@ HISTCONTROL=ignoredups
shopt -s histappend

# reload bash by sourcing bashrc

alias r="source ~/.bashrc"

# starship, the minimal, blazing-fast, and infinitely customizable prompt for any shell!

if [ "$(command -v starship)" ]; then
eval "$(starship init bash)"
fi
Expand All @@ -43,35 +41,32 @@ fi
# neovim defines $NVIM in terminal mode and based on it
# we can detect we are running inside neovim and use nvr
# instead of neovim, etc.

if [ -n "$NVIM" ]; then
alias nvim=nvr
export EDITOR="nvr -cc split +'set bufhidden=delete' --remote-wait"
export MANPAGER="nvr -c 'Man!' -o -"
else
set -o vi
fi

# set PATH so it includes user's private bin if it exists

if [ -d "$HOME/bin" ]; then
path+=("$HOME/bin")
fi

# set PATH so it includes user's local private bin if it exists

if [ -d "$HOME/.local/bin" ]; then
path+=("$HOME/.local/bin")
fi

# pyenv, simple python version management

if [[ "$(command -v pyenv)" ]]; then
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi

# navi, an interactive cheatsheet tool for the command-line

_navi_call() {
local result
result="$(navi "$@" </dev/tty)"
Expand Down

0 comments on commit aa8ba46

Please sign in to comment.