about summary refs log tree commit diff stats
path: root/bash/functions.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/functions.bash')
-rw-r--r--bash/functions.bash21
1 files changed, 21 insertions, 0 deletions
diff --git a/bash/functions.bash b/bash/functions.bash index debea2c..4241c8d 100644 --- a/bash/functions.bash +++ b/bash/functions.bash
@@ -139,3 +139,24 @@ up() {
139 UP_SPECIALARGS= 139 UP_SPECIALARGS=
140 return "$ret" 140 return "$ret"
141} 141}
142
143apk() { # wrapper for apk(1)
144 apk="$(which apk)"
145 test -z "$apk" && return 1
146 case "$1" in
147 add|del|fix|update|upgrade) doas "$apk" "$@" ;;
148 install) shift; apk add "$@" ;;
149 remove) shift; apk del "$@" ;;
150 *) "$apk" "$@" ;;
151 esac
152}
153
154sl() {
155 printf >&2 '%s\n' "CHOO CHOO!"
156 ls "$@"
157}
158
159mkssh() {
160 ssh-keygen -t ed25519 -f "$HOME/.ssh/$1"
161 cat "$HOME/.ssh/$1.pub" | tee /dev/stdout | wl-copy
162}