Hacker News new | ask | show | jobs
by _chendo_ 2308 days ago
Semantic History is pretty handy and not well-known. It lets you Command+Click on a path to open it in your editor (or associated application).

It also lets you Command+Drag a path to get a usable file-handle to drop into other apps that handle file-related dropzones.

Demo video I made when I added the feature: https://vimeo.com/21872771

3 comments

Use it with care, though: it's not shy about creating invalid file references when it doesn't know what it's talking about :)
Can it extract the correct line number from tracebacks, compiler / linter output etc? I wrote this tool, but I know George Nachman has added some features since I wtote it:

https://github.com/dandavison/iterm2-dwim

It should, I originally built it for rspec output but it should work with most common formats that put the line number attached to the path with a colon.
OK, but beyond path:line_column there are other common formats in which paths and line numbers are dumped to the terminal, e.g. stack traces. The original idea behind iterm2-dwim was to house a useful collection of regular expressions for capturing these, outside iTerm2, but maybe it would make sense to extend the functionality inside iTerm2? So far iterm2-dwim only implements a handful that I personally needed:

Compiler/Linter etc output, e.g.

  a/b/c.py:18:1:
Git diff output (note the initial meaningless "a" or "b"), e.g.

  a/a/b/c.py
Python stack trace, e.g.

  /a/b/c.py, line 2, in some_function
Pdb stack trace, e.g.

  /a/b/c.py (336)some_function()
Hey! Glad to see you’re still around. Hope you’re doing well :)
Oh hey! Still kicking about but haven't really done Mac dev for a couple of years. Hope you're doing well too and keep up the great work with iTerm2!
Wow, thanks for creating it!