]> git.madduck.net Git - etc/zsh.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

enable prefilling of buffer on start
authormartin f. krafft <madduck@madduck.net>
Wed, 7 Aug 2019 03:33:22 +0000 (15:33 +1200)
committermartin f. krafft <madduck@madduck.net>
Wed, 7 Aug 2019 03:33:22 +0000 (15:33 +1200)
.gitignore.d/zsh
.zsh/aliases/rrsh
.zsh/zshrc/99-prefill_prompt [new file with mode: 0644]

index 17dd22384ffd51d4dd48bce39f28c0e37410cbe0..bfb34134fcd4c8ee4a43b6c2ce101a84f08d729f 100644 (file)
 !/.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
index ea281ba7f65a162da5e97f46d4196b2123617efc..87ef78bc5ebafb8a037f2ca016248eecc9b7c092 100644 (file)
@@ -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 (file)
index 0000000..0b2562e
--- /dev/null
@@ -0,0 +1,15 @@
+#
+# Allow prefilling of the prompt buffer
+#
+# Copyright © 1994–2019 martin f. krafft <madduck@madduck.net>
+# 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