[shell/cd] add duoble quotes to prevent word splitting

This commit is contained in:
Felix Buehler 2019-05-18 17:07:54 +02:00
parent 2ac5a8c4a0
commit e55c4733c9

View file

@ -1,13 +1,13 @@
#!/bin/sh
#correct some fast tipped cds
function c {
if [ $1 == "d.." ]; then
c() {
if [ "$1" == "d.." ]; then
cd ..;
pwd;
fi
if [ -d $1 ]; then
cd $1;
if [ -d "$1" ]; then
cd "$1";
pwd;
fi
return 0;