aboutsummaryrefslogtreecommitdiff
path: root/bash/.bashrc
blob: b3a7c1c11f8311e0561cff28e5f2a64643b7f2ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# .bashrc

# Aliases
alias python=python3
alias ls='ls -larth'
alias vim=nvim
alias tmuxa='tmux attach'
alias tmusxd='tmux detach'
alias copy='xclip -selection clipboard'
alias paste='xclip -o -selection clipboard'

# bun completions
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"

# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"

# Local bins
export PATH="$HOME/.local/bin:$PATH"
# Doom Emacs CLI
export PATH="$HOME/.config/emacs/bin:$PATH"

# Auto-attach or create tmux session on shell start
if [ -z "$TMUX" ]; then
  tmux attach 2>/dev/null || tmux new -s main
fi

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
    PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH

# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
    for rc in ~/.bashrc.d/*; do
        if [ -f "$rc" ]; then
            . "$rc"
        fi
    done
fi
unset rc
. "$HOME/.cargo/env"

# pnpm
export PNPM_HOME="/home/yousefjan/.local/share/pnpm"
case ":$PATH:" in
  *":$PNPM_HOME:"*) ;;
  *) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end