19 lines
292 B
Bash
Executable file
19 lines
292 B
Bash
Executable file
#!/bin/bash
|
|
|
|
function goto() {
|
|
if [ "$1" == "-l" ]; then
|
|
/usr/lib/goto/resolve "$@"
|
|
return
|
|
fi
|
|
if [[ $# > 1 ]]; then
|
|
for name in "$@"
|
|
do
|
|
jump=$(/usr/lib/goto/resolve "$name")
|
|
builtin cd "$jump"
|
|
done
|
|
return
|
|
fi
|
|
td=$(/usr/lib/goto/resolve "$@")
|
|
builtin cd "$td"
|
|
return
|
|
}
|