Welcome Guest.   Make a donation to an author on the site November 26, 2014, 01:51:54 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Quick plugin question  (Read 4366 times)
s.newave
Supporting Member
**
Posts: 124


View Profile Give some DonationCredits to this forum member
« on: May 12, 2008, 10:37:14 PM »

Im really loving the Locate plugin which i have setup to activate by simply typing "l <search term>". What im wondering is how i can create another command such as "ld" that would act as if i had typed "l -ld" to search only for dirs. This way if i wanted to search for files i would type "l <file search>" and would type "ld <folder search>" if looking for a dir. Is there a way to do this without duplicating the plugin and renaming it which seems a bit ugly  tellme
Logged
lanux128
Global Moderator
*****
Posts: 6,133



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: May 12, 2008, 11:04:21 PM »

check this post by Armando. it's quite similar to what you want.
Logged

mouser
First Author
Administrator
*****
Posts: 33,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: May 12, 2008, 11:13:14 PM »

What you want to do is pretty easy using the special alias command called "dosearch"

basically, you can create a new alias with a regex pattern like:
ld (.*)

and for results put
dosearch l -ld $$1

that basically says that whenever you type "ld SOMETHING" it will be treated as if you had typed "l -ld SOMETHING"
Logged
lanux128
Global Moderator
*****
Posts: 6,133



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: May 12, 2008, 11:45:35 PM »

What you want to do is pretty easy using the special alias command called "dosearch"

basically, you can create a new alias with a regex pattern like:
ld (.*)

and for results put
dosearch l -ld $$1

that basically says that whenever you type "ld SOMETHING" it will be treated as if you had typed "l -ld SOMETHING"

good call, mouser! :Thmbsup:i keep forgetting about the dosearch/restartsearch command.

Logged

s.newave
Supporting Member
**
Posts: 124


View Profile Give some DonationCredits to this forum member
« Reply #4 on: May 13, 2008, 12:11:22 AM »

Wow thanks for the quick reponse!

Told you it was a quick question  cheesy
Logged
s.newave
Supporting Member
**
Posts: 124


View Profile Give some DonationCredits to this forum member
« Reply #5 on: May 18, 2008, 03:22:30 PM »

On a related note i am having trouble getting another alias to work. I am trying to create an alias to emulate typing C:\ and then being able to filter results as i continue to type. For example my alias name is  "Browse" with the result being "Browse C Drive | dosearch C:\".

My aim is to be able to start typing Brow.. then hit <tab> and than it should show all folders in my C: drive at which point i could start typing Progr... and it would filter to Program Files and i could hit enter to open that folder. However after i hit tab to autocomplete the alias and it returns all the folders but when i continue typing to filter the results it doesnt work.

Any ideas?
Logged
mouser
First Author
Administrator
*****
Posts: 33,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: May 18, 2008, 04:42:00 PM »

you need to use a regular expression just as the ld example above, so the regular expression would be
Browse (.*)
and the result would be
Browse C Drive | dosearch C:\ $$1
Logged
s.newave
Supporting Member
**
Posts: 124


View Profile Give some DonationCredits to this forum member
« Reply #7 on: May 18, 2008, 05:07:55 PM »

Thx i knew i was Cool close
Logged
kartal
Supporting Member
**
Posts: 1,529


View Profile Give some DonationCredits to this forum member
« Reply #8 on: May 18, 2008, 07:02:08 PM »

loc -ld -Rn -p

These parameters will let you successfully browse any drive you want, jst add the drive as in c:\. I just created special alias for this and works beautifully, you can even browse folders inside farr by using arrow keys
« Last Edit: May 18, 2008, 07:23:44 PM by kartal » Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.04s | Server load: 0.11 ]