From: martin f. krafft Date: Wed, 21 Aug 2019 05:08:51 +0000 (+1200) Subject: do not glob for mkdir X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/b4d04354a46d9574d91b0892187e9e669ff03c21?ds=sidebyside do not glob for mkdir --- diff --git a/.gitignore.d/zsh b/.gitignore.d/zsh index 4bb5d0a..f18815c 100644 --- a/.gitignore.d/zsh +++ b/.gitignore.d/zsh @@ -17,6 +17,7 @@ !/.zsh/aliases/locate !/.zsh/aliases/ls !/.zsh/aliases/mcd +!/.zsh/aliases/mkdir !/.zsh/aliases/mps !/.zsh/aliases/.noglob !/.zsh/aliases/of diff --git a/.zsh/aliases/mkdir b/.zsh/aliases/mkdir new file mode 120000 index 0000000..ea7fe33 --- /dev/null +++ b/.zsh/aliases/mkdir @@ -0,0 +1 @@ +.noglob \ No newline at end of file diff --git a/.zsh/themes/prompt_madduck_setup b/.zsh/themes/prompt_madduck_setup index 14e85ef..64f7bc0 100644 --- a/.zsh/themes/prompt_madduck_setup +++ b/.zsh/themes/prompt_madduck_setup @@ -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.+.)' -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' diff --git a/.zsh/zshrc/20-tempfile+dir_functions b/.zsh/zshrc/20-tempfile+dir_functions index f44c058..6781557 100644 --- a/.zsh/zshrc/20-tempfile+dir_functions +++ b/.zsh/zshrc/20-tempfile+dir_functions @@ -10,9 +10,10 @@ cdt() { emulate -L zsh REPLY=$(mktemp -td ${1:-cdt}.XXXXXX) - builtin cd $REPLY + builtin cd "$REPLY" rm -f ${TMPDIR:-/tmp}/cdt.latest - ln -s $REPLY ${TMPDIR:-/tmp}/cdt.latest + ln -s "$REPLY" ${TMPDIR:-/tmp}/cdt.latest + echo "$REPLY" } _cdt() { @@ -38,9 +39,9 @@ vit() { esac done REPLY=$(mktemp -t ${prefix:-vit}-XXXXXX.txt) - [ -n "$stdin" ] && cat >| $REPLY - sensible-editor +start $REPLY /dev/tty - ln -sf $REPLY ${TMPDIR:-/tmp}/vit.latest + [ -n "$stdin" ] && cat >| "$REPLY" + sensible-editor +start "$REPLY" /dev/tty + ln -sf "$REPLY" ${TMPDIR:-/tmp}/vit.latest echo "$REPLY" } _vit() {