some changes
This commit is contained in:
parent
e2ab3de5f8
commit
6029060d46
1 changed files with 63 additions and 152 deletions
215
aliases.fish
215
aliases.fish
|
@ -1,17 +1,4 @@
|
|||
#!/bin/fish
|
||||
# ─< VSCodium >─────────────────────────────────────────────────────────────────────────────
|
||||
if command -v codium >/dev/null 2>&1
|
||||
alias code="codium"
|
||||
set -e EDITOR
|
||||
set -p EDITOR codium
|
||||
end
|
||||
|
||||
# ─< neovide, the best frontend for any neovim-config >───────────────────────────────────
|
||||
if test -d $HOME/.local/share/neovide/
|
||||
set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage')
|
||||
alias nvim="$neovide"
|
||||
end
|
||||
|
||||
# ─< colorized ls >─────────────────────────────────────────────────────────────────────────
|
||||
# ─< lsd >──────────────────────────────────────────────────────────────────────────────────
|
||||
if command -v lsd >/dev/null 2>&1
|
||||
|
@ -65,110 +52,6 @@ alias www="curl wttr.in/Ulm"
|
|||
if command -v telnet >/dev/null 2>&1
|
||||
alias starwars="telnet -a telehack.com"
|
||||
end
|
||||
# ─< rsync >────────────────────────────────────────────────────────────────────────────────
|
||||
if command -v rsync >/dev/null 2>&1
|
||||
alias cp="rsync -avP"
|
||||
alias scp="rsync -avP"
|
||||
end
|
||||
|
||||
# ─< bat alias >────────────────────────────────────────────────────────────────────────────
|
||||
if command -v batcat >/dev/null 2>&1
|
||||
alias cat="batcat --color=always -p --paging=never"
|
||||
alias less="batcat --paging always --color=always"
|
||||
alias gd="batcat --diff"
|
||||
end
|
||||
|
||||
# ─< batcat alias >─────────────────────────────────────────────────────────────────────────
|
||||
if command -v bat >/dev/null 2>&1
|
||||
alias cat="bat --color=always -p"
|
||||
alias less="bat --paging always --color=always"
|
||||
alias gd="bat --diff"
|
||||
end
|
||||
|
||||
# ─< t stands for tmux >────────────────────────────────────────────────────────────────────
|
||||
if command -v tmux >/dev/null 2>&1
|
||||
alias ts="tmux source $HOME/.tmux.conf"
|
||||
alias t="tmux"
|
||||
end
|
||||
|
||||
# ─< d stands for docker >──────────────────────────────────────────────────────────────────
|
||||
if command -v docker >/dev/null 2>&1
|
||||
alias up="docker compose up"
|
||||
alias down="docker compose down"
|
||||
alias pull="docker compose pull"
|
||||
alias d="docker"
|
||||
alias dr="docker run --rm -it"
|
||||
alias ds="docker ps -a"
|
||||
alias dc="docker compose"
|
||||
alias appupdate="docker compose pull && docker compose up -d --force-recreate"
|
||||
end
|
||||
|
||||
# ─< g stands for git >─────────────────────────────────────────────────────────────────────
|
||||
if command -v git >/dev/null 2>&1
|
||||
alias g="git"
|
||||
alias gs="git status"
|
||||
alias gf="git fetch"
|
||||
alias gf="git fetch && git merge"
|
||||
alias gc="git clone --recurse-submodule"
|
||||
alias ga="git add"
|
||||
alias gp="git pull --recurse-submodule"
|
||||
alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push"
|
||||
alias gcm="git commit -m"
|
||||
alias gpu="git push --recurse-submodule=on-demand"
|
||||
if command -v lazygit >/dev/null 2>&1
|
||||
alias lg="lazygit"
|
||||
end
|
||||
end
|
||||
|
||||
# ─< fastfetch >────────────────────────────────────────────────────────────────────────────
|
||||
# ─< colorized ls >─────────────────────────────────────────────────────────────────────────
|
||||
# ─< lsd >──────────────────────────────────────────────────────────────────────────────────
|
||||
if command -v lsd >/dev/null 2>&1
|
||||
alias ls="lsd --long --git"
|
||||
alias l="lsd -1 --almost-all"
|
||||
alias ll="lsd -lA"
|
||||
alias clearl="command clear && l"
|
||||
alias tree="lsd --tree"
|
||||
else
|
||||
# ─< exa >──────────────────────────────────────────────────────────────────────────────────
|
||||
if command -v exa >/dev/null 2>&1
|
||||
alias ls="exa --icons --long --git"
|
||||
alias l="exa --icons -l"
|
||||
alias ll="exa --icons -laa"
|
||||
alias tree="exa --icons -l -tree"
|
||||
else
|
||||
# ─< eza >──────────────────────────────────────────────────────────────────────────────────
|
||||
if command -v eza >/dev/null 2>&1
|
||||
alias ls="eza --icons --long --git"
|
||||
alias l="eza --icons -l"
|
||||
alias ll="eza --icons -laa"
|
||||
alias tree="eza --icons -l -tree"
|
||||
else
|
||||
# ─< if nothing works -- plain old ls >─────────────────────────────────────────────────────
|
||||
alias ls="ls --color=always -lph"
|
||||
alias l="ls --color=always -lph"
|
||||
alias ll="ls --color=always -lAph"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# ─< set alias for clearl >─────────────────────────────────────────────────────────────────
|
||||
if alias l >/dev/null 2>&1
|
||||
alias clearl="command clear && l"
|
||||
end
|
||||
|
||||
# ─< colored everything >───────────────────────────────────────────────────────────────────
|
||||
alias ip="ip --color=always"
|
||||
|
||||
# ─< check for rg >─────────────────────────────────────────────────────────────────────────
|
||||
if command -v rg >/dev/null 2>&1
|
||||
alias grep="rg --color=always"
|
||||
else
|
||||
alias grep="grep --color=always"
|
||||
end
|
||||
|
||||
# ─< weather >──────────────────────────────────────────────────────────────────────────────
|
||||
alias www="curl wttr.in/Ulm"
|
||||
|
||||
# ─< rsync >────────────────────────────────────────────────────────────────────────────────
|
||||
if command -v rsync >/dev/null 2>&1
|
||||
|
@ -190,41 +73,6 @@ if command -v bat >/dev/null 2>&1
|
|||
alias gd="bat --diff"
|
||||
end
|
||||
|
||||
# ─< t stands for tmux >────────────────────────────────────────────────────────────────────
|
||||
if command -v tmux >/dev/null 2>&1
|
||||
alias ts="tmux source $HOME/.tmux.conf"
|
||||
alias t="tmux"
|
||||
end
|
||||
|
||||
# ─< d stands for docker >──────────────────────────────────────────────────────────────────
|
||||
if command -v docker >/dev/null 2>&1
|
||||
alias up="docker compose up"
|
||||
alias down="docker compose down"
|
||||
alias pull="docker compose pull"
|
||||
alias d="docker"
|
||||
alias dr="docker run --rm -it"
|
||||
alias ds="docker ps -a"
|
||||
alias dc="docker compose"
|
||||
alias appupdate="docker compose pull && docker compose up -d --force-recreate"
|
||||
end
|
||||
|
||||
# ─< g stands for git >─────────────────────────────────────────────────────────────────────
|
||||
if command -v git >/dev/null 2>&1
|
||||
alias g="git"
|
||||
alias gs="git status"
|
||||
alias gf="git fetch"
|
||||
alias gf="git fetch && git merge"
|
||||
alias gc="git clone --recurse-submodule"
|
||||
alias ga="git add"
|
||||
alias gp="git pull --recurse-submodule"
|
||||
alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push"
|
||||
alias gcm="git commit -m"
|
||||
alias gpu="git push --recurse-submodule=on-demand"
|
||||
if command -v lazygit >/dev/null 2>&1
|
||||
alias lg="lazygit"
|
||||
end
|
||||
end
|
||||
|
||||
# ─< fastfetch >────────────────────────────────────────────────────────────────────────────
|
||||
if command -v fastfetch >/dev/null 2>&1
|
||||
alias ff="fastfetch"
|
||||
|
@ -252,3 +100,66 @@ if command -v nmap >/dev/null 2>&1
|
|||
alias portscan="sudo nmap -sT"
|
||||
alias ps="portscan"
|
||||
end
|
||||
|
||||
# ─< t stands for tmux >────────────────────────────────────────────────────────────────────
|
||||
if command -v tmux >/dev/null 2>&1
|
||||
alias ts="tmux source $HOME/.tmux.conf"
|
||||
alias t="tmux"
|
||||
end
|
||||
|
||||
# ─< d stands for docker >──────────────────────────────────────────────────────────────────
|
||||
if command -v docker >/dev/null 2>&1
|
||||
alias up="docker compose up"
|
||||
alias down="docker compose down"
|
||||
alias pull="docker compose pull"
|
||||
alias d="docker"
|
||||
alias dr="docker run --rm -it"
|
||||
alias ds="docker ps -a"
|
||||
alias dc="docker compose"
|
||||
alias appupdate="docker compose pull && docker compose up -d --force-recreate"
|
||||
end
|
||||
|
||||
# ─< g stands for GIT >─────────────────────────────────────────────────────────────────────
|
||||
if command -v git >/dev/null 2>&1
|
||||
alias g="git"
|
||||
alias gs="git status"
|
||||
alias gm='git checkout main && git merge'
|
||||
alias gc="git clone --recurse-submodule"
|
||||
alias ga="git add"
|
||||
alias gp="git pull --recurse-submodule"
|
||||
alias gms='git maintenance start'
|
||||
alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push"
|
||||
alias gcm="git commit -m"
|
||||
alias gpu="git push --recurse-submodule=on-demand"
|
||||
if command -v lazygit >/dev/null 2>&1
|
||||
alias lg="lazygit"
|
||||
end
|
||||
end
|
||||
|
||||
# ╭────────╮
|
||||
# │ CODING │
|
||||
# ╰────────╯
|
||||
|
||||
# ─< h stands for HUGO >──────────────────────────────────────────────────────────────────
|
||||
if command -v hugo >/dev/null 2>&1
|
||||
alias h='hugo'
|
||||
alias hs='hugo server -D --noHTTPCache'
|
||||
end
|
||||
|
||||
# ─< VSCodium >─────────────────────────────────────────────────────────────────────────────
|
||||
if command -v codium >/dev/null 2>&1
|
||||
alias code="codium"
|
||||
set -e EDITOR
|
||||
set -p EDITOR codium
|
||||
end
|
||||
|
||||
# ─< neovide, the best frontend for any neovim-config >───────────────────────────────────
|
||||
if test -d $HOME/.local/share/neovide/
|
||||
if command -v neovide >/dev/null 2>&1
|
||||
alias nvim='neovide --fork'
|
||||
else
|
||||
set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage') || set -p neovide "neovide"
|
||||
alias nvim="$neovide"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue