Jump to content
Sign in to follow this  
bebe

Two questions regarding File Filters.

Recommended Posts

Hi

 

Two questions regarding "File Filters"

 

1) I would like to know how to make a file filter that searches for a specific extension.

I have some Truecrypt images in my ~/Documents folder, to which I can add a .tc extension.

 

In the advanced tab of the file filter node, I noticed the KMDItemDisplayName matadata field

I tried to change the "Value" column from "{query}" to ".tc" or even "{query}.tc" without success.

 

How would you do such a thing without a script filter?

Where can I find information on how to use those Advanced fields columns? 

 

 

2) I noticed that when I type the file filter keyword in Alfred, it waits for the space to be entered after the keyword to display results.

If I uncheck the "with space" option it needs only one space, if I check it it needs two spaces.

Is there any way that it starts displaying the results without having to type any space?

And the space would be autocompletes when selected an entry in the list?

 

 

Cheers!

Share this post


Link to post
Hi
 
Two questions regarding "File Filters"
 
1) I would like to know how to make a file filter that searches for a specific extension.
I have some Truecrypt images in my ~/Documents folder, to which I can add a .tc extension.
 
In the advanced tab of the file filter node, I noticed the KMDItemDisplayName matadata field
I tried to change the "Value" column from "{query}" to ".tc" or even "{query}.tc" without success.
 
How would you do such a thing without a script filter?
Where can I find information on how to use those Advanced fields columns? 
 
 
2) I noticed that when I type the file filter keyword in Alfred, it waits for the space to be entered after the keyword to display results.
If I uncheck the "with space" option it needs only one space, if I check it it needs two spaces.
Is there any way that it starts displaying the results without having to type any space?
And the space would be autocompletes when selected an entry in the list?
 
 
Cheers!

 

In the file filter node, if you drag and drop one of your .tc files into the File Types area, then Alfred will filter and show only those types of files. 

filefilter.png

For the second question, the "With Space" option allows you to remove the leading space before passing data to the file filter. So, for instance, if you had a filter with the keyword "sample" and you untick the "with space" option, then popping up Alfred and typing "samplea" would activate the "sample" filter and search for "a". With the "with space" option ticked, an additional space is added to the end of the keyword and is required before a search is triggered. So, with that, "sample a" would be required to search for "a" with the "sample" filter.

 

Does that make sense?

Share this post


Link to post

In the file filter node, if you drag and drop one of your .tc files into the File Types area, then Alfred will filter and show only those types of files. 

 

Ok, then what are the Advanced tab options for? Where can I find documentation?

 

For the second question, the "With Space" option allows you to remove the leading space before passing data to the file filter. So, for instance, if you had a filter with the keyword "sample" and you untick the "with space" option, then popping up Alfred and typing "samplea" would activate the "sample" filter and search for "a". With the "with space" option ticked, an additional space is added to the end of the keyword and is required before a search is triggered. So, with that, "sample a" would be required to search for "a" with the "sample" filter.

 

Does that make sense?

 

Yep, I got that, but I would like not to type any space and Alfred starts listing the files as soon as the keyword match.

Not possible right?

Share this post


Link to post

Ok, then what are the Advanced tab options for? Where can I find documentation?

 

 

Yep, I got that, but I would like not to type any space and Alfred starts listing the files as soon as the keyword match.

Not possible right?

 

The advanced tab is for setting advanced features. ;) These include the ability to tell it what metadata fields to match, and how to match them.

 

And yes, it's not possible to not type a space and it just start searching. At that point, you haven't given Alfred anything to search for.

Share this post


Link to post

The advanced tab is for setting advanced features.  ;) These include the ability to tell it what metadata fields to match, and how to match them.

sounds logic  ;)

now do you think you can paste a link to a doc and maybe some examples?

:)

 

And yes, it's not possible to not type a space and it just start searching. At that point, you haven't given Alfred anything to search for.

 

I still don't get it

I set up a file filter to look for truecrypt images with .tc extensions in ~/Documents

A] keyword="mtc" | with space=ON

I type "mtc " (single space), nothing is listed

I type "mtc  " (double space), the list appears

I add a 'p', so I have "mtc  p" (double space) in alfred, and autocomplete gives me: "mtc perso.tc" (single space, one space has disappeared!) 

B] keyword="mtc" | with space=OFF

I type "mtc" (no space), nothing is listed

I type "mtc " (single space), the list appears

I add a 'p', so I have "mtc p" (single space) in alfred, and autocomplete gives me: "mtcperso.tc" (no space! it disappeared!)

 

how can I get one of the following:

 

C] keyword="mtc"

I type "mtc" (no space), nothing listed

I type "mtc " (single space), the list appears

I add a 'p', so I have "mtc p" (single space) in alfred, and autocomplete gives me: "mtc perso.tc"

or even better

 

D] keyword="mtc"

I type "mtc" (no space), the list appears

if I add a 'p', so I have "mtcp" (no space) in alfred >> the list disappears, logic cause no keyword is match

if I type "mtc " (single space), the list is still here

I then add a 'p', so I have "mtc p" (single space) in alfred, and autocomplete gives me: "mtc perso.tc"

 

is any of this situation possible?

this would be more intuitive and faster

 

at worst can we get B] but without the space disappearing on autocompletion?

this is really counter intuitive.

in shell, when you tab some word, it does not remove any part of it, it just keeps adding to it

can't alfred just mimic this behavior?

Share this post


Link to post

sounds logic  ;)

now do you think you can paste a link to a doc and maybe some examples?

:)

 

 

I still don't get it

I set up a file filter to look for truecrypt images with .tc extensions in ~/Documents

A] keyword="mtc" | with space=ON

I type "mtc " (single space), nothing is listed

I type "mtc  " (double space), the list appears

I add a 'p', so I have "mtc  p" (double space) in alfred, and autocomplete gives me: "mtc perso.tc" (single space, one space has disappeared!) 

B] keyword="mtc" | with space=OFF

I type "mtc" (no space), nothing is listed

I type "mtc " (single space), the list appears

I add a 'p', so I have "mtc p" (single space) in alfred, and autocomplete gives me: "mtcperso.tc" (no space! it disappeared!)

 

how can I get one of the following:

 

C] keyword="mtc"

I type "mtc" (no space), nothing listed

I type "mtc " (single space), the list appears

I add a 'p', so I have "mtc p" (single space) in alfred, and autocomplete gives me: "mtc perso.tc"

or even better

 

D] keyword="mtc"

I type "mtc" (no space), the list appears

if I add a 'p', so I have "mtcp" (no space) in alfred >> the list disappears, logic cause no keyword is match

if I type "mtc " (single space), the list is still here

I then add a 'p', so I have "mtc p" (single space) in alfred, and autocomplete gives me: "mtc perso.tc"

 

is any of this situation possible?

this would be more intuitive and faster

 

at worst can we get B] but without the space disappearing on autocompletion?

this is really counter intuitive.

in shell, when you tab some word, it does not remove any part of it, it just keeps adding to it

can't alfred just mimic this behavior?

 

That's because, with Space OFF for example, that space character isn't in the file name. JUST typing 'mtc' was enough to trigger the filter. Then you typed a space which essentially searched a wildcard character and showed a list of all possibilities. Then once you type a character it filters the list based on the entered character. When you autocomplete, those extra spaces aren't in the front of the file name. For instance, from your example, the file name isn't '  perso.tc', it's just 'perso.tc'. No spaces in the front. So it removed them because those characters aren't in the file name you just autocompleted. So, basically, yeah, if you autocomplete, its going to remove the extra space characters that you entered because those aren't part of the file name.

Share this post


Link to post

I am gathering the questions because i realize that they were swamped in the rest of the post:

 

1- where can I find documentation about the file filter advanced tab?

2- there is absolutely no way alfred autocompletion works like any shell autocompletion work?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  
×
×
  • Create New...