diff --git a/zsh/.config/zsh/config.d/10_aliases.zsh b/zsh/.config/zsh/config.d/10_aliases.zsh index a769305..65d9d93 100644 --- a/zsh/.config/zsh/config.d/10_aliases.zsh +++ b/zsh/.config/zsh/config.d/10_aliases.zsh @@ -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