Page 1 of 1

Get() should not replace Alias arguments in definition.

Posted: 31 Oct 2011 18:01
by TheQwerty
I don't think Get('Alias', $aliasName); should return an alias' definition with the "<@#>" alias arguments already replaced.
In my case I want to display an alias' actual definition, but if it contains arguments than this is currently impossible.

Or for that matter, maybe it is time for some better scripting support:

Code: Select all

Alias([Operation], [Params]);
Operation:
  • "Add", AliasName, [AliasDefinition]
    • Sets an alias; returns the alias' old definition (or empty string)
  • "Count"
    • Returns the total number of defined aliases.
  • "Get", AliasName
    • Returns an alias' definition (or empty string if none found).
  • "List", [separator='<crlf>']
    • Retrieves a list of all aliases (formatted like user copied contents of list management's edit-mode).
  • "Parse", AliasName, [Arg0]
    • Returns the parsed results of an alias' definition (or empty string) replacing alias arguments by splitting Arg0 (as if the user put it in the address bar).

Re: Get() should not replace Alias arguments in definition.

Posted: 31 Oct 2011 18:37
by admin
TheQwerty wrote:I don't think Get('Alias', $aliasName); should return an alias' definition with the "<@#>" alias arguments already replaced.
In my case I want to display an alias' actual definition, but if it contains arguments than this is currently impossible.
Yes, I'll change this.

I don't feel like adding a new alias command ATM, but thinks for preparing the definition. Might use it later.

I have the funky feeling that you are the only one in the universe actually using the aliases. Anybody else out there?

Re: Get() should not replace Alias arguments in definition.

Posted: 31 Oct 2011 19:01
by TheQwerty
admin wrote:I don't feel like adding a new alias command ATM, but thinks for preparing the definition. Might use it later.
It was quickly drawn up to be similar to Tab(). The only real function of it that I would like to see sooner rather than later is the ability to retrieve all aliases.
admin wrote:I have the funky feeling that you are the only one in the universe actually using the aliases. Anybody else out there?
I sometimes get the same feeling which is disappointing because it really is a fantastic feature when you do a lot of keyboard work.

Maybe it goes hand-in-hand with the fact that I also feel like the only one in the universe that hides the tree and almost never uses it*, since I prefer to get around via address-bar and auto-complete. It's so inefficient moving a hand between keyboard and mouse!

*Though I have rather recently brought it back locked and minimized to my fixed drives.

Re: Get() should not replace Alias arguments in definition.

Posted: 31 Oct 2011 19:19
by Stefan
admin wrote:I have the funky feeling that you are the only one in the universe actually using the aliases. Anybody else out there?
Yes i do too, because i like command line style working:

Some basics
(Open "Tools > List Management > Aliases" and copy this all in there, then close the dialog and enter an alias into the address bar)

Code: Select all

@=::#633; //Tools / List Management / Aliases...#633 //// enter "@@" in address bar to open Alias list
f=::filter "<@0>";  //// enter "@f searchpattern" in address bar; "@f" to see all files again
N=::$a = report("{BaseName}",1); $a = input("New file name", "<curitem>","$a.txt"); new $a, file; run notepad $a;
n=::run notepad; //start notepad   //// enter "@n" in address bar
nc=::run notepad "<curitem>";    //// enter "@nc" in address bar
new=::#230; //New...     //// enter "@new" in address bar
q=::Load anyScriptFile;   //// enter "@q" in address bar to load an often used script
u=::goto "%UserProfile%";  //// enter "@u" in address bar to goto C:\Docum and Settings\username