[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 #!/bin/sh
#correct some fast tipped cds #correct some fast tipped cds
function c { c() {
if [ $1 == "d.." ]; then if [ "$1" == "d.." ]; then
cd ..; cd ..;
pwd; pwd;
fi fi
if [ -d $1 ]; then if [ -d "$1" ]; then
cd $1; cd "$1";
pwd; pwd;
fi fi
return 0; return 0;