commit b7d5365e74e69917c90c3c6fc7e49675d0de7f4e parent 1d30671229072acb83500b74af871fdf32d52285 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Tue, 19 Jan 2021 11:31:48 +0100 .profile: small improvements in aliases Diffstat:
M | .profile | | | 12 | +++++------- |
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/.profile b/.profile @@ -22,13 +22,16 @@ alias rr='_c="$(tail -2 $HISTFILE | head -1)" && echo "$_c" && doas sh -ec "$_c" alias g=git f() { - $EDITOR $(find "${1:-.}" -type f | fzy -l 25) + $EDITOR "$(find "${1:-.}" -type f | fzy -l 25)" } -if type doas >/dev/null 2>&1; then +if [ -x /usr/bin/doas ]; then alias se='doas $EDITOR' + alias mi="doas make install" else alias se='sudo $EDITOR' + alias doas=sudo + alias mi="sudo make install" fi alias cg='c "$(git rev-parse --show-toplevel)"' # cd under git repo @@ -99,11 +102,6 @@ alias m='make' alias mw='make CFLAGS="-Wall -Wextra -pedantic -std=c99 -g" LDFLAGS="-g"' alias mc='make clean' alias me='make edit' -if type doas >/dev/null 2>&1; then - alias mi="doas make install" -else - alias mi="sudo make install" -fi alias nt='nohup $TERMINAL tmux >/dev/null 2>&1 &'