aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/pushd.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-07-15 00:34:48 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-07-15 00:40:37 +1200
commit8947c4c99f4c1ad92f23e59e84b224cf35e4ff81 (patch)
tree70718ad01791f2ca67133376252cf69a693b14ea /bash/bashrc.d/pushd.bash
parentTerser `read -rd ''` idiom (diff)
downloaddotfiles-8947c4c99f4c1ad92f23e59e84b224cf35e4ff81.tar.gz
dotfiles-8947c4c99f4c1ad92f23e59e84b224cf35e4ff81.zip
Quote expansions within parameter expansions
I made the incorrect assumption that it was safe not to do this; expansions that include glob characters, for example, can cause problems.
Diffstat (limited to 'bash/bashrc.d/pushd.bash')
-rw-r--r--bash/bashrc.d/pushd.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash/bashrc.d/pushd.bash b/bash/bashrc.d/pushd.bash
index 6c8a2174..ec621037 100644
--- a/bash/bashrc.d/pushd.bash
+++ b/bash/bashrc.d/pushd.bash
@@ -1,4 +1,4 @@
# Make pushd default to $HOME if no arguments given, much like cd
pushd() {
- builtin pushd "${@:-$HOME}"
+ builtin pushd "${@:-"$HOME"}"
}