-
Notifications
You must be signed in to change notification settings - Fork 0
/
.commonrc
41 lines (35 loc) · 971 Bytes
/
.commonrc
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
# ====================
# Variables
# ====================
# Overwrite normal ZSH settings
HISTFILE=~/.zsh_history
HISTSIZE=50000
SAVEHIST=50000
# Set default editor to micro if installed
if command -v micro &>/dev/null; then
export EDITOR=micro
export VISUAL=micro
else
export EDITOR=nano
fi
# ====================
# Common aliases and functions for all shells
# ====================
alias y='yarn'
alias p='pnpm'
alias k='kubectl'
# Custom ls
if command -v eza &>/dev/null; then
alias ls='eza --color=always --group-directories-first'
alias la='eza -a --color=always --group-directories-first'
alias ll='eza -la --color=always --group-directories-first'
alias lt='eza -aT --color=always --group-directories-first'
else
echo "No EZA installed, using normal ls command"
fi
# Custom ZX scripts
if command -v zx &>/dev/null; then
alias dev="zx $(dirname "$0")/zx/dev.mjs"
else
echo "No ZX installed, skipping custom scripts"
fi