riscy / shx-for-emacs

An Emacs shell-mode (and comint-mode) extension that enables displaying small plots and graphics and lets users write shell commands in Emacs Lisp.
GNU General Public License v3.0
218 stars 10 forks source link

Would it be possible to put an underline for files that can be opened? #20

Open SreenivasVRao opened 4 years ago

SreenivasVRao commented 4 years ago

I think this is super useful. I love to open files at point. I see that you're supporting underlining hyperlinks to URLs in shell. Would be useful if I could do the same for files too!

And this package is super useful already. Thanks!

riscy commented 4 years ago

Thank you! I'm thrilled you're finding it useful. :) I use opening files at point a ton too -- the output of a git status, or running a find (or :find).

My first reaction to this was that there's no real regular expression that can identify filenames in the text stream. Checking the files in the current directory and dynamically highlighting them might be a bit slow, but there may be a way to implement it so that it's not horribly slow. It's worth prototyping, so I'll keep this issue open as a reminder.

SreenivasVRao commented 4 years ago

Cheers! I'm leaving this here in case you haven't seen it before: https://stackoverflow.com/questions/50618116/regex-for-finding-file-paths

Might try to do this myself but I don't know elisp. Maybe I'll try this over the weekend.