GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Enable experimental feature to support tab completion on abbreviated cmdlets by SteveL-MSFT · Pull Request #8109 · PowerShell/PowerShell

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Oct 23, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

PR Summary

While watching some demos at PSConfAsia, it's obvious that cmdlet nouns have gotten descriptive and wordy (Azure and AWS are good examples). This experimental feature enables tab-completion of abbreviated cmdlets and functions:

i-psdf<tab>

returns: Import-PowerShellDataFile

u-akvmssdr<tab>

returns: Undo-AzKeyVaultManagedStorageSasDefinitionRemoval

Note that this only works for tab completion (interactive use), so i-psdf is still an invalid cmdlet name in scripts.

The matching is entirely based on the capital letters of the verb and noun. To test this, create test.json:

{
  "ExperimentalFeatures": [
    "PSUseAbbreviationExpansion"
  ]
}

And run:

pwsh -settingsfile ./test.json

Associated RFC

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Change is not breaking
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.
  • User-facing changes
    • Not Applicable
    • OR
    • User-facing Documentation needed
      • Issue filed - Issue link:
  • Testing - New and feature
    • Not Applicable or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed
      • Add [feature] if the change is significant or affects feature tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dfinke, RichiCoder1, exactmike, ALIENQuake, mattmcnabb, and jfrmilner reacted with thumbs up emoji TylerLeonhardt reacted with hooray emoji kvprasoon and ALIENQuake reacted with heart emoji
All reactions
  • 👍 6 reactions
  • 🎉 1 reaction
  • ❤️ 2 reactions
@SteveL-MSFT Steve Lee (SteveL-MSFT) assigned Dongbo Wang (daxian-dbw) Oct 23, 2018
@SteveL-MSFT
Steve Lee (SteveL-MSFT) requested review from Bruce Payette (BrucePay) and Dongbo Wang (daxian-dbw) October 23, 2018 21:09
@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the get-command-abbr branch from c5c5351 to 8e113da Compare October 23, 2018 21:11
@SteveL-MSFT Steve Lee (SteveL-MSFT) added Experimental Experimental Feature WG-Engine core PowerShell engine, interpreter, and runtime labels Oct 24, 2018
@PaulHigin Paul Higinbotham (PaulHigin) assigned Aditya Patwardhan (adityapatwardhan) and Dongbo Wang (daxian-dbw) and unassigned Dongbo Wang (daxian-dbw) and Aditya Patwardhan (adityapatwardhan) Oct 29, 2018
@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the get-command-abbr branch from de630aa to b95ae6d Compare November 4, 2018 15:49
@SteveL-MSFT Steve Lee (SteveL-MSFT) mentioned this pull request Nov 7, 2018
draft of abbreviation expansion tab completion PowerShell/PowerShell-RFC#150
Merged
@anmenaga

Andrew (anmenaga) commented Nov 8, 2018

Copy link
Copy Markdown

This needs another [feature] test pass to make sure it is green.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the get-command-abbr branch from b95ae6d to d7721be Compare November 8, 2018 01:20
@anmenaga

Andrew (anmenaga) commented Nov 28, 2018

Copy link
Copy Markdown

Dongbo Wang (@daxian-dbw) Bruce Payette (@BrucePay) This PR needs your review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stale

stale Bot commented Dec 28, 2018

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days.
Thank you for your contributions.
Community members are welcome to grab these works.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stale stale Bot added the Stale label Dec 28, 2018
@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the get-command-abbr branch from d7721be to af7ea4e Compare January 7, 2019 01:04
@stale stale Bot removed the Stale label Jan 7, 2019
JamesWTruher
James Truher (JamesWTruher) approved these changes Jan 7, 2019
View reviewed changes

@JamesWTruher James Truher (JamesWTruher) left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's nothing in my comments which are blocking, but I am worried about the case where we have an error (CompletionCompleters, line 193)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandSearcher.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Command.Tests.ps1 Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Command.Tests.ps1 Resolved

Uh oh!

There was an error while loading. Please reload this page.

daxian-dbw
Dongbo Wang (daxian-dbw) reviewed Jan 8, 2019
View reviewed changes
Comment thread src/System.Management.Automation/engine/CommandDiscovery.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandDiscovery.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandDiscovery.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandSearcher.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandSearcher.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandDiscovery.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the get-command-abbr branch from 24c1d29 to f130bd9 Compare January 9, 2019 22:09
daxian-dbw
Dongbo Wang (daxian-dbw) reviewed Jan 10, 2019
View reviewed changes
Comment thread src/System.Management.Automation/engine/CommandDiscovery.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/Modules/ModuleUtils.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/Modules/ModuleUtils.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandSearcher.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandSearcher.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/GetCommandCommand.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/CommandDiscovery.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the get-command-abbr branch from 68d927c to 0893d7c Compare January 10, 2019 05:38
daxian-dbw
Dongbo Wang (daxian-dbw) reviewed Jan 10, 2019
View reviewed changes
Comment thread src/System.Management.Automation/engine/CommandSearcher.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/Modules/ModuleUtils.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/System.Management.Automation/engine/Modules/ModuleUtils.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

daxian-dbw
Dongbo Wang (daxian-dbw) reviewed Jan 10, 2019
View reviewed changes
Comment thread src/System.Management.Automation/engine/GetCommandCommand.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the get-command-abbr branch from 248961b to 9138e21 Compare January 10, 2019 21:22
@daxian-dbw

Dongbo Wang (daxian-dbw) commented Jan 10, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Steve Lee (@SteveL-MSFT) There is one comment pending #8109 (comment), can you please respond to it?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Steve Lee (SteveL-MSFT) added 2 commits January 10, 2019 14:30
@SteveL-MSFT
[feature]
1f54e88
enable experimental feature to support tab completion on abbreviations of cmdlets
@SteveL-MSFT
[feature]
9f3dfe9
address codefactor issues
Steve Lee (SteveL-MSFT) added 5 commits January 10, 2019 14:31
@SteveL-MSFT
address Jim's feedback
2b63656
@SteveL-MSFT
address Dongbo's feedback
c2530b0
fixed code to support returning multiple results and not just first one
added test for automoduleloading which also covers multiple results from different modules
@SteveL-MSFT
refactor ExecuteGetCommandCommand as local function
9339cd0
@SteveL-MSFT
[feature]
cebe965
address Dongbo's feedback
@SteveL-MSFT
address Dongbo's feedback
dc7739e
@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the get-command-abbr branch from 9138e21 to dc7739e Compare January 10, 2019 22:41
daxian-dbw
Dongbo Wang (daxian-dbw) approved these changes Jan 10, 2019
View reviewed changes

@daxian-dbw Dongbo Wang (daxian-dbw) left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 71e58f9 into PowerShell:master Jan 11, 2019
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the get-command-abbr branch January 11, 2019 01:51
@iSazonov

Ilya (iSazonov) commented Jan 11, 2019

Copy link
Copy Markdown
Collaborator

Dongbo Wang (@daxian-dbw) Do we add experimental features to Change log? Do we need set CL-* label?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@PaulHigin Paul Higinbotham (PaulHigin) added the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Jan 24, 2019
This was referenced Jan 28, 2019
[BUG] Starting Session as Standard user on Windows with Experimental Feature for Command tab completion stops PSReadline loading #8770
Closed
[BUG] Starting Admin Session on Windows with Experimental Feature for Command tab completion does not give Experimental Tab Completion #8771
Closed
@kilasuit Ryan Yates (kilasuit) mentioned this pull request Feb 21, 2019
Enable Experimentation Mode use in the editor PowerShell/vscode-powershell#1767
Closed
@TylerLeonhardt TylerLeonhardt mentioned this pull request Apr 17, 2019
Add wildcard back to end of tab completion command lookup #9383
Merged
7 of 10 tasks
Travis Plunk (TravisEz13) pushed a commit that referenced this pull request Apr 18, 2019
@TylerLeonhardt @TravisEz13
Add wildcard back to end of tab completion command lookup (#9383)
9140e42
Re-add wildcard when searching AST + Missed test case.

## PR Context

In #8109, we removed the line that added a wildcard to the end of the command that was used to match commands in the script AST. This readds that line closer to where it is used.
Travis Plunk (TravisEz13) pushed a commit that referenced this pull request May 13, 2019
@TylerLeonhardt @TravisEz13
Add wildcard back to end of tab completion command lookup (#9383)
b27217d
Re-add wildcard when searching AST + Missed test case.

## PR Context

In #8109, we removed the line that added a wildcard to the end of the command that was used to match commands in the script AST. This readds that line closer to where it is used.
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@SteveL-MSFT @daxian-dbw
Add the experimental feature 'PSUseAbbreviationExpansion' to support …
82bb2be
…tab completion on abbreviated command names (PowerShell#8109)
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@TylerLeonhardt @TravisEz13
Add wildcard back to end of tab completion command lookup (PowerShell…
73e8ef8
…#9383)

Re-add wildcard when searching AST + Missed test case.

## PR Context

In PowerShell#8109, we removed the line that added a wildcard to the end of the command that was used to match commands in the script AST. This readds that line closer to where it is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@daxian-dbw Dongbo Wang (daxian-dbw) daxian-dbw approved these changes
@BrucePay Bruce Payette (BrucePay) Awaiting requested review from BrucePay
+1 more reviewer
@JamesWTruher James Truher (JamesWTruher) JamesWTruher approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@daxian-dbw Dongbo Wang (daxian-dbw)

Labels

CL-Engine Indicates that a PR should be marked as an engine change in the Change Log Experimental Experimental Feature WG-Engine core PowerShell engine, interpreter, and runtime

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@SteveL-MSFT @anmenaga @daxian-dbw @iSazonov @JamesWTruher @adityapatwardhan @PaulHigin
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.