-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_bashrc
More file actions
82 lines (66 loc) · 1.51 KB
/
Copy pathdot_bashrc
File metadata and controls
82 lines (66 loc) · 1.51 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# .bashrc
# 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
# functions
nmap_ping() {
nmap -sn "$@"
}
nmap_port() {
sudo nmap -sS "$@"
}
nmap_host() {
sudo nmap -O "$@"
}
# Aliases
# nmap alias
alias nmap-ping='nmap_ping'
alias nmap-port='nmap_port'
alias nmap-host='nmap_host'
#git alias
alias gs='git status'
#misc alias
alias clean='clear'
alias dir='ls'
alias fetch='fastfetch'
alias os='cat /etc/os-release'
alias upgrade-all='sudo dnf upgrade --refresh'
alias myip='curl ifconfig.me'
alias vim='nvim'
#QoL Bash-Options
shopt -s autocd
shopt -s checkwinsize
shopt -s cmdhist
shopt -s histappend
#History Tweaks
HISTSIZE=10000
HISTFILESIZE=20000
export HISTTIMEFORMAT="%F %T "
export HISTIGNORE="ls:ll:la:cd:pwd:clear:history"
export HISTCONTROL=ignoredups:erasedups
#Environment Variables
export EDITOR=nvim
export VISUAL=nvim
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# 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
export CONTAINER_HOST=unix:///run/user/1000/podman/podman.sock
# Start-Up Programs
if [[ $- == *i* ]] && command -v fastfetch >/dev/null 2>&1 && [[ -z "$FASTFETCH_SHOWN" ]]; then
fastfetch
export FASTFETCH_SHOWN=1
fi