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
|
||||
|
||||
#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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue