1
0
Fork 0

zsh: integrate doas

This commit is contained in:
tastytea 2024-01-04 23:09:27 +01:00
parent 5986988c0c
commit d0a5e85dd6
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 8 additions and 9 deletions

View File

@ -24,6 +24,13 @@ alias man="LC_MESSAGES=C man"
alias make="LC_MESSAGES=C make"
alias free="LC_MESSAGES=C free"
local sucmd=sudo
if type doas >& -; then
sucmd=doas
fi
alias please=${sucmd}
alias 🥺=${sucmd}
if [[ ${VISUAL} == *emacs(client|remote)* ]]; then
local tmp_editor="${VISUAL/ -c/}"
local ec_opts=""
@ -38,7 +45,7 @@ if [[ ${VISUAL} == *emacs(client|remote)* ]]; then
fi
else
alias e="${VISUAL}"
alias se="sudo ${VISUAL}"
alias se="${sucmd} ${VISUAL}"
fi
alias ta="tmux attach -t tastytea || tmux new-session -s tastytea"
@ -53,14 +60,6 @@ alias config="${_tmp_config_alias}"
unset _tmp_config_alias
alias edot="GIT_DIR=${HOME}/.dotfiles GIT_WORK_TREE=${HOME} ${VISUAL}"
if type doas >& -; then
alias please='doas'
alias 🥺='doas'
else
alias please='sudo'
alias 🥺='sudo'
fi
alias cmake_static='cmake -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" -DBUILD_SHARED_LIBS=OFF -D CMAKE_EXE_LINKER_FLAGS="-static"'
# Ask before removing crontab.