zpinter
zpinter

Reputation: 2242

Emacs ido-style shell

Is there a command line shell or shell customization that supports emacs-style ido find file? In emacs, I can navigate to a directory extremely quickly using C-x C-f and (ido-mode t).

Ideally, I'm looking for a solution that can be used outside of emacs. Though I'd be open for a way to quickly change directories within an eshell buffer.

Upvotes: 20

Views: 2753

Answers (7)

Marduk
Marduk

Reputation: 1132

fzf, the command-line fuzzy finder, adds fuzzy completion for bash and zsh.

According to the developer:

It's an interactive Unix filter for command-line that can be used with any list; files, command history, processes, hostnames, bookmarks, git commits, etc.

This is a portable solution (works on Linux, Mac, Windows), which has no dependencies.

Upvotes: 0

pgas
pgas

Reputation: 206

Since I also wanted something like this, I tried to implement it as a bash completion function. Obviously it means. you have to use bash.

It is only lightly tested, so please feel free to try and report bugs /comments.

http://pgas.freeshell.org/shell/bash-ido

Upvotes: 19

zpinter
zpinter

Reputation: 2242

The best I've been able to come up with so far is autojump. Still looking for a solution closer to ido, but autojump is a great little app.

Upvotes: 2

Ryan C. Thompson
Ryan C. Thompson

Reputation: 42020

If you want ido completion in eshell or similar, it might be best to write a function that uses ido to read a directory, then inserts the command to cd to that directory into the shell buffer. I don't use eshell myself, so I couldn't comment on how to actually write this function, but it's an idea.

Upvotes: 0

Ghoti
Ghoti

Reputation: 2380

Try the Z-shell. It has much better completion than bash. I must admit I haven't used it for a while though and stuck with bash because it's always available.

Upvotes: 3

Steve K
Steve K

Reputation: 2202

Bash has an environment variable called CDPATH which can contain a list of directories to search when using the cd command. Also, check out the "Programmable Completion" and "READLINE" sections of the Bash manual. You should be able to cobble together something that works for you.

Upvotes: 2

p4bl0
p4bl0

Reputation: 3906

I know that some terminal emulator support extension, for instance rxvt-unicode can be extended with Perl scripts. I'm not sure since i never wrote an extension myself, but maybe what you want is doable this way.

If you want to have a look at some Perl scripts for urxvt there are some examples in /usr/lib/urxvt/perl with the default urxvt install on Debian.

Upvotes: 0

Related Questions