zsh: ban flatpak --user so i don't accidentally split my shit across installations again

This commit is contained in:
ewin 2025-03-28 07:51:33 -04:00
parent 26abe6efdb
commit ff6fc43102
Signed by: erin
SSH key fingerprint: SHA256:swjoHhREbZPbWe+gyJNi24d4NAxJSyUIm3fpZj4z3wc

View file

@ -48,6 +48,16 @@ if [ "$TERM_PROGRAM" = "vscode" ]; then
alias code='code -r'
fi
# Ban `flatpak --user` for consistency
function flatpak {
if [[ "$*" == *" --user "* ]] || [[ "$*" == *" -u "* ]]; then
echo '`flatpak --user` is illegal, all apps should be in `--system`.' >&2
echo '(Use `command flatpak --user` if you really need to for some reason.)' >&2
return 1
fi
command flatpak $@
}
# A function which toggles the status of a systemd service
function systemctl_toggle {
if systemctl is-active --quiet $1; then