1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Open EDITOR if output of autojump is a file

This commit is contained in:
Ashwin Vishnu 2019-07-27 12:17:12 +02:00
parent cea75c27fe
commit 73694897c3
2 changed files with 4 additions and 0 deletions

View File

@ -67,6 +67,8 @@ j() {
echo -e "${output}" echo -e "${output}"
fi fi
cd "${output}" cd "${output}"
elif [[ -f "${output}" ]]; then
$EDITOR "${output}"
else else
echo "autojump: directory '${@}' not found" echo "autojump: directory '${@}' not found"
echo "\n${output}\n" echo "\n${output}\n"

View File

@ -61,6 +61,8 @@ j() {
echo -e "${output}" echo -e "${output}"
fi fi
cd "${output}" cd "${output}"
elif [[ -f "${output}" ]]; then
$EDITOR "${output}"
else else
echo "autojump: directory '${@}' not found" echo "autojump: directory '${@}' not found"
echo "\n${output}\n" echo "\n${output}\n"