From 21fd969f40c83826fbe2ff8e784280a37a954820 Mon Sep 17 00:00:00 2001 From: Stimim Date: Thu, 20 Apr 2017 22:21:07 +0800 Subject: [PATCH] plugins: autojump: support debian system as title, load autojump.sh in debian system. --- plugins/available/autojump.plugin.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/available/autojump.plugin.bash b/plugins/available/autojump.plugin.bash index 7ba98879..9bbbdceb 100644 --- a/plugins/available/autojump.plugin.bash +++ b/plugins/available/autojump.plugin.bash @@ -1,8 +1,10 @@ cite about-plugin about-plugin 'Autojump configuration, see https://github.com/wting/autojump for more details' -# Only supports the Homebrew variant at the moment. +# Only supports the Homebrew variant and Debian at the moment. # 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 . $(brew --prefix)/etc/profile.d/autojump.sh +elif command -v dpkg &>/dev/null && dpkg -s autojump &>/dev/null ; then + . "$(dpkg-query -S autojump.sh | cut -d' ' -f2)" fi