Page 38 of 38

Posted: Sun 15 Dec 2019, 16:43
by zigbert

Posted: Sun 15 Dec 2019, 20:55
by don570
WOOF change...

Code: Select all

case "$1" in
-search)
	if [ ! "$SEARCHSTRING" ]; then
		FRAME=Info; IMG=dialog-info; TXT1="$(gettext '<b>No searchstring.</b> Please define the textstring you want to search for.')";
		. $PROGPATH/box_ok
		exit
	fi
____________________________________________

I noticed in an old version of pfind 4.2 in fluppy linux
that when I relaunched pfind the previous search text is in the field.
This is useful in some situations.

__________________________________________________

Posted: Mon 16 Dec 2019, 20:40
by don570
Slightly different wording is possible.

'searchstring' doesn't appear to be an English word???
'search-string' is in dictionary but not used often.

...and 'text string' is apparently spelt as two separate words.
___________________________________________

Posted: Wed 18 Dec 2019, 15:53
by zigbert
@don570
:D English is far from my better skills, so please correct more of my spellings.
It would be preferable if you just pulled the changes to WoofCE

Thank you
Sigmund

Posted: Mon 17 Feb 2020, 12:50
by MochiMoppel
I find the explanation for text search confusing. Shouldn't it be the other way round?
"Regular expressions work only when searching for text in file (not when searching for filenames)"

Text in file is found using grep, and grep patterns are regex by default
For filenames I had no success using regex. Bash filename expansion works though. Is that what you mean?

The screenshot finds perl sripts in /usr/bin, using a regular expression.

BTW: What does "Search Apps" do?

Posted: Fri 21 Feb 2020, 09:16
by zigbert
Hi MochiMoppel
The explanation could sure be misleading...
- Searching for files accept the operator AND and OR and the regex ? and * according to the help text in the startup window. The last used find-command is shown in the statusline at the bottom.
- Searching for text is just a plain grep -i inside single quotes (' '), and will of course support what grep supports. But this will not work as with the find-command.
- Searching for apps is searching in /usr/share/applications and executes the app by doubleclick.

So, what would be the best explanation?

Posted: Sat 22 Feb 2020, 02:59
by MochiMoppel
zigbert wrote:- Searching for files accept the operator AND and OR and the regex ? and * according to the help text in the startup window.
And this is wrong.
? and * are commonly called "wildcards". Neither the operators nor the wildcards are regex. Filename search does not support regex and IMO it would be better not to use "R E G U L A R E X P R E S S I O N S" at all.
- Searching for text is just a plain grep -i inside single quotes (' '), and will of course support what grep supports. But this will not work as with the find-command.
I know. The dilemma is that the search pattern should work for text search and filename search alike. You could easily make find behave exactly like grep, allowing regex for both, or you could make grep behave like find, allowing wildcards for both, but I don't know if you want to go that far.
- Searching for apps is searching in /usr/share/applications and executes the app by doubleclick.
Doubleclick does not work for me. Nothing happens.
So, what would be the best explanation?
Honestly, I don't know. Should be answered by a native speaker, certainly not by me. As a proposal for the help text my first thought was: "You can use following operators and wildcards". Avoids the ambiguous "exact search" (search for *.mp3 is not what I understand as "exact"). But then this would be true only for filename searches. Maybe 2 paragraphs is better:

Code: Select all

A R G U M E N T S
To define an exact search you may use following arguments:
...

W I L D C A R D S
When searching for filenames (not text in files!) you may use following wildcards:
...
Hmm...something like this?

Posted: Sun 24 May 2020, 18:41
by don570
I discovered a quick way to open up htm files on a drive..


to open htm files quickly


File > Configure > Commands
TextEditor --> seamonkey /tmp/searchresult/*

Now search with '.htm' in search box
and use Action menu


OR alternative way...

Open file /usr/local/pfind/box_input with texteditor
and insert...
DEFAULT=seamonkey after #!/bin/bash

Posted: Wed 10 Jun 2020, 19:32
by don570
followup from previous post....

This works better....

I put the following at the beginning of pfind's box_input file
and this will allow other commands to work (example copy)

Code: Select all


len=${#DEFAULT}
[ $len -eq 0 ] && DEFAULT=seamonkey