Thanks for reporting the issue. I committed a fix and it will be included in all new appliances.
You can fix it in current releases with the following diff:
/etc/skel/.bashrc
@@ -30,17 +30,17 @@ fi
function realpath()
{
- f=$1
+ f=$@
- if [ -d $f ]; then
+ if [ -d "$f" ]; then
base=""
- dir=$f
+ dir="$f"
else
- base="/$(basename $f)"
- dir=$(dirname $f)
+ base="/$(basename "$f")"
+ dir=$(dirname "$f")
fi
Thanks for reporting the issue. I committed a fix and it will be included in all new appliances.
You can fix it in current releases with the following diff:
/etc/skel/.bashrc
@@ -30,17 +30,17 @@ fi
function realpath()
{
- f=$1
+ f=$@
- if [ -d $f ]; then
+ if [ -d "$f" ]; then
base=""
- dir=$f
+ dir="$f"
else
- base="/$(basename $f)"
- dir=$(dirname $f)
+ base="/$(basename "$f")"
+ dir=$(dirname "$f")
fi
- dir=$(cd $dir && /bin/pwd)
+ dir=$(cd "$dir" && /bin/pwd)
echo "$dir$base"
path= $(echo $realpwd | sed "s|^$realhome|\~|") ))/$(basename "$path") $(basename $path_dir) $(basename $PWD) $(basename "$path_dir") $(basename "$PWD")
}
@@ -53,10 +53,10 @@ promptpath () {
# if we are in the home directory
if echo $realpwd | grep -q "^$realhome"; then
- if [ $path = "~" ] || [ $(dirname $path) = "~" ]; then
+ if [ "$path" = "~" ] || [ "$(dirname "$path")" = "~" ]; then
echo $path
else
- echo $(basename $(dirname $path))/$(basename $path)
+ echo $(basename $(dirname "$path"
fi
return
fi
@@ -66,8 +66,8 @@ promptpath () {
if [ $(dirname $path_dir) = "/" ]; then
echo $PWD
else
- path_parent=
- path_base=
+ path_parent=
+ path_base=
echo $path_parent/ $path_base
fi