zsh: cleanup
This commit is contained in:
parent
f4ca6ba766
commit
f6b14e1efe
2 changed files with 69 additions and 53 deletions
|
@ -1,62 +1,71 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# shellcheck disable=SC2142
|
# shellcheck disable=SC2139
|
||||||
|
|
||||||
for command in apt su ; do
|
for command in apt su; do
|
||||||
alias $command="sudo $command"
|
alias $command="sudo $command"
|
||||||
done; unset command
|
done
|
||||||
|
unset command
|
||||||
|
|
||||||
# Verbosity and settings that you pretty much just always are going to want.
|
# Verbosity and settings that you pretty much just always are going to want.
|
||||||
alias \
|
alias \
|
||||||
cp="cp -iv" \
|
cp='cp -iv' \
|
||||||
mv="mv -iv" \
|
mv='mv -iv' \
|
||||||
rm="rm -vI" \
|
rm='rm -vI' \
|
||||||
bc="bc -ql" \
|
bc='bc -ql' \
|
||||||
mkd="mkdir -pv" \
|
mkd='mkdir -pv' \
|
||||||
ffmpeg="ffmpeg -hide_banner" \
|
ffmpeg='ffmpeg -hide_banner' \
|
||||||
exa="exa -abghHliS" \
|
exa='exa -abghHliS' \
|
||||||
duf="duf -all" \
|
duf='duf -all' \
|
||||||
ls="ls -hN --color=auto --group-directories-first" \
|
ls='ls -hN --color=auto --group-directories-first' \
|
||||||
grep="grep --color=auto" \
|
grep='grep --color=auto' \
|
||||||
diff="diff --color=auto" \
|
diff='diff --color=auto'
|
||||||
|
|
||||||
# Colorize commands when possible.
|
# Colorize commands when possible.
|
||||||
alias \
|
alias \
|
||||||
ls="ls -hN --color=auto --group-directories-first" \
|
ls='ls -hN --color=auto --group-directories-first' \
|
||||||
grep="grep --color=auto" \
|
grep='grep --color=auto' \
|
||||||
diff="diff --color=auto" \
|
diff='diff --color=auto' \
|
||||||
ccat="highlight --out-format=ansi" \
|
ccat='highlight --out-format=ansi' \
|
||||||
ip="ip -color=auto"
|
ip='ip -color=auto'
|
||||||
|
|
||||||
# These common commands are just too long! Abbreviate them.
|
# These common commands are just too long! Abbreviate them.
|
||||||
alias \
|
alias \
|
||||||
ka="killall" \
|
ka='killall' \
|
||||||
e="$EDITOR" \
|
ll='ls -lhpAN --color=auto --group-directories-first' \
|
||||||
are="apt remove" \
|
e='$EDITOR' \
|
||||||
arein="apt reinstall" \
|
are='apt remove' \
|
||||||
ain="apt install" \
|
arein='apt reinstall' \
|
||||||
aur="apt autoremove" \
|
ain='apt install' \
|
||||||
aup="apt upgrade" \
|
aur='apt autoremove' \
|
||||||
ase="apt search" \
|
aup='apt upgrade' \
|
||||||
ash="apt show"
|
ase='apt search' \
|
||||||
|
ash='apt show'
|
||||||
# Misc.
|
|
||||||
alias \
|
|
||||||
ll="ls -lhpAN --color=auto --group-directories-first" \
|
|
||||||
vim="nvim" \
|
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
|
# shellcheck disable=SC2142
|
||||||
alias \
|
alias \
|
||||||
|
di='docker images' \
|
||||||
|
drmi='docker rmi' \
|
||||||
|
dbu='docker build' \
|
||||||
|
drmi_all='docker rmi $(docker images -a -q)' \
|
||||||
|
drmi_dang='docker rmi $(docker images -q -f "dangling=true")' \
|
||||||
|
dhi='docker history' \
|
||||||
dps="docker ps --format 'table {{.Image}}\t{{.Names}}\t{{.Status}}'" \
|
dps="docker ps --format 'table {{.Image}}\t{{.Names}}\t{{.Status}}'" \
|
||||||
dpt="docker ps --format 'table {{.Names}}\t{{.Ports}}'" \
|
dpt="docker ps --format 'table {{.Names}}\t{{.Ports}}'" \
|
||||||
dmn="docker ps --format 'table {{.Names}}\t{{.Mounts}}'" \
|
dmn="docker ps --format 'table {{.Names}}\t{{.Mounts}}'" \
|
||||||
dex="docker exec -it" \
|
drit='docker run -it' \
|
||||||
dlg="docker logs" \
|
deit='docker exec -it' \
|
||||||
dsr="docker start" \
|
dlog='docker logs' \
|
||||||
drs="docker restart" \
|
din='docker inspect' \
|
||||||
drm="docker rm" \
|
dip='docker inspect --format "{{ .NetworkSettings.IPAddress }}"' \
|
||||||
dsp="docker stop" \
|
dstop_all='docker stop $(docker ps -q -f "status=running")' \
|
||||||
din="docker inspect" \
|
drm='docker rm' \
|
||||||
dcp="docker cp" \
|
drm_stopped='docker rm $(docker ps -q -f "status=running")' \
|
||||||
dprune="docker system prune" \
|
drmv_stopped='docker rm -v $* $(docker ps -q -f "status=exited")' \
|
||||||
|
drm_all='docker rm $(docker ps -a -q)' \
|
||||||
|
drmv_all='docker rm -v $(docker ps -a -q)' \
|
||||||
|
dvls='docker volume ls' \
|
||||||
|
dvrm_all='docker volume rm $(docker volume ls -q)' \
|
||||||
|
dvrm_dang='docker volume rm $(docker volume ls -q -f "dangling=true")' \
|
||||||
dbash=' () { docker exec -it $1 /bin/bash }' \
|
dbash=' () { docker exec -it $1 /bin/bash }' \
|
||||||
dsh=' () { docker exec -it $1 /bin/sh }' \
|
dsh=' () { docker exec -it $1 /bin/sh }'
|
||||||
|
|
|
@ -30,15 +30,22 @@ export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
|
||||||
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
|
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
|
||||||
|
|
||||||
# Other program settings:
|
# Other program settings:
|
||||||
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
export FZF_DEFAULT_OPTS="\
|
||||||
export LESS=-R
|
--preview-window nowrap \
|
||||||
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
|
--layout=reverse --cycle \
|
||||||
export LESS_TERMCAP_md="$(printf '%b' '[1;36m')"
|
--color=fg:#c0caf5,bg:,hl:#ff9e64 \
|
||||||
export LESS_TERMCAP_me="$(printf '%b' '[0m')"
|
--color=fg+:#c0caf5,bg+:,hl+:#ff9e64 \
|
||||||
export LESS_TERMCAP_so="$(printf '%b' '[01;44;33m')"
|
--color=info:#7aa2f7,prompt:#7dcfff,pointer:#7dcfff \
|
||||||
export LESS_TERMCAP_se="$(printf '%b' '[0m')"
|
--color=marker:#9ece6a,spinner:#9ece6a,header:#9ece6a \
|
||||||
export LESS_TERMCAP_us="$(printf '%b' '[1;32m')"
|
"
|
||||||
export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
export LESS="-R"
|
||||||
|
export LESS_TERMCAP_md=$(tput bold; tput setaf 4)
|
||||||
|
export LESS_TERMCAP_me=$(tput sgr0)
|
||||||
|
export LESS_TERMCAP_mb=$(tput blink)
|
||||||
|
export LESS_TERMCAP_us=$(tput setaf 2)
|
||||||
|
export LESS_TERMCAP_ue=$(tput sgr0)
|
||||||
|
export LESS_TERMCAP_so=$(tput smso)
|
||||||
|
export LESS_TERMCAP_se=$(tput rmso)
|
||||||
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
|
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
|
||||||
# export VIRTUAL_ENV_DISABLE_PROMPT=1
|
# export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||||
export PYENV_PROMPT=" %F{yellow\}%F{reset\} "
|
export PYENV_PROMPT=" %F{yellow\}%F{reset\} "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue