Questions tagged [psreadline]

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

Related tags

References

41 questions
18
votes
6 answers

How to turn off syntax highlighting in console?

I just want PowerShell to be black text on a white background. However, PowerShell v5 highlights my commands and makes them yellow, which is impossible to see. Is there a way to turn off ALL syntax highlighting in PowerShell?
Simonxca
  • 648
  • 1
  • 6
  • 18
8
votes
1 answer

A parameter cannot be found that matches parameter name 'TokenKind'

I have beautified my Powershell according to this blog, but the Operator and Parameter are grey as follows: So I change their colors by Set-PSReadlineOption: Set-PSReadlineOption -TokenKind Operator -ForegroundColor Yellow but get the following…
Z-Y.L
  • 1,740
  • 1
  • 11
  • 15
7
votes
1 answer

How to save and load history in powershell PSReadLine module?

I'm using great PSReadLine module for Powershell and I really like that is persist my history of commands. But I need to reinstall my system. What is the easiest way to save this history (probably to file) an load it after fresh install of…
Mariusz Pawelski
  • 25,983
  • 11
  • 67
  • 80
6
votes
2 answers

Rebind Escape in PSReadline for Vi-Mode

I have installed the PSReadline module for PowerShell to get Keybindings from Bash in PowerShell. I enabled Vi-Mode and it works good. The problem is: In Vim I always use j, k to exit insert-mode. That means: First I type j and then k very fast. If…
itmuckel
  • 1,300
  • 15
  • 23
6
votes
1 answer

Why does PowerShell 5 from Windows 7 not have the same features as Windows 10?

I upgraded my PowerShell from 4.0 to 5.0 (Feb. 2016 release) on my Windows 7 SP1 machine. The $PSVersionTable shows PowerShell 5.0, but the shell does not have the same features as PowerShell 5.0 in Windows 10. Differences: Keyword…
Paebbels
  • 15,573
  • 13
  • 70
  • 139
4
votes
1 answer

Different cursor for different Vim modes in Powershell

I added Vim bindings to my Powershell using PSReadline module as shown in this Server Fault post. The problem after this was that there wasn't any visual indicator for the different modes of Vim. I just wanted different cursors for the 'command' and…
4
votes
2 answers

In powershell with psreadline -EditMode VI how to ensure the cursor starts at the end of the line when going through history

I'm using the powershell VI mode via Set-PSReadlineOption -EditMode vi It is awsome to be able to edit the line using VI commands however there is one thing that is annoying. When using the up and down arrows to navigate history the cursor always…
bradgonesurfing
  • 30,949
  • 17
  • 114
  • 217
4
votes
1 answer

Change PowerShell PSReadLine MenuComplete function's colors

I am currently playing with the PSReadLine module options in PowerShell. In particular I am setting up a custom color theme. I have been able to set most of the colors I require using the following syntax as an example: Set-PSReadLineOption…
rjkowalewski
  • 341
  • 5
  • 19
4
votes
1 answer

Server 2012 R2 missing PSReadline cmdlets?

Works on Win 10 but on server 2012 R2 its not there. PS> Get-PSReadlineKeyHandler Get-PSReadlineKeyHandler : The term 'Get-PSReadlineKeyHandler' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the…
red888
  • 27,709
  • 55
  • 204
  • 392
3
votes
1 answer

Powershell PSReadLine : Get Key's for a given Function?

In PSReadLine 2.2.2 for PowerShell 7.2.11, On Windows, you can also use the Alt+? key chord to show the function bound to the next key chord you enter. Conversely, is there a key or PS command that will show keys for a given function? For example,…
3
votes
2 answers

Get-PSReadLineKeyHandler : A parameter cannot be found that matches parameter name 'Key'. What is this in Oh My Posh?

Get-PSReadLineKeyHandler : A parameter cannot be found that matches parameter name 'Key'. At line:380 char:43 + if ((Get-PSReadLineKeyHandler -Key Spacebar).Function -eq ... + ~~~~ +…
Bipul Hf
  • 33
  • 1
  • 5
3
votes
1 answer

How to disable suggestion while typing in powershell

While executing commands in PowerShell it's automatically suggesting texts How can I disable these suggestions and also in future if I want to enable the suggestions how can I do it?
Udesh
  • 2,415
  • 2
  • 22
  • 32
3
votes
1 answer

Why is PSReadLine History File missing and PSReadLineOption AddToHistoryHandler is blank in Powershell 5 ISE?

When running Powershell 5.1.19041.1682 in the Powershell_ISE Version 10.0.19041.1 (Windows 10) host the HistorySavePath property is set to a full file path however the file is never created after running commands in the ISE window. I have executed…
3
votes
1 answer

Accept part of the autocompletion

I have recently got myself a new Windows 11 laptop, and started exploring powershell. Never used it before on Windows, but I'm a frequest user of zsh in Mac so not completely new. I upgraded Powershell to 7.2.1, but noticed that the auto-suggestion…
yarnabrina
  • 1,561
  • 1
  • 10
  • 30
3
votes
2 answers

How do you edit the command line in an external editor?

tl;dr I want to find a Powershell version of the bash edit-and-execute-command widget or the zsh edit-command-line widget. Background Short commands get executed directly on the command-line, long complicated commands get executed from scripts.…
Thor
  • 45,082
  • 11
  • 119
  • 130
1
2 3