bash_aliases: cs: only cd to dirname of argument if argument exists in filesystem
This commit is contained in:
parent
206a087d54
commit
034e52399b
10
bash_aliases
10
bash_aliases
@ -271,9 +271,13 @@ if [[ -e /bin/cygwin1.dll ]]; then
|
|||||||
{
|
{
|
||||||
while [[ "$1" != "" ]]
|
while [[ "$1" != "" ]]
|
||||||
do
|
do
|
||||||
dn=$(dirname "$1")
|
if [[ -e "$1" ]]; then
|
||||||
bn=$(basename "$1")
|
dn=$(dirname "$1")
|
||||||
(cd "$dn"; HOME='' cygstart "$bn")
|
bn=$(basename "$1")
|
||||||
|
(cd "$dn"; HOME='' cygstart "$bn")
|
||||||
|
else
|
||||||
|
HOME='' cygstart "$1"
|
||||||
|
fi
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user