Various snippets of Linux commands & scripts I use enough to justify existing on my $PATH

git_fp Link to heading

git fetch & pull

#!/usr/bin/env bash
git fetch
git pull
echo "Fetched n pulled any new content."

git_send Link to heading

git add, commit and push in one

#!/usr/bin/env bash
if [[ $# -eq 0 ]] ; then
    echo 'Expected commit message'
    exit 1
git add .
git commit -m "$1"
git push

decrypt_gpg Link to heading

Decrypt all gpg files in current dir

import os
from pathlib import Path

for path in Path(".").rglob("*.gpg"):
    file_name =
    output_name = file_name.removesuffix(".gpg")
    os.system(f"gpg --output \"{output_name}\" --decrypt \"{file_name}\"")

print("Decrypted all found files.")

fish Link to heading

alias fish=asciiquarium