Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

searching history and regular expressions

Jun
15
0
Hi. I have just bought tc 9 and I have a couple of questions.

What I would like to be able to do is at the command prompt search for a string, but not based at the start of the command to execute -- the lack of this is annoying, but maybe I just don't know how to do it.

Also, there seem to be options for regular expressions and a detailed description of the syntax, but where can you use then -- my kingdom for an actual manual!

Thanks.
 
> What I would like to be able to do is at the command prompt search for a
> string, but not based at the start of the command to execute -- the lack of
> this is annoying, but maybe I just don't know how to do it.

If you mean a command in the history, I could not find an automatic
way, but just pressing the PageUp key and looking through the popup
list may do what you want. Depending on what you are running the popup
may begin hidden behind your window, so you may need Alt-Tab to see
it.

You might try something like one of these, then use copy/paste to re-run it:
*history | *ffind /k /m /v /t"string"
*history | *ffind /k /m /v /e"expression"

The new TCMD has a Command Input pane that may also help you do what you want.


> Also, there seem to be options for regular expressions and a detailed
> description of the syntax, but where can you use them

If you can use a pattern (e.g. *.txt) then you can also use a regular
expression (e.g. with perl, ::.*\.txt). Just put the double colon ::
prefix and then the expression.

Type HELP WILDCARDS and the bottom of that page has this information.

--
2008 Fridays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Saturday.
Measure wealth by the things you have for which you would not take money.
 
covici wrote:

> Hi. I have just bought tc 9 and I have a couple of questions.
>
> What I would like to be able to do is at the command prompt search for a
> string, but not based at the start of the command to execute -- the lack
> of this is annoying, but maybe I just don't know how to do it.

Not sure what you're looking for here -- do you want to search the
history list or the screen buffer?


> Also, there seem to be options for regular expressions and a detailed
> description of the syntax, but where can you use then -- my kingdom for
> an actual manual!

You use them (almost) anywhere you'd use a wildcard filename. (The
online help documents which commands and variable functions support
wildcards.)

Rex Conn
JP Software
 
If the desire is to recall a previous command so that you can execute it
again, just type a few letters of the command and press the up/down arrow
keys. You will cycle through previous commands that begin with those
letters. The more letters you type the tighter the filter becomes. No
letters cycles through all the command history.

-Scott

Jim Cook <> wrote on 06/26/2008 11:36:37 AM:


> Quote:
>
> > What I would like to be able to do is at the command prompt search for
a

> > string, but not based at the start of the command to execute -- the
lack of

> > this is annoying, but maybe I just don't know how to do it.
>
> If you mean a command in the history, I could not find an automatic
> way, but just pressing the PageUp key and looking through the popup
> list may do what you want. Depending on what you are running the popup
> may begin hidden behind your window, so you may need Alt-Tab to see
> it.
>
> You might try something like one of these, then use copy/paste to re-run
it:

> *history | *ffind /k /m /v /t"string"
> *history | *ffind /k /m /v /e"expression"
>
> The new TCMD has a Command Input pane that may also help you do whatyou
want.


> Quote:
>
> > Also, there seem to be options for regular expressions and a detailed
> > description of the syntax, but where can you use them
>
> If you can use a pattern (e.g. *.txt) then you can also use a regular
> expression (e.g. with perl, ::.*\.txt). Just put the double colon ::
> prefix and then the expression.
>
> Type HELP WILDCARDS and the bottom of that page has this information.
>
> --
> 2008 Fridays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
> Next year they're Saturday.
> Measure wealth by the things you have for which you would not take
money.
 
> If the desire is to recall a previous command so that you can execute it
> again, just type a few letters of the command and press the up/down arrow

In my reading from the OP, the desire was to match not the _first_ few
letters of a command, but a few letters from the _middle_ of a command
string.

--
2008 Fridays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Saturday.
Measure wealth by the things you have for which you would not take money.
 
Back
Top
[FOX] Ultimate Translator
Translate