-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.shell_aliases
More file actions
92 lines (87 loc) · 3.11 KB
/
.shell_aliases
File metadata and controls
92 lines (87 loc) · 3.11 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
83
84
85
86
87
88
89
90
91
92
alias dnf='sudo dnf'
alias apt='sudo apt'
if command -v batcat &>/dev/null; then
alias cat='batcat --theme OneHalfDark -p'
else
alias cat='bat --theme OneHalfDark -p'
fi
alias ls='eza --icons'
alias neofetch='fastfetch'
#set zoxiide as cd
# eval "$(zoxide init --cmd cd zsh)"
# Alias's to change the directory
alias web='cd /var/www/html'
# Alias's to modified commands
alias rm='trash -vi'
alias trashlist='trash-list'
alias cleantrash='trash-empty'
alias mkdir='mkdir -p'
alias vi='nvim'
alias vim='nvim'
alias n='nvim'
alias py="python3"
alias diff="delta --side-by-side --diff-so-fancy"
# Search files in the current folder
alias f="find . | grep "
alias c="clear"
alias g="git"
alias uvr="uv run"
# alias gc="git clone" # Use the gc function
alias gd='git diff --output-indicator-new=" " --output-indicator-old=" "'
alias gca='git commit --amend'
alias gcan='git commit --amend --no-edit'
alias gl='git log --graph --all --pretty=format:"%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n"'
alias ya="yazi"
# fzf
alias preview="fzf --preview='bat --color=always --style=numbers --theme OneHalfDark {}' --preview-window=down"
alias fnvim='nvim $(fzf -m --preview="bat --color=always --style=numbers --theme OneHalfDark {}" --preview-window=down)'
alias fvim='vim $(fzf -m --preview="bat --color=always --style=numbers --theme OneHalfDark {}" --preview-window=down)'
alias fcd="cd \$(find . -type d | fzf)" # Fuzzy search directories and cd into them
# shortcuts for navigation
alias '..'='cd ..'
alias '...'='cd ../..'
alias '....'='cd ../../..'
alias '.....'='cd ../../../..'
alias ls="eza --icons"
alias la="eza --icons -lgha --group-directories-first"
alias l="eza --icons -lgha --group-directories-first"
alias ly="eza --icons -lgha --group-directories-first"
alias lt="eza --icons --tree"
alias lta="eza --icons --tree -lgha"
# others
alias kill9="kill -9"
alias myip="curl ifconfig.me" # Show public IP
alias speedtest="curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -"
alias nvchad="XDG_CONFIG_HOME=$HOME/Downloads/test-configs NVIM_APPNAME=NvChad nvim"
alias largefile="du -h -x -s -- * | sort -r -h | head -20"
alias listfont="magick convert -list font | grep -iE 'font:.*'"
alias psu="ps aux"
alias psg="ps aux | grep -i" # Usage: psg process_name
alias docker-cleanup="docker system prune -a --volumes"
# -------------------------------------------
# Suffix Aliases - Open Files by Extension
# -------------------------------------------
# Just type the filename to open it with the associated program
alias -s json=jless
alias -s md='$EDITOR'
# alias -s sh='$EDITOR'
alias -s py='$EDITOR'
alias -s go='$EDITOR'
alias -s rs='$EDITOR'
alias -s txt=nano
alias -s log=cat
alias -s py='$EDITOR'
alias -s js='$EDITOR'
alias -s ts='$EDITOR'
alias -s html=open
# -------------------------------------------
# Global Aliases - Use Anywhere in Commands
# -------------------------------------------
# Redirect stderr to /dev/null
alias -g NE='2>/dev/null'
# Redirect stdout to /dev/null
alias -g NO='>/dev/null'
# Redirect both stdout and stderr to /dev/null
alias -g NUL='>/dev/null 2>&1'
# Pipe to jq
alias -g J='| jq'