From 065cb49ab201e5d41822f8fad0af10680173fc89 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Wed, 29 May 2024 15:37:28 +0300 Subject: [PATCH] {bash,zsh}rc: aliases for pnpm, prettier, jekyll --- rc/bashrc | 22 +++++++++++++++++++++- rc/zshrc | 22 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/rc/bashrc b/rc/bashrc index 7df66d60..e23e8278 100755 --- a/rc/bashrc +++ b/rc/bashrc @@ -575,7 +575,27 @@ alias rm="\rm --verbose" alias ln="\ln --verbose" alias mkdir="\mkdir --verbose" alias chattr="\chattr -V" -alias chmod=--"\chmod --verbose" +alias chmod="\chmod --verbose" + +# pnpm does less duplicating around +if hash pnpm 2>/dev/null; then + alias npm=pnpm + alias npmx=pnpx + alias npx=pnpx + alias pnpmx=pnpx + if ! hash prettier 2>/dev/null; then + alias prettier="pnpx prettier" + fi +fi + +# github-pages etc. +if hash bundle 2>/dev/null; then + alias jekyll="bundle exec jekyll" +fi + +# Helpful tool for increasing permissions on Android, for me mainly unattended +# installations. +alias shizuku="adb shell sh /storage/emulated/0/Android/data/moe.shizuku.privileged.api/start.sh" # Allow custom aliases to be put in .aliases or .bash_aliases . diff --git a/rc/zshrc b/rc/zshrc index cb330a86..5480ecd9 100755 --- a/rc/zshrc +++ b/rc/zshrc @@ -565,7 +565,27 @@ alias rm="\rm --verbose" alias ln="\ln --verbose" alias mkdir="\mkdir --verbose" alias chattr="\chattr -V" -alias chmod=--"\chmod --verbose" +alias chmod="\chmod --verbose" + +# pnpm does less duplicating around +if hash pnpm 2>/dev/null; then + alias npm=pnpm + alias npmx=pnpx + alias npx=pnpx + alias pnpmx=pnpx + if ! hash prettier 2>/dev/null; then + alias prettier="pnpx prettier" + fi +fi + +# github-pages etc. +if hash bundle 2>/dev/null; then + alias jekyll="bundle exec jekyll" +fi + +# Helpful tool for increasing permissions on Android, for me mainly unattended +# installations. +alias shizuku="adb shell sh /storage/emulated/0/Android/data/moe.shizuku.privileged.api/start.sh" # Allow custom aliases to be put in .aliases or .zsh_aliases .