From: martin f. krafft Date: Wed, 7 Aug 2019 03:33:22 +0000 (+1200) Subject: enable prefilling of buffer on start X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/32ea2277195ebd8c244f37285f64b135e6ba4d9e?ds=inline;hp=5dc4d9aa8c7835d46aeb8afc2123c5e344a58df4 enable prefilling of buffer on start --- diff --git a/.gitignore.d/zsh b/.gitignore.d/zsh index 17dd223..bfb3413 100644 --- a/.gitignore.d/zsh +++ b/.gitignore.d/zsh @@ -107,5 +107,6 @@ !/.zsh/zshrc/90-run-help !/.zsh/zshrc/95-watch-users !/.zsh/zshrc/99-getpw-override +!/.zsh/zshrc/99-prefill_prompt !/.zsh/zshrc/99-prompt_setup !/.zsh/zshrc/.gitignore diff --git a/.zsh/aliases/rrsh b/.zsh/aliases/rrsh index ea281ba..87ef78b 100644 --- a/.zsh/aliases/rrsh +++ b/.zsh/aliases/rrsh @@ -1,2 +1,2 @@ -() { ssh "${@:-}" -t /bin/su } +() { ssh "${@:-}" -t /bin/su - } compdef ${0}=ssh diff --git a/.zsh/zshrc/99-prefill_prompt b/.zsh/zshrc/99-prefill_prompt new file mode 100644 index 0000000..0b2562e --- /dev/null +++ b/.zsh/zshrc/99-prefill_prompt @@ -0,0 +1,15 @@ +# +# Allow prefilling of the prompt buffer +# +# Copyright © 1994–2019 martin f. krafft +# Released under the terms of the Artistic Licence 2.0 +# +# Source repository: http://git.madduck.net/v/etc/zsh.git +# + +if [[ -n "$ZSH_PREFILL_CMD" ]]; then + print -z - $ZSH_PREFILL_CMD + unset ZSH_PREFILL_CMD +fi + +# vim:ft=zsh