Questions tagged [psreadline]

Use for questions about PSReadLine, an alternative command line editor for PowerShell.

Related tags

References

41 questions
3
votes
1 answer

bash history list view like powershell?

With PSReadLine 2.2.0 beta4 Set-PSReadLineOption -PredictionSource History Set-PSReadLineOption -PredictionViewStyle ListView powershell can show history like this: Does Bash or any other Linux shell have this feature?
Gary Allen
  • 385
  • 1
  • 3
  • 11
3
votes
2 answers

How are PowerShell Modules (particularly PSReadline) loaded automatically in V5?

I recently installed Windows 10, which includes V5 of PowerShell, or 5.1.14393.206 to be exact ($PSVersionTable.PSVersion). On new computers I install PSReadline. However, Windows 10 comes with it already installed. My question is, how is…
Tahir Hassan
  • 5,715
  • 6
  • 45
  • 65
2
votes
1 answer

VS code terminal "WARNING: The prediction 'ListView' is temporarily disabled because the current window size of the console is too small"

I am using VS code and the terminal gives me this warning. WARNING: The prediction 'ListView' is temporarily disabled because the current window size of the console is too small. To use the 'ListView', please make sure the 'WindowWidth' is not less…
2
votes
2 answers

Set-PSReadLineOption: A parameter cannot be found that matches parameter name 'PredictionViewStyle'

I'm trying to change the -PredictionViewStyle option of PSReadline, but I got the error "Set-PSReadLineOption: A parameter cannot be found that matches parameter name 'PredictionViewStyle'." It's a fresh install and Set-PSReadLineOption…
Balu
  • 398
  • 6
  • 15
2
votes
2 answers

PowerShell track history as full objects across sessions

I am a novice using PowerShell 5.1 under Win 10. I am tinkering with history. So far, I managed to have a persistent history across sessions with PSReadline. * But this is a "limited" persistent history, as only commands are saved in a text file,…
2
votes
1 answer

Powershell : How to install PSReadline module in an offline computer

I need to install PSReadline module in an offline computer with Windows 7 SP1 and powershell 5.1 I have another computer that is connected to the internet. Could you please explain how to download the relevant files and how to install them on the…
Rafael Zanzoori
  • 531
  • 1
  • 7
  • 23
2
votes
1 answer

How to use ANSI escape sequence color codes for PSReadLineOption v2 in Powershell console?

I'm trying to use the built-in PSReadLine (v2) module of Powershell (v5.1) to customize Powershell console text colors. Previous versions of PSReadLine allowed you to simply specify -Background and -Foreground parameters for any given token type.…
mmseng
  • 735
  • 9
  • 24
2
votes
1 answer

Insert text in current commandline in PowerShell

My goal is to write a function which behaves similarily to what happens when invoking PsReadline's Ctrl-R functionality: insert text on the current command line, but don't accept the line, so that when the function returns the cursor is still on the…
stijn
  • 34,664
  • 13
  • 111
  • 163
2
votes
1 answer

PowerShell OutputType attribute not working

The OutputType attribute is supposed to give type information through intellisense. However it does not work as expected. I have tested this in both PSReadline and PowerShell ISE and they work the same. The following is a sample function I am…
Tahir Hassan
  • 5,715
  • 6
  • 45
  • 65
1
vote
1 answer

How to turn on the automatic prompt function of PowerShell?

I don't know what happened when I was using PowerShell.My PowerShell suddenly had an automatic completion function, but I don't know how I opened it. I suspect this is running a certain command or using a shortcut key. But before running this…
1
vote
0 answers

PsReadLine: execute selection

I would like to be able to select some part of the text in my command (e.g. a path) and start it, so that explorer opens the directory, or file. So far i have come up with the code at the end of the post, which works, but has some issues: it only…
1
vote
1 answer

Is there a way to map CTRL+[ to escape in Powershell?

I discovered there is a vi mode in powershell, however it appears CTRL+[ is not mapped to escape like it is in vi and bash. I added the setting to my profile like this: New-Item $profile -Type File -Force echo "Set-PSReadLineOption -EditMode vi" >>…
Michael
  • 11
  • 3
1
vote
1 answer

Powershell >6.0... command line background color with ANSI sequences (PSReadLine) ?how?

In PowerShell >6.0 I can change the command line FOREGROUND colors with: Set-PSReadLineOption -Colors @{ Keyword="#0FAFE0"; Variable="#987ABC" }+ but how do I change the BACKGROUND colors with RGB??? (#RRGGBB) i can see some examples with ASCII…
ZEE
  • 2,931
  • 5
  • 35
  • 47
1
vote
1 answer

HJKL for navigation on PowerShell PSReadLine's MenuComplete function

I currently am half-happy with the PSReadLine module's MenuComplete function assigned to my Tab key, and was looking for a way to navigate around the offered menu with the HJKL keys. I currently have this on top of my…
Utkan Gezer
  • 3,009
  • 2
  • 16
  • 29
1
vote
1 answer

PSConsoleReadLine exceptions

'PSReadLine' cmdlets no longer work: PS> Set-PSReadlineOption -EditMode Vi Set-PSReadlineOption : The type initializer for 'Microsoft.PowerShell.PSConsoleReadLine' threw an exception. At line:1 char:1 + Set-PSReadlineOption -EditMode Vi +…
joharr
  • 403
  • 4
  • 12