1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 02:49:02 -08:00

flesh out some compatibility stuff i forgot

This commit is contained in:
Connor Olding 2021-09-23 07:15:19 -07:00
parent e2f7fddb60
commit 552ddc6080
5 changed files with 13 additions and 3 deletions

9
sh/aur
View file

@ -1,8 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# http://aur.sh with massive feature creep # http://aur.sh with massive feature creep
# YES_ZSH # NO_ZSH
# YES_BASH
# TODO: check compatibility with bash and dash. # NO_DASH
# NO_ASH
aur() { ### @- aur() { ### @-
### download, edit, make, and install packages from the ### download, edit, make, and install packages from the
@ -136,4 +137,6 @@ aur() { ### @-
[ "$fail" -eq 0 ] && return 0 || return 1 [ "$fail" -eq 0 ] && return 0 || return 1
} }
[ -n "${preload+-}" ] || . ~/sh/preload || exit 2
eval ${preload:-preload} confirm
[ -n "${preload+-}" ] || aur "$@" [ -n "${preload+-}" ] || aur "$@"

View file

@ -2,6 +2,7 @@
# YES_ZSH # YES_ZSH
# YES_BASH # YES_BASH
# NO_DASH # NO_DASH
# NO_ASH
### @ confirm ### @ confirm
### display a simple yes-or-no prompt and return 0-or-1 respectively. ### display a simple yes-or-no prompt and return 0-or-1 respectively.

View file

@ -2,6 +2,9 @@
# YES_ZSH # YES_ZSH
# YES_BASH # YES_BASH
# YES_DASH # YES_DASH
# YES_ASH
# works with busybox awk.
countdiff() { ### @- countdiff() { ### @-
### count the number of lines changed between two files. ### count the number of lines changed between two files.

1
sh/ff
View file

@ -2,6 +2,7 @@
# YES_ZSH # YES_ZSH
# YES_BASH # YES_BASH
# YES_DASH # YES_DASH
# YES_ASH
ff() { ### @- ff() { ### @-
### select a file from a given or current directory using ### select a file from a given or current directory using

View file

@ -4,6 +4,8 @@
# YES_DASH # YES_DASH
# YES_ASH # YES_ASH
# works with busybox awk.
wipe() { ### @- wipe() { ### @-
### clear the screen and its scrollback, then print a high-contrast horizontal line. ### clear the screen and its scrollback, then print a high-contrast horizontal line.
### using this, you'll know with absolute certainty that you're looking at the top of your history, ### using this, you'll know with absolute certainty that you're looking at the top of your history,