avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • October 20, 2018, 09:37 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: [FEATURE REQUEST] assign helpful text to $$1 $$2 etc in the comment  (Read 1940 times)


  • Participant
  • Joined in 2011
  • *
  • Posts: 69
    • View Profile
    • Donate to Member
Howdy all,

Just started using FARR after long time executor user.

I'm very impressed with the functionality although i must say its a steep learning curve!

I am setting up lots of alias that take parameters ($$1 $$2 etc). I was thinking that it would be nice to assign a value in the comment to them. Didn't explain that too well so here's an example:

lets take an email alias

^emailto ([\w+-][email protected][\w+-]+\.[\w+-]+)(?:\s?)(.*)

email ($$1) this ($$2) | mailto:$$1?subject=$$2 /ICON=icons\email.ico

so now i type "emailto" and farr shows this:

email ($$1) this ($$2)

so now on to the feature. If i could assign a value to $$1 and $$2 but only for displaying in the comments i may be able to get something like this instead:

email (to) (subject)

then as i continue to type to and subject are replaced with the vaule of $$1 and $$2 as normal. so to demo:

#> emailto
#> email (to) (subject)

Type (or continue to type)
#> emailto [email protected]
#> email ([email protected]) (subject)

Type (or continue to type)
#> emailto [email protected] hello someone
#> email ([email protected]) (hello someone)

I have lots of alias that use lots of parameters (sorry not sure what you call the $$1 $$2 etc) and often forget the order, plus i guess if i hand out alias it makes it easyer for others to use as FARR is showing whats expected.
It also would be sweet to show them in italics.

Hope that makes sense.

PS > first post so just want to say thanks for the great software mouser. Really love it!


  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,875
    • View Profile
    • Mouser's Software Zone on
    • Read more about this member.
    • Donate to Member
Re: [FEATURE REQUEST] assign helpful text to $$1 $$2 etc in the comment
« Reply #1 on: December 25, 2011, 02:08 AM »
Welcome to the site Pigeonclips!  Sorry it's taken so long to reply.

I think your idea is a good one, and one i hadn't considered before, assigning hint values to $$1 and $$2.. But it might be a bit tricky to implement..

 -- what do you think about an alternate idea that might be easier to implement -- which is to let every alias specify an optional "HINT" line that would be shown in the status bar when the alias was matched.  So that for your email alias you might write as a hint:
"Type email [email protected] followed by the topic of your email"

And when the alias was matched, it would show that comment hint in the statusbar.


  • Participant
  • Joined in 2011
  • *
  • Posts: 69
    • View Profile
    • Donate to Member
Re: [FEATURE REQUEST] assign helpful text to $$1 $$2 etc in the comment
« Reply #2 on: January 09, 2012, 08:05 PM »
thanks Mouser. Been away for XMas.

Just so you see where i'm coming from:

I only asked as I just love the predictive way launchers these days work just feel that they lack at little context at times. I find that i still need to remember things like the order of commands/switchs/ etc to often when i'm looking at other launchers cause there's no context. Sometimes i wait a sec or 2 before i hit enter to make sure its right. The hints help me remember what to type next and get a little feed back as to getting the commands/switchs/ etc right.

In fact FARR does this all anyway - i use the  first part of the line before the "|". like this :

email (to=$$1) (subject=$$2) | mailto:$$1?subject=$$2 /ICON=icons\email.ico

that's enough of a hint and covers all my wishes off - So why am i still typing?

(sorry) but it looks a bit ugly to me. Its a small gripe really and just my opinion - I think everyone else probably isn't going to care about this!

I just think it would look super sexy and the feedback of completing a word would look sooooo slick.

If its trouble to implement don't worry. I can totally see why it would be with the whole reg exp thing. I'd hate for any hacky code put the rest of the app at risk just cause i've got an minor anal itch.

So only read on now if you are super keen:

here is how i pictured the implementation. You could leave the definition up to the user. Something like:

   <Result>email (to=$$1) (subject=$$2) | mailto:$$1?subject=$$2 /ICON=icons\email.ico /$$1=to /$$2=subject</Result>

or maybe a definition like this in the xml field:


not even sure if $ is legal in XML. guess you could use somthing else. As for defining and adding what the hints are via GUI - i really wouldn't care about it and have no problem changing the xml etc.

then when user is typing a command if $$1 ($$2, $$3, ...)  hasn't got a match it displays the hint if defined. When there is a match it uses the value in $$1 as per the norm. I'd also wet my pants if it the hint was  and changed to the size and case of the command when matched.

I guess there doesn't need to be rules to inforce the user completing the hint. Best to leave all that up to the wonderful regular expressions. I think from a user perspective if its italic its assumed its not complete/invoked

I guess if your worried that the hint makes it into the command farr calls to run the alias you could keep the cursor before the hint and strip of everything to the right of it (removing the hint)

I'm no coder (but am good at breaking things!) and so in terms of implementation i have no idea what i'm talking about. I'm sure its very very hard, involves re writing core code thats stable, breaks plugins etc. So Just to be clear I don't expect anything. Its really just a suggestion - nothing more.

Again - thanks for the really great software! Must use it about 500 times a day!