PowerShell: Command history is not available using up and down arrows
When inside inshellisence, using up or down arrows will not bring up commands from the command history.
Applicable to PowerShell, not tested with bash or other shells.
Closing as this was fixed in 0.0.1-rc.5
node: v20.18.0 inshellisense: 0.0.1-rc.16 powershell
| Name | Value |
|---|---|
| PSVersion | 5.1.19041.5007 |
| PSEdition | Desktop |
| PSCompatibleVersions | {1.0, 2.0, 3.0, 4.0...} |
| BuildVersion | 10.0.19041.5007 |
| CLRVersion | 4.0.30319.42000 |
| WSManStackVersion | 3.0 |
| PSRemotingProtocolVersion | 2.3 |
| SerializationVersion | 1.1.0.1 |
it stuck in
cd ~\Developer\intro-to-react-by-day\day-10-ts\ ; bun run dev
This Might Help:
- if i add trailing spaces in ConsoleHost_history.txt file after
run devit's doesn't stuck - but trailing spaces doesn't always help eg:
- with trailing spaces
code --user-data-dir="${HOME}/.vscode-root"❌ stuck - without trailing spaces
code --user-data-dir="${HOME}/.vscode-root"❌ stuck - with .exe
code.exe --user-data-dir="${HOME}/.vscode-root"✔ doesn't stuck
- with trailing spaces
@cpendery is there a workaround like
[bindings.previousSuggestion]
key = "up"
ctrl = true
this is really annoying
node: v20.18.0 inshellisense: 0.0.1-rc.16 powershell
Name Value PSVersion 5.1.19041.5007 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.5007 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 it stuck in
cd ~\Developer\intro-to-react-by-day\day-10-ts\ ; bun run dev
![]()
![]()
This Might Help:
if i add trailing spaces in ConsoleHost_history.txt file after
run devit's doesn't stuckbut trailing spaces doesn't always help eg:
- with trailing spaces
code --user-data-dir="${HOME}/.vscode-root"❌ stuck- without trailing spaces
code --user-data-dir="${HOME}/.vscode-root"❌ stuck- with .exe
code.exe --user-data-dir="${HOME}/.vscode-root"✔ doesn't stuck@cpendery is there a workaround like
[bindings.previousSuggestion] key = "up" ctrl = true this is really annoying
I can't replicate this on 0.0.1-rc.16. Can you try on 0.0.1-rc.18 and run inshellisense with the -V option? The logs will be at ~/.inshellisense/inshellisense.log and it would help alot if you could provide them here
- the bug was caused by putting plugging at top of "C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1"
- putting plugging at the end of file solve the issue
# ---------------- inshellisense shell plugin ----------------
$__IsCommandFlag = ([Environment]::GetCommandLineArgs() | ForEach-Object { $_.contains("-Command") }) -contains $true
$__IsNoExitFlag = ([Environment]::GetCommandLineArgs() | ForEach-Object { $_.contains("-NoExit") }) -contains $true
$__IsInteractive = -not $__IsCommandFlag -or ($__IsCommandFlag -and $__IsNoExitFlag)
if ([string]::IsNullOrEmpty($env:ISTERM) -and [Environment]::UserInteractive -and $__IsInteractive) {
is -s powershell
Stop-Process -Id $pid
}
# end of file
nb: but this bug still occurs with git-bash-windows "C:\Program Files\Git\etc\bash.bashrc" for 0.0.1-rc.16 and 0.0.1-rc.18
# ---------------- inshellisense shell plugin ----------------
if [[ -z "${ISTERM}" && $- = *i* && $- != *c* ]]; then
shopt -q login_shell
login_shell=$?
if [ $login_shell -eq 0 ]; then
is -s bash --login ; exit
else
is -s bash ; exit
fi
fi
# end of file
I would like to report and add another very similar problem in this discussion, the problem is that you cannot delete the whole word when pressing Ctrl + delete key. This happens when the inshellisense session is live, you can only delete one letter at a time, I noticed this in my powershell terminal using windows 11.
I would like to report and add another very similar problem in this discussion, the problem is that you cannot delete the whole word when pressing Ctrl + delete key. This happens when the inshellisense session is live, you can only delete one letter at a time, I noticed this in my powershell terminal using windows 11.
should be working in 0.0.1-rc.21
why this closed when the issue still exist step to reproduce:
- put bellow in
C:\Users\username\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
ls
watchman trigger-list .
- restart powershell
- ↑ then ↑
stuck in
watchman trigger-list .
@cpendery do you reproduce on your end or i missing something is ↑esc↑ the only way? is esc necessary here?