Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to add a whitelist to Expand-Aliases #18

Closed
AdmiringWorm opened this issue May 5, 2018 · 7 comments
Closed

Allow users to add a whitelist to Expand-Aliases #18

AdmiringWorm opened this issue May 5, 2018 · 7 comments
Assignees
Labels
Milestone

Comments

@AdmiringWorm
Copy link
Member

Would be useful to have the ability to add a white list of aliases that shouldn't be expanded when running Expand-Aliases.

@AdmiringWorm AdmiringWorm added this to the 0.3.0 milestone May 5, 2018
@AdmiringWorm AdmiringWorm self-assigned this May 5, 2018
@AdmiringWorm
Copy link
Member Author

I have added this now in a local branch, and is ready to be published when the next release comes around.

/cc @majkinetor (I believe you were the one that asked for this feature some time ago?)

@majkinetor
Copy link

Removing % and ? from expanding on core ASAP.

@AdmiringWorm
Copy link
Member Author

it's not available yet, and won't be either until the rest of my planned features have been implemented.

The issue was just closed since I pushed the code up to github.

@majkinetor
Copy link

I noticed.

I have it prepared: if (Test-Path tools) { Expand-Aliases -Directory tools -Whitelist '?','%','ls' } , just let me know when you push to gallery 👂

@AdmiringWorm
Copy link
Member Author

AdmiringWorm commented May 10, 2018

While I agree adding the ? and %, but not ls as that could potentially be mapped to a executable which could break the install script for those users.

You should also add the Get-PackageParameter to the whitelist, as that have been changed to an alias in chocolatey.

@majkinetor
Copy link

It can't AFAIK. Aliases have priority over exes and ls is there among internal aliases since v0. And furthemore, Get-ChildItem vs ls is really no brainer. Not everybody is in this non alias nonsence vagon: PowerShell/PSScriptAnalyzer#214

@majkinetor
Copy link

Let me stand corrected. On linux it can and it does now. But when we arrive with chocolatey on Linux then we will think about that.

AdmiringWorm added a commit that referenced this issue Jun 2, 2018
* release/0.3.0:
  (build) Updated to only collect files in build directory
  (build) Added codecov config
  (docs) Fixed incorrect github release link
  (docs) Fixed copy-paste error
  (GH-15) Allow users to disable escaping of redirected url
  (GH-18) Added ability to add alias whitelist
  (choco) Fixed incorrect urls used in nuspec file
  (docs) Updated release notes
wormie-bot pushed a commit that referenced this issue Jun 2, 2018
Merge branch 'release/0.3.0'

* release/0.3.0:
  (build) Updated to only collect files in build directory
  (build) Added codecov config
  (docs) Fixed incorrect github release link
  (docs) Fixed copy-paste error
  (GH-15) Allow users to disable escaping of redirected url
  (GH-18) Added ability to add alias whitelist
  (choco) Fixed incorrect urls used in nuspec file
  (docs) Updated release notes
wormie-bot pushed a commit that referenced this issue Jun 2, 2018
Merge branch 'release/0.3.0'

* release/0.3.0:
  (build) Updated to only collect files in build directory
  (build) Added codecov config
  (docs) Fixed incorrect github release link
  (docs) Fixed copy-paste error
  (GH-15) Allow users to disable escaping of redirected url
  (GH-18) Added ability to add alias whitelist
  (choco) Fixed incorrect urls used in nuspec file
  (docs) Updated release notes
@lock lock bot locked as resolved and limited conversation to collaborators Dec 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants