top | item 1274016

D-Term: Mac app to automatically contextualize command line with focused window

46 points| mcantelon | 16 years ago |decimus.net | reply

11 comments

order
[+] _delirium|16 years ago|reply
Placing you automatically in the working directory of the active app is a neat feature. These pop-up/pull-down consoles are common in "alternative" Linux window managers, e.g. Ion3 comes with one built-in (hit alt+space), and there's 'yeahconsole', 'guake', etc., to add the functionality to others, but afaik none of them can do this directory magic.
[+] TrevorBurnham|16 years ago|reply
I use cdto, which is a nice simple script that opens up the current Finder location in Terminal.

http://code.google.com/p/cdto/

DTerm is more feature-rich, of course. Slick, too. I'll give it a try.

[+] defenestrator|16 years ago|reply
cdto is great to have! To reverse this type "open ." in the terminal and your finder will open in that directory too.
[+] bdrister|16 years ago|reply
@stuntmouse: We're aware of this issue, and it's due to a limitation in Safari. We have an open Radar with Apple on it.

@jaustin, @Groxx: DTerm isn't really meant to be a full-on TTY or a transparent wrapper for a shell. It's more of a shell substitute (which allows it to do things like splitting out the results from the different commands that something not managing its own jobs couldn't do), and can kick over to a full Terminal anytime you need. Think of the analogy DTerm:Terminal::Spotlight:Finder.

While we're not likely to change its "shell substitute" nature, we are indeed interested in making it formally set up a TTY (though it already handles stuff like ANSI color/formatting codes and whatnot), we just haven't gotten around to it yet. Once you understand where the line is drawn it doesn't really impede functionality as you can go to a Terminal anytime. But if you're a TTY guru and would like to help with us getting that into a future guru, drop us a line.

@Groxx: The action menu contains a number of nifty commands. Try playing with modifier keys, too!

[+] pg|16 years ago|reply
We have nested comments here. You can reply directly to these users.
[+] weilawei|16 years ago|reply
This looks great! I'm going to give it a try.

Edit: 30-second overview: I enabled automatic updates and sent in the requested anonymous system profile--but both are strictly optional. The default hot-key selection is excellent (Shift+Command+Enter). The set of preferences is small, but useful: font, hide dock icon, hot-key choice and behavior (open/close). The Accessibility pane asks you to mark DTerm as "Trusted" in order to correctly present its window in apps other than Finder. I didn't even realize that it was running again until I tentatively tried the hot-key. It works, it's small, fast, and it works invisibly. Very nice, kudos!

Personally, I'd love to see support for Ctrl+r from BASH. Also, I wonder if there could be some way to use URLs from browsers.

[+] jaustin|16 years ago|reply
Agreed, this is awesome.

I do find that I keep pressing 'up' in order to get to my recent commands and being disappointed. I guess implementing that goes along with implementing ctrl+r.

[+] Groxx|16 years ago|reply
Since I found this through a comment here a little while ago, it's become part of my regular toolset. Especially with TextMate, where it'll pick up the folder of the item you're working on. I can run an operation on that file / folder really quickly, without needing to mess up the terminal window(s) I typically keep handy. (I'm usually doing Ruby / Rails work with TextMate)

My only real desire (and I know there's a way to do it, I just haven't done it): a way to open a regular Terminal window from dterm. That'd get rid of my need for any "cdto"-like script. Something so I can use `term .` .

Word of warning to users: it's not a TTY. Sometimes this can cause unexpected behavior in a program meant to be run from the terminal, and it's not interactive at all. (I ran across this when my code forked right after printing - Terminal prints normally, this prints as if going to a file, so it printed after forking the buffer)

[+] dr_strangelove|16 years ago|reply
To open a terminal simply press cmd + return.
[+] stuntmouse|16 years ago|reply
A nice compliment to Visor. I wish it played better with Safari's download window though.