-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.bashrc
More file actions
33 lines (29 loc) · 1.07 KB
/
Copy path.bashrc
File metadata and controls
33 lines (29 loc) · 1.07 KB
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
# path: /home/klassiker/Projects/repos/dotfiles/.bashrc
# author: klassiker [mrdotx]
# url: https://github.com/mrdotx/dotfiles
# date: 2026-07-17T02:23:57+0200
# if shell is not running interactive, break up
tty -s \
|| return
# history (almost the same functionality as zsh)
# show command with history expansion to user before running it
shopt -s histverify
# add commands to HISTFILE when shell exits
shopt -s histappend
# ignore command line that start with a space
# ignore command line if it is identical to the previous one
# older duplicate command lines are removed when saving
export \
HISTCONTROL=ignorespace:ignoredups:erasedups \
HISTFILE="$HOME/.local/share/cmd_history" \
HISTSIZE=2000 \
HISTFILESIZE=20000
# functions and aliases
[ -f "$HOME/.config/functions" ] \
&& . "$HOME/.config/functions"
[ -f "$HOME/.config/aliases" ] \
&& . "$HOME/.config/aliases"
# prompt
[ "$(id -u)" -eq 0 ] \
&& PS1='\[\e[1;31m\][\[\e[0;97m\]\w\[\e[1;31m\]]\e[0;97m\]\$\[\e[0m\] ' \
|| PS1='\[\e[1;34m\][\[\e[0;97m\]\w\[\e[1;34m\]]\e[0;97m\]\$\[\e[0m\] '