6 ms·
Lightning - A new and faster way to use your shell
- wendroid 17y agolooks 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 http://swtch.com/plan9port/man/man4/plumber.html For the example rules see the base set http://swtch.com/usr/local/plan9/plumb/basic http://swtch.com/usr/local/plan9/plumb/basic
- mhansen 17y agoWhy do you think it looks like a nightmare?
- wendroid 17y agoIt'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.
- jkmcf 17y agoIt's not so much remembering, it's typing it all out (for me at least). Having RSI, reducing any amount of typing is a godsend. However, my first impression of lightning is similar.
- cldwalker 17y agoYes, 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 17y agoI'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
- dschoon 17y agoFish shell (http://fishshell.org 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 17y agoWhile 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_a_new_and_faster_way_to_use_your_shell/c0nyzar http://www.reddit.com/r/programming/comments/bpodn/lightning...
- doki_pen 17y agoWow. This is absolutely awesome to use in a dev environment with vim/java.
- Wilduck 17y agoHas 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 17y agoDisclaimer: 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.html#creating_your_own_bolt http://tagaholic.me/2010/04/09/lightning-speed-for-the-user....
- ciudilo 17y agoThis 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 http://news.ycombinator.com/item?id=1224400
- cldwalker 17y agoThe 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 http://github.com/rupa/j2 and http://www.skamphausen.de/cgi-bin/ska/CDargs http://www.skamphausen.de/cgi-bin/ska/CDargs