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

disable XDG_DATA_HOME for now

Some people will scream, but XDG_DATA_HOME is broken for now, since
it is not changed when you "su" from a terminal.
This commit is contained in:
Joel Schaerer 2010-10-01 16:36:41 +02:00
parent e04382358b
commit c877a51ad6
2 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,8 @@ _autojump()
done < <(autojump --bash --completion $cur) done < <(autojump --bash --completion $cur)
} }
complete -F _autojump j complete -F _autojump j
data_dir=${XDG_DATA_HOME:-$([ -e ~/.local/share ] && echo ~/.local/share || echo ~)} #data_dir=${XDG_DATA_HOME:-$([ -e ~/.local/share ] && echo ~/.local/share || echo ~)}
data_dir=$([ -e ~/.local/share ] && echo ~/.local/share || echo ~)
if [[ "$data_dir" = "${HOME}" ]] if [[ "$data_dir" = "${HOME}" ]]
then then
export AUTOJUMP_DATA_DIR=${data_dir} export AUTOJUMP_DATA_DIR=${data_dir}

View File

@ -14,7 +14,8 @@
#You should have received a copy of the GNU General Public License #You should have received a copy of the GNU General Public License
#along with autojump. If not, see <http://www.gnu.org/licenses/>. #along with autojump. If not, see <http://www.gnu.org/licenses/>.
local data_dir=${XDG_DATA_HOME:-$([ -e ~/.local/share ] && echo ~/.local/share || echo ~)} #local data_dir=${XDG_DATA_HOME:-$([ -e ~/.local/share ] && echo ~/.local/share || echo ~)}
local data_dir=$([ -e ~/.local/share ] && echo ~/.local/share || echo ~)
if [[ "$data_dir" = "${HOME}" ]] if [[ "$data_dir" = "${HOME}" ]]
then then
export AUTOJUMP_DATA_DIR=${data_dir} export AUTOJUMP_DATA_DIR=${data_dir}