|
|
|
Joined: Mar 2004
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2004
Posts: 33 |
$findfile() bug: (test on 6.16 only)In the command of the $findfile(), $1- must return the filename found If you use an $ident (custom and other), $1- don't return the filename, but return the true $1- (before use $findfile)This bug is true if your command is an $ident, if your command is a /command with $ident() they haven't bug Try:
alias test {
tokenize 32 test!
echo > $findfile(c:\,*.*,0,1,echo > $1)
}
alias test2 {
tokenize 32 test!
echo > $findfile(c:\,*.*,0,1,$iif(1,echo > $1))
}
alias test3 {
tokenize 32 test!
echo > $findfile(c:\,*.*,0,1,$zen($1))
}
alias zen return echo > $1
The first alias Test, you get in status all file in c:\ (OK) The second alias Test2 echo in status Test! ($1) for all file found (error) The 3rd alias Test3 is the same of Test2 just use an custom $ident (error) The 4th alias Zen is the custom $ident() used in the alias Test3 This bug exist with property .shortfn Sorry for my english...
Last edited by Mc_Fly; 20/07/04 10:04 PM.
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
Here's a workaround:
$findfile(dir, wildcard, 0, [ $blah($1-) ])
|
|
|
|
Joined: Mar 2004
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2004
Posts: 33 |
I'm sorry, but with [ ] i have the same echo Test!
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
It makes a difference here. Compare...
//tokenize 32 TEST! | !.echo -q $findfile(c:\,*,0,1, $iif(1,echo > $1))
...with:
//tokenize 32 TEST! | !.echo -q $findfile(c:\,*,0,1, [color:blue][ $iif(1,echo > $1) ])[/color]
And...
//tokenize 32 TEST! | alias ff_test echo > $!1- | !.echo -q $finddir(c:\,*,0,1, $ff_test($1)) | alias ff_test
...with:
//tokenize 32 TEST! | alias ff_test echo > $!1- | !.echo -q $finddir(c:\,*,0,1, [color:blue][ $ff_test($1) ]) | alias ff_test[/color]
|
|
|
|
Joined: Mar 2004
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2004
Posts: 33 |
I'm sorry, i have find my problem: I have try (before your first post) this:
alias test2 {
tokenize 32 test!
echo > $findfile(c:\,*.*,0,1, [ $iif(1,echo > $1) ] )
}
But, the last space bug: With i have Test! Without, i have true filename ! Thanks for all
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
Yes, that's right. Thanks for the bug report.
|
|
|
|
|
|
|
|