From 6ae73b8c76e070af8216d22f0991f0f4594b0fdb Mon Sep 17 00:00:00 2001 From: Grégoire Duchêne Date: Sat, 27 Jan 2024 12:48:07 +0000 Subject: zsh: Add ‘pm’ function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/functions/pm | 6 ++++++ zsh/rc | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 zsh/functions/pm (limited to 'zsh') 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' -- cgit v1.2.3-70-g09d2