Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autojump not working for my macOS Sierra #473

Open
r0c opened this issue Mar 2, 2017 · 7 comments
Open

autojump not working for my macOS Sierra #473

r0c opened this issue Mar 2, 2017 · 7 comments

Comments

@r0c
Copy link

r0c commented Mar 2, 2017

I have tried to install autojump via homebrew and manual steps, both not working.
There are no errors reported during the installation stage, but no double-underscore are shown after I press tab twice.

Hope the following info can help the debugging.

shell version:

➜  ~ zsh --version
zsh --version
zsh 5.2 (x86_64-apple-darwin16.0)

autojump version:

➜  ~ j -v
autojump v22.5.1

where is autojump installed:

➜  ~ tail -n 1 ~/.zshrc
[[ -s /Users/enzow/.autojump/etc/profile.d/autojump.sh ]] && source /Users/enzow/.autojump/etc/profile.d/autojump.sh

what's the definition of j

➜  ~ which j
which j
j () {
	if [[ ${1} = -* ]] && [[ ${1} != "--" ]]
	then
		autojump ${@}
		return
	fi
	setopt localoptions noautonamedirs
	local output="$(autojump ${@})"
	if [[ -d "${output}" ]]
	then
		if [ -t 1 ]
		then
			echo -e "\\033[31m${output}\\033[0m"
		else
			echo -e "${output}"
		fi
		cd "${output}"
	else
		echo "autojump: directory '${@}' not found"
		echo "\n${output}\n"
		echo "Try \`autojump --help\` for more information."
		false
	fi
}

Please let me know if any info are missing here.

@tennysondy
Copy link

meet the same problem

@fntneves
Copy link

I'm experiencing the same issue

@tylucaskelley
Copy link

Same issue for me, using Bash 4 on macOS 10.12. Autojump version is 22.5.1. My .bashrc is set up according to the recommendations and there were no installation issues. Whenever I change to another directory, it's not added to the autojump.txt file.

screen shot 2017-06-20 at 12 06 34 am

@bendem
Copy link

bendem commented Jun 21, 2017

I have it working just fine so this has to be something specific to your environment. Make sure your user has the right to write to ~/Library/autojump/autojump.txt.

@tylucaskelley
Copy link

Turns out the issue was with my PROMPT_COMMAND being set to something else; should have thought of this but I'd installed autojump well after setting my prompt command. I wonder if it'd be beneficial to not only have this warning in the manpage but also in the post-install text when installing via Homebrew?

@bendem
Copy link

bendem commented Jun 21, 2017

That problem is specified in the man already (under Known issues). You could probably propose a pull request to homebrew (the file to change is https://github.com/Homebrew/homebrew-core/blob/b211145/Formula/autojump.rb#L26)

@alexyalunin
Copy link

This helped me #511 (comment):

You have to cd <dirname> first than autojump will remember it for you the next time you call j <dirname>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants