Page 1 of 1

[GRANTED]Shorthand alias variable

Posted: 16 Dec 2015 09:50
by bdeshi
I make extensive use of aliases to portablize paths and so on, for example, <get alias programs>\autoit\au3.exe, <get alias projects>\xyahklivefilter etc
but it's tedious.
Can you give us me a shorter shortcut for calling aliases, such as <@aliasname[ params]> please? :)
so I can use <@programs>\autoit\au3.exe instead.

Re: Shorthand alias variable

Posted: 16 Dec 2015 21:25
by TheQwerty
AFXY ATM but can't you already do this with a goto?

Code: Select all

goto '@programs \autoit\au3.exe';
(Unless your goal was to retrieve the value only then... use a UDF.)

Re: Shorthand alias variable

Posted: 17 Dec 2015 05:58
by bdeshi
that's unavailable in say, CFIs. And the variable form is cleaner in POM (less scripts, the icon is automatically detected too).

Re: Shorthand alias variable

Posted: 17 Dec 2015 09:24
by binocular222
+1

Re: Shorthand alias variable

Posted: 22 Dec 2015 19:58
by nerdweed
+1. Will be usable in Copy To, Move To dialogs as well.

Re: Shorthand alias variable

Posted: 21 Feb 2016 17:16
by bdeshi
throw-in :ball:

Re: Shorthand alias variable

Posted: 22 Feb 2016 13:39
by murdock01
Why use aliases? Since all my portable programs are on the same drive as XYplorer, I use ? or <xydrive> to root my paths to a location.
So in your case you could use ?:\programs\autoit\au3.exe or <xydrive>\programs\autoit\au3.exe (assuming all your portable stuff is together like mine and on the same drive as XYplorer). I have no hard coded drive letters or paths in my config.
I have not used aliases yet so I guess I will look into them.

You could also use the "get" function to help resolve paths. Get will resolve a volume label to a drive letter and even perform path substitution on the results.
for help file:

Code: Select all

echo <get driveletter "Fun" "C:\Windows">; //F:\Windows
This is something that I suggested as a wish and was added to XYplorer, Thanks Donald!

Hope that helps

Re: Shorthand alias variable

Posted: 22 Feb 2016 14:12
by bdeshi
that makes my paths absolute again, with only the drive letter part remaining portable.
I use aliases as a sort of environment variables: change the alias once, and zillion paths all over XYplorer get updated. I stand by my original wish. 8)

Re: Shorthand alias variable

Posted: 22 Feb 2016 15:20
by admin
An alias for an alias... hmmm... it might be hybris, but I'll give it a shot.

Re: [GRANTED]Shorthand alias variable

Posted: 22 Feb 2016 19:22
by bdeshi
Thank you <get alias Don>;
Thank you <@Don> ! :tup: :biggrin: :tup:

Re: [GRANTED]Shorthand alias variable

Posted: 22 Feb 2016 19:51
by murdock01
I see what you are doing. I like it and will have to try (aliases) but I do the same thing with perm variables.
I set paths in permanent variables and like you, change once and updates everywhere.
But as I said before the drive is determined with a ? or a <xydrive>, then the path comes from my perm variables, then the folder or file name.

Re: [GRANTED]Shorthand alias variable

Posted: 22 Feb 2016 20:42
by bdeshi
Sure, permavars are another great alternative.

Aliases in XYplorer aren't just plain old stand-in-for-other-text, but much more! (Stefan's @@-trick is brilliant!)