-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Add auto path completion for Read-Host #15199
Comments
The code ↓ function New-FolderBaseTemplate {
param (
[Parameter()]
[ValidateSet("PyCharm")]
[String]
$ActionName,
[Parameter()]
[String]
$InstanceName
)
if($ActionName -eq "PyCharm"){
$TargetRootLocation = 'D:\MyDocs\pycharm_pro'
Set-Location $TargetRootLocation
$TargetLocation = Read-Host 'Please select directory.'
$params = @{
NewInstanceName = $InstanceName
TargetLocation = $TargetLocation
TemplatePath = "$TargetLocation\.template"
}
NewFolderFromTemplate @params
}
} |
While not specifically about tab-completion, PowerShell/PSReadLine#881 proposes making |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
2 similar comments
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes. |
The PowerShell function being written to generate folders based on templates.
It has a "target path" parameter that is expected to be a subdirectory of a specific directory, so it wants to provide the user with a path completion basis, but there is no such completion mechanism in the
Read-Host
state.Although there is a completion mechanism when entering the parameters, the working directory does not change at that time, so the user has to switch the working directory manually, which makes the experience very bad.
CMD has this feature, but PowerShell does not, so this is a problem.
Looking at StackOverFlow, a temporary solution was found to use the GUI, but this has a lot of problems and doesn't work in many cases.
A similar issue has been found, but this issue already has an alternative method, and the path completion seems to have not.
The text was updated successfully, but these errors were encountered: