mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-05-24 11:04:41 +02:00
[shell/cd] add duoble quotes to prevent word splitting
This commit is contained in:
parent
2ac5a8c4a0
commit
e55c4733c9
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue