Fix mkcd alias, add some shellfunctions

cd is a built-in shell command that changes the internal shell state
via the chdir() syscall. This cannot be called from a script.
This commit is contained in:
Riyyi
2021-03-02 20:29:56 +01:00
parent a13f317d7d
commit 3668abad9b
2 changed files with 15 additions and 8 deletions
+10 -4
View File
@@ -34,10 +34,6 @@ java_run () {
java -cp './out' "$1"
}
mkcd() {
mkdir -p "$1" && cd "$1" || exit
}
# Search for packages, by name only
pacman_search() {
pacman -Ss "$1" --color=always | \
@@ -90,6 +86,16 @@ screencast() {
fi
}
sha384sum() {
tmpfile=$(mktemp)
curl -o "$tmpfile" "$1" && openssl dgst -sha384 -binary "$tmpfile" | openssl base64 -A
rm -f "$tmpfile"
}
shuffle() {
echo "$1" | fold -w 1 | shuf | tr -d '\n'
}
stream() {
QUALITY=${2:-"720p"}