tags:

views:

61

answers:

1

I have defined these alias in user.r

alias 'powershell "pw"
alias 'explorer "o"
alias 'open-program-files "pf"
alias 'cmd "dos"
alias 'edituser "eu"
alias 'run-firefox "fx"
alias 'run-firefox "f"

When launching rebol it shows

** Script Error: Alias word is already in use: f
** Near: alias 'run-firefox "f"

This is not true, in fact when I type source f it says undefined:

>> source f
f: undefined
>>

So why this message ?

+1  A: 

Sadly, REBOL's ALIAS has a severe weakness, at least in R2: it works only globally.

So if any process has used a word already, it is not available for ALIASing.

Now, you have not defined it. But if you check the total works already defined when you start a fresh console, you may be surprised to see there are several thousand of them:

 print length? first system/words

And (at least with the version of R2 I just tried it on), that includes the word f:

find first system/words 'f

Even though f has no current value, the mere fact that it has been previously uses stops it being used with ALIAS.

ALIAS is a strong candidate for removal in R3 because of this (and other) limitations in its use.

Sunanda
Hi thanks that's interesting. If it removed from R3, hope it will get back later with a more robust version because it would be a missing feature compared to Powershell aliases as Rebol is typically good for "Admin Development Model" see http://blogs.msdn.com/powershell/archive/2007/01/01/the-admin-development-model-and-send-snippet.aspx
Rebol Tutorial
There's a detailed discussion of the future of ALIAS here:http://www.rebol.net/r3blogs/0242.htmlIt still has some chance of surviving in a better state under R3.
Sunanda
"I am one of the people who have only used ALIAS enough to produce bug reports.... " :DWell I seem to have encountered another weird bug : when I load a script which create a function which call an alias. Not sure it always happen systematically will have to check again.
Rebol Tutorial