

Lightning - A new and faster way to use your shell - cldwalker
http://tagaholic.me/2010/04/08/lightning-speed-for-your-shell.html#intro

======
Wilduck
Has anyone installed/used this? I'm tempted, since I have a habit of making
deep directory paths that get quite cumbersome, but would love a testimonial.

~~~
cldwalker
Disclaimer: I wrote lightning

For >90% of what I do on the commandline as a programmer, lightning allows me
to never have to type a full path to a file or directory for any command. If I
do find myself using a new set of tedious paths, I make appropriate shell
glob(s) for them and let lightning do the rest. I'm currently at 71 functions
made from 16 different bolts(groups of shell globs).

Also, you may find this walkthrough of how I used lightning for a specific set
of deep directory paths helpful: [http://tagaholic.me/2010/04/09/lightning-
speed-for-the-user....](http://tagaholic.me/2010/04/09/lightning-speed-for-
the-user.html#creating_your_own_bolt)

------
dschoon
Fish shell (<http://fishshell.org>) performs essentially the same sort of
completion for many classes of files based on context. I've found the complete
subsystem to be quite pleasant compared to bash, and I recommend it to anyone
interested in trying out this sort of thing.

~~~
cldwalker
While lightning can handle classes of files, it's more aimed at abstracting
full paths to their basenames. If you can give an example where fish shell do
this efficiently, I'd be interested to know. FYI, here's a previous comparison
on writing shell functions vs lightning functions:
[http://www.reddit.com/r/programming/comments/bpodn/lightning...](http://www.reddit.com/r/programming/comments/bpodn/lightning_a_new_and_faster_way_to_use_your_shell/c0nyzar)

------
ciudilo
This seems to be very similar to autojump what was featured on HN about two
weeks ago.

Autojump seems to be much slicker IMHO.

<http://news.ycombinator.com/item?id=1224400>

~~~
cldwalker
The only similarity I see is that they translate basenames to full paths.
However, autojump only does this with 'cd' while lightning does this with
_any_ command. Autojump works by analyzing your command history while
lightning lets users control their basenames with shell globs. If lightning is
similar to autojump, then I guess other smart-cd projects are as well:
<http://github.com/rupa/j2> and <http://www.skamphausen.de/cgi-bin/ska/CDargs>

------
doki_pen
Wow. This is absolutely awesome to use in a dev environment with vim/java.

------
wendroid
looks like a nightmare

For Unix clones everywhere there's the tried and tested Plan9 Plumber that
uses Regular Expression Matching to perform any action you desire

<http://swtch.com/plan9port/man/man4/plumber.html>

For the example rules see the base set

<http://swtch.com/usr/local/plan9/plumb/basic>

~~~
mhansen
Why do you think it looks like a nightmare?

~~~
wendroid
It's liek writing a shell script for every library, except now you're stuck
typing commands so you need to carry it with you.

Plus I don't like TAB completion. If you can't remember where everything is
maybe you should organise it better instead of drawing more maps.

~~~
cldwalker
Yes, lightning will be a dependency if you use it just as plumb would be if
you used it.

It's strange that lightning looks like a nightmare and then you offer plumb,
where its rules are 4+ lines long while lightning's are one-liners.

~~~
wendroid
I'm aware that they both have dependencies Plumb still looks miles more
attractive. % plumb /path/to/file.c:21 will open file.c at line 21 right
clicking in Acme will do it automatically, I can feel the win from here

