Autocomplete for Aliases?

Features wanted...
Post Reply
highend
Posts: 14691
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Autocomplete for Aliases?

Post by highend »

It'll be nice if we'd have an autocomplete feature for aliases

E.g.:
you have an alias name "autostart" that points to "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\"

Entering "@a" e.g. in the address bar could autocomplete it to "@autostart" automatically as long as there aren't any other aliases defined that begin with an "a".

Would save some typing times...

Maybe a popup list as well?
One of my scripts helped you out? Please donate via Paypal

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Aliases broken?

Post by TheQwerty »

How are you defining your alias?

Keep in mind that if doing so via List Management the @ prefix should not be included.

EDIT: To clarify, the @ prefix can be included in LM but then your alias will be named @home and you'll have to use @@home to trigger it.

highend
Posts: 14691
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Aliases broken?

Post by highend »

*grml*

That's not in the help file...

Yeah, I was using the list management to define several (ofc including the @ sign)...

The good thing -> I'll move this thread and turn it into a feature request *giggle*

Thanks TheQwerty
One of my scripts helped you out? Please donate via Paypal

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Autocomplete for Aliases?

Post by TheQwerty »

highend wrote:The good thing -> I'll move this thread and turn it into a feature request *giggle*
But is the request that it be documented or that the LM shows the @-prefix?

I'm not opposed to the latter, but it's worth recalling that the Visual Filters and Quick Name Search lists also do not include prefixes. Granted they differ from aliases in that they are more MRU than definition lists. So... *shrugs*

Meanwhile, the Aliases dialog (Go > Aliases...) does include the @-prefix.


The address bar does offer MRU for aliases, but I second that auto-complete would be a great addition.

highend
Posts: 14691
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Autocomplete for Aliases?

Post by highend »

But is the request that it be documented or that the LM shows the @-prefix?
It should at least be documented that the prefix should not be used in the LM (as long as you don't want your real aliases have a name that begin with a double @ char.
One of my scripts helped you out? Please donate via Paypal

Borut
Posts: 1468
Joined: 19 Oct 2010 19:29
Location: Win10 Pro 64b 22H2, @120DPI (125%)

Re: Autocomplete for Aliases?

Post by Borut »

Autocomplete or not, I would like to go to the initial bug report, while to me it appears that the bug is still there...

If I define the following two aliases:

Code: Select all

uu=C:\Users\
u=C:\Users\%USERNAME%\
then if I enter @uu in the AB, I go to the wished place, but if I enter @u, then I do not. So it seems that variables are not resolved. I am not sure if this is as advertised, or not?
Win 10 Pro 64bit

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Autocomplete for Aliases?

Post by LittleBiG »

Borut, it works here.

FluxTorpedoe
Posts: 904
Joined: 05 Oct 2011 13:15

Re: Autocomplete for Aliases?

Post by FluxTorpedoe »

Hi there,

@Borut
AFAIK, %USERNAME% resolves to a full path, e.g. C:\Users\Borut, so the correct line should be:

Code: Select all

u=%USERNAME%
Regarding the double @, I use it to differentiate "functions" from paths, i.e. (in List Management)

Code: Select all

Me=%USERNAME%
@ren=::rename s, '<@1>/<@2>';
So in the address bar, I'll type e.g.
@Me (to go to the current user folder), or
@@ren 13, 2013 (to rename 13 to 2013 for selected files)

Borut
Posts: 1468
Joined: 19 Oct 2010 19:29
Location: Win10 Pro 64b 22H2, @120DPI (125%)

Re: Autocomplete for Aliases?

Post by Borut »

LittleBiG wrote:Borut, it works here.
Ah, yes, thanks, here now too - was my fault. Sorry, all.
FluxTorpedoe wrote:AFAIK, %USERNAME% resolves to a full path, e.g. C:\Users\Borut
Thanks Flux, but that was not it. It was something much more trivial - a missing directory at my place. :whistle: BTW,

Code: Select all

:: msg %USERNAME%
shows that it actually does return only the username.
Win 10 Pro 64bit

FluxTorpedoe
Posts: 904
Joined: 05 Oct 2011 13:15

Re: Autocomplete for Aliases?

Post by FluxTorpedoe »

Ooops, read and tested too quickly. I mistook %USERNAME% for %USERPROFILE%. :roll:
Funny that for Windows, %USERNAME% is also identified as a path you can go to!
So (for default setups) u=%USERNAME% , u=C:\Users\%USERNAME% and u=%USERPROFILE% will all be valid and point to the same folder.

WordBaron
Posts: 30
Joined: 29 Jun 2008 08:20

Re: Autocomplete for Aliases?

Post by WordBaron »

I know this was requested a while ago, but an autocomplete popup list of aliases would be great. When I type @name in the address bar, I'd love to see anything beginning with @name from which to choose. So I'd like to +1 this request.

Also, I have to say that with the latest 15.8 update, I love combining Global Visual Filters with normal Visual Filters, especially as it involves both labels and tags. Very nice!

Sincerely,
Walter

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Autocomplete for Aliases?

Post by TheQwerty »

TheQwerty wrote:The address bar does offer MRU for aliases, but I second that auto-complete would be a great addition.
This is still my opinion, but today I come with a workaround.

Add your aliases to the sticky section of the Address Bar & Go to list.
  1. Open the Alias goto list: Go | Aliases...
  2. Right-click the list and select Copy All Items.
  3. Close the list.
  4. Open the Address Bar & Go to... list: Tools | List Management | Address Bar & Go to...
  5. Enable Editor Mode (Pencil icon or F6).
  6. If you don't already have the Sticky Section separator in your list add it at the top: -----> mru
  7. Above the Sticky Section separator paste your aliases.
  8. OK
Now you can auto-complete your aliases.


While it would require some ugly scripting and INI modifications to automate this fully here is a small script to make the manual task easier. (This could be a great addition to klownboy's ListManagementHouseCleaning script.)

Code: Select all

"Add Aliases to Address Bar Sticky Section"
  Status 'Right-Click the list, select "Copy All Items", then Esc/Cancel.',, 'progress';
  #540; // Go | Aliases...
  CopyText "<clipboard><crlf>-----> mru<crlf>";
  Status 'Press F6 and then paste aliases at the top. (Delete "-----> mru" if duplicate.)',, 'progress';
  #611; // Tools | List Management | Address Bar & Go to...
(I'm not a fan of automation through SendKeys but realize they would help here. ;) )

Post Reply