<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>This is a blue-sky kind of question, not a query about TextMate features. I want to do something that's probably impossible...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-style-span">As I mentioned in another thread on this list titled "<FONT class="Apple-style-span" color="#002391">opening a file readonly</FONT>", I often use TextMate to view files that contain saved copies of router or switch configurations. I never change the files, but I like the power TextMate provides when reading the files which can be quite large. I wrote TextMate language grammars for the 3 kinds of configuration files that I peruse, so now I have syntax highlighting in all 3 types. Very cool!</SPAN></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>With a little TextMate hacking I've added another benefit. When "editing" one of these files with TextMate, I can place the caret in an IP address, autonomous system number or VLAN number, hit the "help" key, and TextMate looks up and displays a tooltip window that tells me what I'm looking at. For example, if I put the caret in an IP address and hit "help", a tooltip window pops up containing the name that corresponds to the IP address. You can probably guess that this is implemented with a TextMate "command" in a bundle. The command executes a 40-line Perl script that uses gethostbyaddr or looks strings up in a file based on very simple guesses about what the search string is. This is *very* convenient when viewing configuration files.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>My question is, can I push this any further? I'd like to have the same functionality when I'm logged into a device interactively. Today I access network devices through Terminal windows that run telnet or ssh sessions to the devices. I'd like to be able to place the mouse cursor over something in such a window, hit the "help" key and have the system make an attempt to tell me something useful about what I'm pointing at. Terminal.app can't do this, but TextMate can. Terminal.app can do interactive command-line sessions, but TextMate can't. But TextMate has ^R for executing the current line as a shell command, which is close...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Emacs has it. It's called "shell mode" or "eshell". An Emacs edit buffer functions something like a Terminal window that's also an edit buffer. If you move the caret (Emacs calls it "point") over any line and hit RETURN, the point is moved to the bottom of the buffer, the line is sent to the shell, and the output is appended to the buffer, including the shell's prompt. With this system, command-line history takes on a new meaning - it's not only the commands, it's all their output that is available in the edit buffer. Instead of a shell with Emacs-style command-line editing, it's an editor with command-line features. I suppose Emacs handles the ever-growing edit buffer size somehow, probably by only preserving 1000 lines or something. Emacs urban legend has it that at some universities in the 70s, beginning computer science students were give accounts that by default put them in Emacs in shell mode instead of a true shell when they logged in.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>If TextMate supported this, it would be an invaluable aid when I'm working on network devices. It could probably be used in similar scenarios to give TextMate users their own dynamic help for various command-line interfaces.</DIV><DIV><DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Times New Roman; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>-- Pete</DIV><BR class="Apple-interchange-newline"></SPAN></DIV><BR></DIV></DIV></BODY></HTML>