Syntax of functions
Syntax of functions
Currently the syntax of Everything functions is based on the Windows syntax, which you type in at first the name of the function and then a : like this
functionname:
I think it is not a good method, since the program doesn't know when you intend to type a function name till the end of the functionname when you type :, so in meantime it searching for the letters you're typing and change the Results List without the user wish.
I suggest to make the functions syntax with a (customizable) prefix (and also suffix) something like
:functionname:
or
/functionname/
or
/functionname: (maybe this is the preferred syntax for functions)
or
/functionname= (maybe this is the preferred syntax for the ini file settings)
etc
When you type the prefix, the program know you are typing a function, so it won't affect the Results List till the function will be ready to be launched.
functionname:
I think it is not a good method, since the program doesn't know when you intend to type a function name till the end of the functionname when you type :, so in meantime it searching for the letters you're typing and change the Results List without the user wish.
I suggest to make the functions syntax with a (customizable) prefix (and also suffix) something like
:functionname:
or
/functionname/
or
/functionname: (maybe this is the preferred syntax for functions)
or
/functionname= (maybe this is the preferred syntax for the ini file settings)
etc
When you type the prefix, the program know you are typing a function, so it won't affect the Results List till the function will be ready to be launched.
Re: Syntax of functions
An opening : or / or ... is still going to affect the results list - at the least by wiping all results out until the function name is fully typed out.
(Do we already have some sort of delayed interpretation of the search line?
Maybe something like that, but...)
(PS: / can already be used as an alternative to \, & already with one of the changes, I think it was with entering .ini changes from the search line, could potentially cause issues.)
(Do we already have some sort of delayed interpretation of the search line?
Maybe something like that, but...)
(PS: / can already be used as an alternative to \, & already with one of the changes, I think it was with entering .ini changes from the search line, could potentially cause issues.)
Re: Syntax of functions
It fits me as now, but maybe not to interfere do it as in Excel:
Code: Select all
=functionname:
Re: Syntax of functions
You display the problem well.therube wrote:An opening : or / or ... is still going to affect the results list - at the least by wiping all results out until the function name is fully typed out.
Folders and Files can get = in their names, so the program indeed needs to look for = . Therefore I think it would be better to use one of these:salazor wrote:It fits me as now, but maybe not to interfere do it as in Excel:Code: Select all
=functionname:
Re: Syntax of functions
I understand the frustration with having to type function:
I'll be reviewing auto complete in Everything 1.5, and also adding support for customizing the main UI so you can have a size bar, date modified bar etc..
Maybe starting a search term with > could show a list of functions..
Allowing the user to customize the characters > and : in >size: is always a good idea.
I'll be reviewing auto complete in Everything 1.5, and also adding support for customizing the main UI so you can have a size bar, date modified bar etc..
Maybe starting a search term with > could show a list of functions..
Allowing the user to customize the characters > and : in >size: is always a good idea.
Re: Syntax of functions
Also in mind,
The suffix = can tell the program it's ini entry.
The suffix : can tell it's a function.
Alternatively,
You can use a prefix, something like:
/settings:statusbar_selected_item_format=
/configuration:statusbar_selected_item_format=
/preferences:statusbar_selected_item_format=
/ini:statusbar_selected_item_format=
[Multiple possibilities make it Associative, meaning, you don't have to read the Help to find what you want.]
and also to create a short prefix (for advanced users use in High Frequently), something like:
/?statusbar_selected_item_format=
or
//statusbar_selected_item_format=
/>statusbar_selected_item_format=
etc
Now, as for Not function.
Currently the operator ! is been used.
But ! is also valid in Folder/FIle names ???
IMHO needs to be changed to something like:
/!
/!:
/!nottext
/!:.lnk
Another thing needs to take into account here for future release,
Text Mode (maybe I will write about this idea later)
If in the future Everything will partially support a Text search, since you may find Everything commands and tools helpful not only for manipulate File/Folders, but also for manipulate texts.
In Text Mode all characters are valid.
The suffix = can tell the program it's ini entry.
The suffix : can tell it's a function.
Alternatively,
You can use a prefix, something like:
/settings:statusbar_selected_item_format=
/configuration:statusbar_selected_item_format=
/preferences:statusbar_selected_item_format=
/ini:statusbar_selected_item_format=
[Multiple possibilities make it Associative, meaning, you don't have to read the Help to find what you want.]
and also to create a short prefix (for advanced users use in High Frequently), something like:
/?statusbar_selected_item_format=
or
//statusbar_selected_item_format=
/>statusbar_selected_item_format=
etc
Now, as for Not function.
Currently the operator ! is been used.
But ! is also valid in Folder/FIle names ???
IMHO needs to be changed to something like:
/!
/!:
/!nottext
/!:.lnk
Another thing needs to take into account here for future release,
Text Mode (maybe I will write about this idea later)
If in the future Everything will partially support a Text search, since you may find Everything commands and tools helpful not only for manipulate File/Folders, but also for manipulate texts.
In Text Mode all characters are valid.
Re: Syntax of functions
Code: Select all
parent:<path> Search for files and folders in the specified path, excluding subfolders.
parents:<count> Search for files and folders with the specified number of parent folders.
Re: Syntax of functions
The following functions are the same:
infolder:
parent:
nosubfolders:
path: would have been nice to use here, but it was already taken as the match full path and filename search modifier.
The following functions are the same:
parents:
depth:
I'll consider using the depth: search function in place of the parents: search function.
infolder:
parent:
nosubfolders:
path: would have been nice to use here, but it was already taken as the match full path and filename search modifier.
The following functions are the same:
parents:
depth:
I'll consider using the depth: search function in place of the parents: search function.
Re: Syntax of functions
Also,
I think to use a special character as a prefix for showing a list of functions is a good idea.
Do you think it is possible to include in that "list of functions", not only the functions names but also their descriptions, as they are in "Search Syntax" help?
I think to use a special character as a prefix for showing a list of functions is a good idea.
Do you think it is possible to include in that "list of functions", not only the functions names but also their descriptions, as they are in "Search Syntax" help?
Re: Syntax of functions
Another idea for suffix for functions
You can use something like { } or < >
(< > is more readable than " ", and unlike { } it is invalid character in folder/file name)
/functionname<abc def>
/regex<gr(a|e)y>
/regex:<gr(a|e)y>
in this way it will be more easy to define a range for the function.
viewtopic.php?f=5&t=6417&p=19636#p19658
You can use something like { } or < >
(< > is more readable than " ", and unlike { } it is invalid character in folder/file name)
/functionname<abc def>
/regex<gr(a|e)y>
/regex:<gr(a|e)y>
in this way it will be more easy to define a range for the function.
viewtopic.php?f=5&t=6417&p=19636#p19658
Re: Syntax of functions
Suggestion: If a user at the start of the searchbox or after a space types : (colon character) then Everything shows a list of functions and stops showing file results as long as the list is visible. The list would work like intellisense/autosuggest in code editors.void wrote: ↑Thu Mar 23, 2017 2:51 am I understand the frustration with having to type function:
I'll be reviewing auto complete in Everything 1.5, and also adding support for customizing the main UI so you can have a size bar, date modified bar etc..
Maybe starting a search term with > could show a list of functions..
Allowing the user to customize the characters > and : in >size: is always a good idea.
- Typing filters the list
- Up/Down naviges the list
- Tab and Enter applies the selected row
When the user applies a selected row Everything transforms the : and the typed string into function:
For example the user types :ex and select ext from the list then Everything transforms :ex into ext:
This gets you autosuggest without introducing a new special character like > to show the autosuggest list and it is backwards compatible with the current function: format.
Re: Syntax of functions
Funny. Was just thinking about it and came up with the same idea!
As long as it ends the autofill when I type ":\" (I use that a lot: :\TEMP to only get the rootfolders TEMP)
Alternative: "::" instead of ":"
Other ideas:
- Functions like Excel/Libre Office Calc: - Sublime (editor) uses Ctrl-P to open a "quicksearch box" (it has an official name, but works like Google Search / Firefox' about:config )
type "date" to zoom in on all date related functions/modifiers/ ...
As long as it ends the autofill when I type ":\" (I use that a lot: :\TEMP to only get the rootfolders TEMP)
Alternative: "::" instead of ":"
Other ideas:
- Functions like Excel/Libre Office Calc: - Sublime (editor) uses Ctrl-P to open a "quicksearch box" (it has an official name, but works like Google Search / Firefox' about:config )
type "date" to zoom in on all date related functions/modifiers/ ...
Re: Syntax of functions
I hope an autosuggest feature could be made compatible with that use case.
I think the generic term at least in code editors (Atom, Sublime, VS Code, ...) is Command Palette. For example
https://code.visualstudio.com/docs/gets ... nd-palette
VS Code uses ctrl+shift+P and that keyboard shortcut is vacant in Everything.
Re: Syntax of functions
Yep, that's the one. Thanks!
BTW: Not only in editors. In fman (filemanager) and mpv.net (videoplayer with Everything integrated) it is also called Command Palette. I think you found the official term
EDIT: Sublime also uses Ctrl-Shift-P (and so do fman and mpv.net; looks like the de facto standard)
Re: Syntax of functions
Compare:
Menu > Help > Search Syntax
Menu > Tools > Options... > Keyboard > Show commands containing: _______
Menu > Help > Search Syntax
Menu > Tools > Options... > Keyboard > Show commands containing: _______
Re: Syntax of functions
There are hundreds of functions ready for the next major version..
The user will need to be able to find these functions and their syntax easily.
I like the Excel Function Wizard, something like that could work well.
I also want Everything to show the syntax of a function with an example in a tooltip, when you type in size: a tooltip is shown, something like:
:size:<2mb
Thanks for the suggestions.
The user will need to be able to find these functions and their syntax easily.
I like the Excel Function Wizard, something like that could work well.
I also want Everything to show the syntax of a function with an example in a tooltip, when you type in size: a tooltip is shown, something like:
I like the idea of using : to auto suggest functions, I'll consider :function: as valid function syntax, eg:size:value
Examples:
size:<2mb
size:10mb..100mb
Summary
Find files with the matching size in bytes.
value
The size or range of sizes in bytes to find.
KB, MB or GB suffixes can be used.
:size:<2mb
Thanks for the suggestions.
Re: Syntax of functions
I think this kind of "tooltip" is very important, and needs a designer and "try and error" for best result. It would be a main feature with high frequency of use in Everything.void wrote: ↑Thu May 30, 2019 2:06 am I also want Everything to show the syntax of a function with an example in a tooltip, when you type in size: a tooltip is shown, something like:
size:value
Examples:
size:<2mb
size:10mb..100mb
Summary
Find files with the matching size in bytes.
value
The size or range of sizes in bytes to find.
KB, MB or GB suffixes can be used.
It should fit with voidtools website help for make easy the maintenance.
You can also add in this "tooltip" the Help in forum, like:
Re: Syntax of functions
Re: Syntax of functions
A thought.
First, the current advanced search is great, but cumbersome, and it also puts things in an odd order in the search box.
Between 'Search' and 'Bookmarks', you could put 'Filters', a drop down containing commonly used filters.
When a filter is selected, it is either prepended, or appended to the contents of the search bar.
A default date search might be inserted set for the last year based on the date. dm:d/m/y-1..d/m/y
That insert however, could be wrapped in { } characters.
Or you could use ` or even ~ to indicate a toggle to a command.
Those two characters are above tab to the left of 1, at least on my keyboard.
With or without the wrapper, it would make it easier for beginners insert filters.
A quick alt-I and some arrow keys would get them a starting place.
Just thoughts.
Janus.
First, the current advanced search is great, but cumbersome, and it also puts things in an odd order in the search box.
Between 'Search' and 'Bookmarks', you could put 'Filters', a drop down containing commonly used filters.
When a filter is selected, it is either prepended, or appended to the contents of the search bar.
A default date search might be inserted set for the last year based on the date. dm:d/m/y-1..d/m/y
That insert however, could be wrapped in { } characters.
Or you could use ` or even ~ to indicate a toggle to a command.
Those two characters are above tab to the left of 1, at least on my keyboard.
With or without the wrapper, it would make it easier for beginners insert filters.
A quick alt-I and some arrow keys would get them a starting place.
Just thoughts.
Janus.
Re: Syntax of functions
It's still on my TODO list, I really want something for content:, other functions I'm not so sure it will be useful.How do you solve the range of function problem, for functions like
:regex:
What I want is content:<abc 123> to search for content:abc content:123
This wouldn't work for functions that take an integer as < is used for less than, which is fine as it is only really useful for functions that take a string.
You'll also need to escape a literal < with double quotes..
I need to spend more time on this..
The order is by design, each function has a weight and the most expensive functions are placed at the end of the search.First, the current advanced search is great, but cumbersome, and it also puts things in an odd order in the search box.
The next major version of Everything this will not matter as search terms will be reordered behind the scenes.
A treeview to the left of the advanced search may make it easier to jump to a section of interest.
Adding any of the advanced search options to the toolbar may make the more common search options more accessible.
Thanks for the suggestion, I'll consider a filters menu.Between 'Search' and 'Bookmarks', you could put 'Filters', a drop down containing commonly used filters.