summaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2024-01-27 12:48:07 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2024-01-27 12:49:08 +0000
commit6ae73b8c76e070af8216d22f0991f0f4594b0fdb (patch)
treea3d046657573a3c717e5e98d3ee4b9a8722e7963 /zsh
parent2948545ace2a5d9aa0389eaba3f6f1b0e83cd1cd (diff)
zsh: Add ‘pm’ function
Diffstat (limited to 'zsh')
-rw-r--r--zsh/functions/pm6
-rw-r--r--zsh/rc3
2 files changed, 8 insertions, 1 deletions
diff --git a/zsh/functions/pm b/zsh/functions/pm
new file mode 100644
index 0000000..00cdc73
--- /dev/null
+++ b/zsh/functions/pm
@@ -0,0 +1,6 @@
+# -*- mode: shell-script -*-
+
+pm() {
+ PS1="🔒 ${PS1}"
+ fc -p
+}
diff --git a/zsh/rc b/zsh/rc
index f0eb719..89e92c9 100644
--- a/zsh/rc
+++ b/zsh/rc
@@ -10,7 +10,7 @@
done
}
-autoload -Uz compinit zmv
+autoload -Uz compinit pm zmv
[[ ! -d ${XDG_CACHE_HOME}/zsh ]] && mkdir -p ${XDG_CACHE_HOME}/zsh
zstyle ':completion:*' cache-path ${XDG_CACHE_HOME}/zsh/cache
@@ -43,6 +43,7 @@ alias la='ls -A'
alias ll='ls -hl'
alias lla='ls -Ahl'
alias mv='mv -i'
+alias pm=' pm'
alias rm='rm -i'
alias senv='env | sort'