You are not logged in.

#1 2010-12-18 11:16:08

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

New release of Autojump, the cd command that learns

I've just uploaded a new version of autojump. This release bring python 3 compatibility (important for arch!) and fixes quite a few bugs. You can either grab it on Github (https://github.com/joelthelion/autojump/wiki) or wait for the pacman update.

I've also made a tutorial video for people who might not be using autojump yet ;-) : http://www.youtube.com/watch?v=tnNyoMGnbKg

Last edited by lardon (2010-12-18 11:16:39)


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#2 2010-12-22 16:43:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: New release of Autojump, the cd command that learns

I just built up a new box and installed autojump but it isn't working.

I am sourcing /etc/profile in my ~/.bashrc

. /etc/profile
$ cd /dev/shm
$ cd ~
$ j sh
$ 
$ j 
$ j -help
Unknown command line argument: option -h not recognized
-bash: cd: Unknown command line argument: option -h not recognized: No such file or directory

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2010-12-22 19:45:36

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: New release of Autojump, the cd command that learns

Can you post the output of "jumpstat" and "echo $PROMPT_COMMAND" ?


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#4 2010-12-22 19:54:11

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: New release of Autojump, the cd command that learns

Absolutely:

$ jumpstat
Total key weight: 0. Number of stored paths: 0

$ echo $PROMPT_COMMAND
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2010-12-22 21:05:14

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: New release of Autojump, the cd command that learns

That's what I was afraid of, it's a bug in Arch that I reported two days ago: https://bugs.archlinux.org/task/22161?opened=3392&type[0]=&sev[0]=&due[0]=&cat[0]=&status[0]=open&percent[0]=&reported[0]=ja

Basically, autojump is broken in Arch until Allan fixes this bug. The good news is that you can temporarily fix it by sourcing /etc/profile.d/autojump.bash right after sourcing /etc/profile in your .bashrc.


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#6 2010-12-22 21:17:20

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: New release of Autojump, the cd command that learns

@lardon - nice.  Works fine now.  What's odd is that autojump works on my other box without this mod...?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2010-12-22 21:19:06

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: New release of Autojump, the cd command that learns

My guess is that you have a tweaked /etc/profile, and so the new one installed to /etc/profile.pacnew. At least that was the reason I wasn't having the problem on my machine.


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#8 2010-12-22 21:35:15

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: New release of Autojump, the cd command that learns

Hmm... no pacnew files here.

$ cat /etc/profile
# /etc/profile

#Set our umask
umask 022

# Set our default path
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
export PATH

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
    for profile in /etc/profile.d/*.sh; do
        test -r $profile && . $profile
    done
    unset profile
fi

# Source global bash config
if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then
    . /etc/bash.bashrc
fi

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2010-12-22 21:42:33

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: New release of Autojump, the cd command that learns

Is it up to date? If so, it's a mystery smile


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#10 2010-12-22 21:57:43

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: New release of Autojump, the cd command that learns

Yeah, up-to-date.

$ pacman -Qo /etc/profile
/etc/profile is owned by filesystem 2010.12-1

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2010-12-22 22:09:01

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: New release of Autojump, the cd command that learns

Or maybe you have a different .bashrc on that machine? Or /etc/bash.bashrc isn't up-to-date?

In any case it doesn't really matter, I'm glad it works :-D


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#12 2010-12-22 22:53:58

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: New release of Autojump, the cd command that learns

Me too, thanks for the util.  I've passed it around at work and most people love it.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#13 2010-12-29 18:10:35

caminoix
Member
From: cracow, poland
Registered: 2005-07-12
Posts: 162
Website

Re: New release of Autojump, the cd command that learns

Is there a way to reset the database?
When I work a lot on one project, a lot of letters get assigned to it and when I finish and move to another one, it takes very long for autojump to adjust to the new situation. In fact, if the new project is a small one, I often finish it before autojump can adjust. This almost cancels the comfort of autojump for me.

Another idea would be to implement frecency as in z. I haven't switched to it because I miss listing the possibilities (by pressing tab) too much.

In short, the tool is wonderful and I'd be very sad if I had to ditch it because of having used it for too long.

Offline

#14 2010-12-29 21:50:09

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: New release of Autojump, the cd command that learns

Hi caminoix!

What you ask is in fact pretty easy to do. If you want to reset the database completely, simply remove the ~/.local/share/autojump directory. If you'd like autojump to adapt more rapidly to your usage of the command line, reduce the max_keyweight setting directly in /usr/bin/autojump (it's a python file). If you set it to 200 for example, it will adapt much more rapidly.

Hope this helps!


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#15 2011-01-02 10:50:01

caminoix
Member
From: cracow, poland
Registered: 2005-07-12
Posts: 162
Website

Re: New release of Autojump, the cd command that learns

It seems that it did help. Great! Thanks a lot! smile

Offline

#16 2011-01-03 08:36:17

caminoix
Member
From: cracow, poland
Registered: 2005-07-12
Posts: 162
Website

Re: New release of Autojump, the cd command that learns

Oops, it seems that I tested the solution a little too quicky…
The max_keyweight bit was OK but than I decided to fix what wasn't really broken and went on with removing ~/.local/share/autojump. Now the directory does exist but it's empty and I don't seem to be able to make autojump fill it. I cd all over the place and spend time in different locations but it stays empty and jumpstat shows two zeros.
Help, please?

Offline

#17 2011-01-03 08:43:54

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: New release of Autojump, the cd command that learns

Try removing the directory completely? Also check the permissions and the ownership of the folder. Finally, if everything fails, you can post the output of your `env` command, that might give us more info.


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#18 2011-01-03 08:55:33

caminoix
Member
From: cracow, poland
Registered: 2005-07-12
Posts: 162
Website

Re: New release of Autojump, the cd command that learns

Yes, I did a "rm -rf ~/.local/share/autojump". The directory gets recreated as soon as I start a new instance of the terminal. However, it stays empty.

Here's the bit from "ls -l ~/.local/share":

drwxr-xr-x  2 kamil users 4096 Jan  3 09:50 autojump

and here's my `env`:

SAL_USE_VCLPLUGIN=gtk
XDG_DATA_HOME=/home/kamil/.local/share
TERM=xterm
SHELL=/bin/bash
USER=kamil
OOO_FORCE_DESKTOP=gnome
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
XDG_CONFIG_DIRS=/etc/xdg:/etc/xdg:/etc/xdg
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/lib/perl5/vendor_perl/bin:/usr/lib/perl5/core_perl/bin
PWD=/home/kamil/.local/share
JAVA_HOME=/usr/lib/jvm/java-6-openjdk
EDITOR=/usr/bin/vim
LANG=en_US.UTF-8
AUTOJUMP_DATA_DIR=/home/kamil/.local/share/autojump
PS1=\n\w \[\033[0;32m\]$\[\033[0m\] 
PS3=> 
PS2=> 
HISTCONTROL=ignoreboth
PS4=+ 
SHLVL=5
HOME=/home/kamil
XDG_CONFIG_HOME=/home/kamil/.config
AUTOJUMP_HOME=/home/kamil
XDG_CACHE_HOME=/home/kamil/.cache
LOGNAME=kamil
J2SDKDIR=/usr/lib/jvm/java-6-openjdk
XDG_DATA_DIRS=/usr/share/:/usr/local/share/:/usr/share/:/usr/local/share/:/usr/share/:/usr/local/share/
PROMPT_COMMAND=echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"
BROWSER=/usr/bin/chromium
WINDOWPATH=7
DISPLAY=:0
J2REDIR=/usr/lib/jvm/java-6-openjdk/jre
G_BROKEN_FILENAMES=1
XAUTHORITY=/home/kamil/.Xauthority
_=/usr/bin/env
OLDPWD=/home/kamil

Sorry for being a bore.

Offline

#19 2011-01-03 09:20:55

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: New release of Autojump, the cd command that learns

There we go, I think you also have a problem due to this bug in the arch packaging of bash. The workaround is simply to source /etc/profile.d/autojump.bash manually after sourcing /etc/profile in your .bashrc. You can also vote on the bug so it will be fixed for everybody smile

Sorry for being a bore.

Really, no problem at all, thanks for the feedback! I want autojump to be as transparent as possible for everyone, and it is feedback like yours that allows me to improve it.


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#20 2011-01-03 09:35:56

caminoix
Member
From: cracow, poland
Registered: 2005-07-12
Posts: 162
Website

Re: New release of Autojump, the cd command that learns

Lovely! It does use the directory now and jumpstat is filling! Thanks a lot! smile
I voted the bug.

Offline

#21 2011-04-09 20:26:12

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: New release of Autojump, the cd command that learns

I've just uploaded a new release!

Nothing incredibly interesting in this one, but the accumulation of things makes a release worthwhile IMHO:

* One major fix : there were occasional permission problems when using autojump in conjunction with sudo
* Make the code mostly PEP-8 compliant: not incredibly useful per se, but might make contributing / tweaking easier
* And quite a few minor bugfixes and improvements.

You can get it with git or a tarball at github, or of course wait for the pacman update smile

Last edited by lardon (2011-04-09 20:26:36)


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#22 2011-07-06 09:28:08

Evanlec
Member
From: NH, USA
Registered: 2007-12-16
Posts: 141
Website

Re: New release of Autojump, the cd command that learns

+1 this is just the thing I've been looking for.

It's crazy the amount of time I spend CD'ing around everyday, anything to help this saves me a TON of keystrokes!

Offline

#23 2011-07-06 10:09:20

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: New release of Autojump, the cd command that learns

Evanlec wrote:

+1 this is just the thing I've been looking for.

It's crazy the amount of time I spend CD'ing around everyday, anything to help this saves me a TON of keystrokes!

I'm always happy to hear this!


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#24 2011-07-06 17:29:44

vanvalium
Member
From: Austria
Registered: 2010-10-09
Posts: 86

Re: New release of Autojump, the cd command that learns

already said this in the old thread, but thanks again, awesome tool

edit:  on a side note, have you ever thought about making this possible for other commands? mv or cp for example

Last edited by vanvalium (2011-07-06 19:18:16)

Offline

#25 2011-07-07 04:50:38

oded
Member
From: Israel
Registered: 2009-08-06
Posts: 26

Re: New release of Autojump, the cd command that learns

really glad I stumbled upon this! thumbs up

Offline

Board footer

Powered by FluxBB