]> 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:

do not glob for mkdir
authormartin f. krafft <madduck@madduck.net>
Wed, 21 Aug 2019 05:08:51 +0000 (17:08 +1200)
committermartin f. krafft <madduck@madduck.net>
Wed, 21 Aug 2019 05:08:51 +0000 (17:08 +1200)
.gitignore.d/zsh
.zsh/aliases/mkdir [new symlink]
.zsh/themes/prompt_madduck_setup
.zsh/zshrc/20-tempfile+dir_functions

index 4bb5d0a13e8abb87b78ea0b76005fe2113d89ac4..f18815c0c37d59d668e5b9b90eb830e57f6a9458 100644 (file)
@@ -17,6 +17,7 @@
 !/.zsh/aliases/locate
 !/.zsh/aliases/ls
 !/.zsh/aliases/mcd
 !/.zsh/aliases/locate
 !/.zsh/aliases/ls
 !/.zsh/aliases/mcd
+!/.zsh/aliases/mkdir
 !/.zsh/aliases/mps
 !/.zsh/aliases/.noglob
 !/.zsh/aliases/of
 !/.zsh/aliases/mps
 !/.zsh/aliases/.noglob
 !/.zsh/aliases/of
diff --git a/.zsh/aliases/mkdir b/.zsh/aliases/mkdir
new file mode 120000 (symlink)
index 0000000..ea7fe33
--- /dev/null
@@ -0,0 +1 @@
+.noglob
\ No newline at end of file
index 14e85ef665af0a2d15fd6a7671cf04ce7818c679..64f7bc0977a67191f431f0e7d84b8eae9100fb19 100644 (file)
@@ -49,7 +49,7 @@ __get_prompt_psvar_style() {
 # but $PS1 then contains these as default values for each psvar element, i.e.
 # we can override psvar[1] later, but we don't have to
 psvar[1]='%(2L.+.)'
 # but $PS1 then contains these as default values for each psvar element, i.e.
 # we can override psvar[1] later, but we don't have to
 psvar[1]='%(2L.+.)'
-psvar[2]="$DEBIAN_CHROOT"
+psvar[2]="$SUBSHELL_PREFIX"
   zstyle :madduck:prompt:default psvar2-style-pre '%S'
   zstyle :madduck:prompt:default psvar2-style-post '%s@'
 psvar[3]='%m'
   zstyle :madduck:prompt:default psvar2-style-pre '%S'
   zstyle :madduck:prompt:default psvar2-style-post '%s@'
 psvar[3]='%m'
index f44c0582bf36edbd47b379ac5833146b8eb9bf8d..6781557728e351b76b2a6e455e3e17ee60b91ff1 100644 (file)
 cdt() {
   emulate -L zsh
   REPLY=$(mktemp -td ${1:-cdt}.XXXXXX)
 cdt() {
   emulate -L zsh
   REPLY=$(mktemp -td ${1:-cdt}.XXXXXX)
-  builtin cd $REPLY
+  builtin cd "$REPLY"
   rm -f ${TMPDIR:-/tmp}/cdt.latest
   rm -f ${TMPDIR:-/tmp}/cdt.latest
-  ln -s $REPLY ${TMPDIR:-/tmp}/cdt.latest
+  ln -s "$REPLY" ${TMPDIR:-/tmp}/cdt.latest
+  echo "$REPLY"
 }
 
 _cdt() {
 }
 
 _cdt() {
@@ -38,9 +39,9 @@ vit() {
     esac
   done
   REPLY=$(mktemp -t ${prefix:-vit}-XXXXXX.txt)
     esac
   done
   REPLY=$(mktemp -t ${prefix:-vit}-XXXXXX.txt)
-  [ -n "$stdin" ] && cat >| $REPLY
-  sensible-editor +start $REPLY </dev/tty >/dev/tty
-  ln -sf $REPLY ${TMPDIR:-/tmp}/vit.latest
+  [ -n "$stdin" ] && cat >| "$REPLY"
+  sensible-editor +start "$REPLY" </dev/tty >/dev/tty
+  ln -sf "$REPLY" ${TMPDIR:-/tmp}/vit.latest
   echo "$REPLY"
 }
 _vit() {
   echo "$REPLY"
 }
 _vit() {