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

Cannot repurpose the alias 'dir' as a custom user alias #34

Open
3 tasks done
RalfReddings opened this issue Nov 13, 2023 · 1 comment
Open
3 tasks done

Cannot repurpose the alias 'dir' as a custom user alias #34

RalfReddings opened this issue Nov 13, 2023 · 1 comment

Comments

@RalfReddings
Copy link

RalfReddings commented Nov 13, 2023

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

[no errors are output in my issue]

Screenshot

Environment data

PS Version: 7.3.4
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.3.4
PSReadLine EditMode: Windows
OS: Windows 11
BufferWidth: 172
BufferHeight: 32

Steps to reproduce

The Alias dir which is by default is assigned to get-childitem cannot be repurposed by the user to something else, of their own choosing.

  • Remove the default dir alias with `Remove-Alias -Name dir
  • Assign the alias dir to another command `set-alias -Name dir -Value start-process
  • Type dir then space and try to tab to get parameter suggestions

PsReadline suggests get-childitem parameters instead of the parameters for get-process such as filepath.

The alias is bound to get-process, which can be confirmed by just executing dir.

I have been having this issue with older PsReadline versions too.

Of course, it makes no sense to assign dir to get-process, its just an example, I want to use dir for my own command. Cheers

Expected behavior

When I use dir, I am expecting the parameters for get-process to be suggested instead of get-childitem

Actual behavior

[I dont understand this section]

@StevenBucher98 StevenBucher98 transferred this issue from PowerShell/PSReadLine Nov 13, 2023
@StevenBucher98
Copy link
Collaborator

Transferring to CompletionPredictor repo, this module may not unwrap the aliases properly to get the right tab completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants