Page 1 of 1

[PSS 2015] Option: Auto-Expand Aliases

Posted: Wed Dec 09, 2015 3:34 am
by Bosparan
Hi Sapien Team,

When using the console, we all use aliases all day. We bind our everyday commands to simple aliases, to speed up our daily work. Aliases are a deeply ingrained habit and are obviously here to stay.
However, in a script-file, there is no room for aliases. Aliases can be altered, aliases can be removed and aliases are harder to read.
Which is why typing them in a script is one of the deadly powershell-sins in our team. This however runs contrary to our habits and focus on efficiency while on the console. Good habits in one situation become bad habits in another.

So what I'd like is an option to automatically expand aliases (both for functions and their parameters) ...
... when typing them, after pressing space or enter
... when pasting code into the editor
... when using the auto-format feature

Cheers,
Bosparan

Re: [PSS 2015] Option: Auto-Expand Aliases

Posted: Wed Dec 09, 2015 9:54 am
by davidc
An option to support the alias expansion in the code formatter is on our TODO list.

You can expand alias the following ways:

1. Press [Tab] after typing the alias name.
2. Press [Ctrl + Shift + A] to expand all aliases in the script.
3. Use the editor context menu to expand the alias.

David

Re: [PSS 2015] Option: Auto-Expand Aliases

Posted: Wed Dec 09, 2015 10:33 am
by Bosparan
Hi David,

nice to see it's coming at some point.
davidc wrote:2. Press [Ctrl + Shift + A] to expand all aliases in the script.
Oops, wasn't aware of that shortcut yet. Thanks for the info.

Cheers,
Bosparan