Make output of PrintApplicableMethod clickable
Closed this issue · 3 comments
In iterm (mac OS) text in the form FILENAME:LINENUMBER
is clickable so that the corresponding file is opened in an editor. E.g. the output
gap> PrintApplicableMethod( IsCyclic, [Group(())], 0, 2 );
this method is contained in lines [36,42] of file:
/home/sergio/projects/gap/lib/grp.gi
function ( G )
...
could be changed to
gap> PrintApplicableMethod( IsCyclic, [Group(())], 0, 2 );
this method is defined in:
/home/sergio/projects/gap/lib/grp.gi:36
function ( G )
...
I guess the number of the last line of the function definition may not be that important and could be dropped.
Thanks for these 3 issues relating to PrintApplicableMethod, which I am now working on.
I now have 'filename+linenumber' printed out on my iMac, but it does not appear to be clickable.
But then I'm using 'Terminal' rather than 'iTerm', so this may not be surprising?
- I guess it has to be a colon
:
instead of a plus+
. - It seems to be a specific feature of iTerm. I would love to have something like that in the terminal I use. The feature is called semantic history I think. Here is a link I found for getting it to work with vi: https://dustingram.com/articles/2015/05/15/using-iterms-semantic-history-with-vi
After working on improving the output of ApplicableMethod for some time, it became clear that PrintApplicableMethod was superfluous to requirements. It has been removed from Utils version 0.59 released today. ApplicableMethod( ,, 1, 1 ); returns a method, so Print(last); prints it out. Changing the fourth parameter to 2 gives the next method, etc.