aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-06-04 12:53:08 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-06-04 12:53:08 +1200
commit314454eb4bcf6a422c07a53e8302d1a4b19b4512 (patch)
tree61777f96d6ecd9b0d1df55af44fed43ee5db856c /bash/bashrc.d
parentSupport -p option to vared (diff)
downloaddotfiles-314454eb4bcf6a422c07a53e8302d1a4b19b4512.tar.gz
dotfiles-314454eb4bcf6a422c07a53e8302d1a4b19b4512.zip
Correct argument test in bd() and prompt()
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r--bash/bashrc.d/bd.bash2
-rw-r--r--bash/bashrc.d/prompt.bash2
2 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc.d/bd.bash b/bash/bashrc.d/bd.bash
index 2bc70f18..73e98299 100644
--- a/bash/bashrc.d/bd.bash
+++ b/bash/bashrc.d/bd.bash
@@ -2,7 +2,7 @@
bd() {
# If there are no arguments, we just move up one directory (cd ..)
- if [[ $1 ]] ; then
+ if (($#)) ; then
dir="${PWD%/$1*}"/"$1"
else
dir=..
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index d9a99c8c..9ade2c80 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -2,7 +2,7 @@
prompt() {
# If no arguments, print the prompt strings as they are
- if [[ ! $1 ]] ; then
+ if ! (($#)) ; then
declare -p PS1 PS2 PS3 PS4
return
fi