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