zsh: ban flatpak --user so i don't accidentally split my shit across installations again
This commit is contained in:
parent
26abe6efdb
commit
ff6fc43102
1 changed files with 10 additions and 0 deletions
|
|
@ -48,6 +48,16 @@ if [ "$TERM_PROGRAM" = "vscode" ]; then
|
||||||
alias code='code -r'
|
alias code='code -r'
|
||||||
fi
|
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
|
# A function which toggles the status of a systemd service
|
||||||
function systemctl_toggle {
|
function systemctl_toggle {
|
||||||
if systemctl is-active --quiet $1; then
|
if systemctl is-active --quiet $1; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue