Update autojump.plugin.bash

pull/972/head
nikitinvasily 2017-05-28 12:59:04 +03:00 committed by GitHub
parent d70f3db3cf
commit 843eb7eca3
1 changed files with 3 additions and 1 deletions

View File

@ -1,10 +1,12 @@
cite about-plugin cite about-plugin
about-plugin 'Autojump configuration, see https://github.com/wting/autojump for more details' about-plugin 'Autojump configuration, see https://github.com/wting/autojump for more details'
# Only supports the Homebrew variant and Debian at the moment. # Only supports the Homebrew variant, Debian and Arch at the moment.
# Feel free to provide a PR to support other install locations # Feel free to provide a PR to support other install locations
if command -v brew &>/dev/null && [[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]]; then if command -v brew &>/dev/null && [[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]]; then
. $(brew --prefix)/etc/profile.d/autojump.sh . $(brew --prefix)/etc/profile.d/autojump.sh
elif command -v dpkg &>/dev/null && dpkg -s autojump &>/dev/null ; then elif command -v dpkg &>/dev/null && dpkg -s autojump &>/dev/null ; then
. "$(dpkg-query -S autojump.sh | cut -d' ' -f2)" . "$(dpkg-query -S autojump.sh | cut -d' ' -f2)"
elif command -v pacman &>/dev/null && pacman -Q autojump &>/dev/null ; then
. "$(pacman -Ql autojump | grep autojump.sh | cut -d' ' -f2)"
fi fi