You are not logged in.

#51 2011-11-30 11:01:38

jjacky
Member
Registered: 2011-11-09
Posts: 347
Website

Re: autojump - the cd command that learns - new version

lardon wrote:

It would, but it would quickly become messy, because I would have to add a complete command for each of these commands. Fortunately, I don't think this is needed for unary commands (who take only one argument), since you can simply use j to go to the right folder and open the file from there. This is why I've restricted it to cp and mv for now.

ok, got it.

lardon wrote:

I see that as a feature, although of course it's very hard to cover all the possible use cases. If I added every parent automatically, j would often send you to places where you never go.

ok, I get that. but what about cases when, as showed in the example, with the current method autojump does not find any places to go? Maybe only then it could look for matches within parents?

lardon wrote:

That means /foo/treepath is used more and more recently than /tmp/one/two/three. So autojump thinks it's more likely you want to go there. In that case, you can use auto-completion, or a longer pattern.

Yeah, but I guess what I was asking is: could it be possible to use "ee/" as a pattern that means the folder I wanna jump to must not only contain but end with "ee" ? For instance, I have two directory structures that are somewhat similar, one has a parent called "bfo" and the other "bfod" and whenever a do "j bfo" I end up in "bfod"
Now, if "j bfo/" would get me where I wanted it'd be great, because AFAIK right now, I can't tell autojump to go there, since both folders are in the same parent, so share the same full path except for that final "d". Only way I know is do e.g. "j bfo/ b" to get me to a subfolder, and then "cd .."

Also: what do you mean by I could use autocompletion? Because using autojump's autocompletion from "j bfo" gets me the path of bfod as well (actually, just realized it's better I do this then remove the "d" rather than the "cd .." method), and from "j bfo/" it doesn't get anything either.

Offline

#52 2011-12-01 10:28:11

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

Re: autojump - the cd command that learns - new version

You raise some good points, I'll have to think it through!

About the autocompletion, when you get multiple completions you can type the number of the completion you want:

[joel@mouton sncf_qt]$ j go__
go__1__/home/joel/workspace/coolstuff/ants/go_bot
go__2__/home/joel/workspace/go
go__3__/home/joel/workspace/gocode
go__4__/home/joel/workspace/aichallenge/ants/dist/starter_bots/go
go__5__/usr/lib/go
go__6__/home/joel/tmp/go
go__7__/opt/golly
[joel@mouton sncf_qt]$ j go__4+<Tab>

[joel@mouton sncf_qt]$ j '/home/joel/workspace/aichallenge/ants/dist/starter_bots/go' 
/home/joel/workspace/aichallenge/ants/dist/starter_bots/go
[joel@mouton go]$ 

That makes me think, it would be nice to have a good tutorial video for autojump. I made one a while ago, but I didn't try to speak because I'm not a native English speaker. If someone wants to help me, that would be great!


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

Offline

#53 2011-12-01 11:29:23

jjacky
Member
Registered: 2011-11-09
Posts: 347
Website

Re: autojump - the cd command that learns - new version

oh nice, I didn't know this about the autocompletion!

Offline

Board footer

Powered by FluxBB