PSEverything
PSEverything copied to clipboard
Suggestion: consider not providing command aliases (se, sles)
Thank you for the great module which is very well designed and really handy.
Everything looks thought through except one tiny bit, the exposed aliases. They turns out to be intrusive, i.e. they clash with my own pet aliases.
Aliases are handy indeed as such... but they are up to users.
Ironically es
and sles
are more likely to hurt exactly users who value and use aliases.
Some thoughts from @KirkMunro in his blog post To alias, or not to alias.
Import-Module -Cmdlet Select-EverythingString, Search-Everything
will only import the functions. Or force-set your aliases.
Here is the typical gotcha:
- My aliases are set in the profile for interactive sessions
- Then I invoke
Search-Everything
in a session -
PSEverything
is auto imported and overrides my aliases
Note that in my usual scenario I do not have to explicitly import PSEverything
. And this is very good, because sometimes I need the module, but most of the time I do not need it in a session. Handy module auto import does the trick.
So the suggested workarounds are unfortunately not very handy
will only import the functions
Then I have to remember typing this command and remember not to trigger auto loading unintentionally
Or force-set your aliases
Then I have to import the module always (I do not really need this) before setting my aliases.
I've considered this, and I think the right thing is to release the module with a new major version without the aliases.