Move word-by-word in Powershell Intellisense - powershell

I've achieved Intellisense from the Powershell via PSReadLine, but unlike fish shell where a word from the path can be concluded by hitting Ctrl + Right Arrow, I can't find any such shortcut or solution for this issue in Powershell. If any solutions, I please welcome them.
Example :
I now want to obtain cd '.\PICS\KIRAN\' only.
In fish shell, it's the scenario where you click Ctrl + Right Arrow for 2 times and then you get the expected result.
What should I do to obtain the same result in Windows Powershell ?

Alt+F (forward)
Alt+B (backword)

Related

VSCode grayed out history commands [duplicate]

VSCode's PowerShell Terminal now offers a kind of suggestion in gray of what you might be wanting to type (presumably from the history?):
But there seems to be no way to actually accept the suggestion: pressing tab just does the normal PowerShell autocomplete (usually of a cmdlet or path).
What is this feature and can I "tab" to get the command tantilisingly shown?
For me it was Shift + RightArrow.
If you have EditMode VI enabled, then make sure to define whatever key combination you would like to use for this to SelectForwardChar. To set SelectForwardChar to Shift + RightArrow insert the following line of code into your VSCode PowerShell Profile:
Set-PSReadLineKeyHandler -Key Shift+RightArrow -Function SelectForwardChar
The key combination SHIFT + RIGHTARROW should do the trick. I hope this helps!

VSCode Terminal suggestions not autocompleted

VSCode's PowerShell Terminal now offers a kind of suggestion in gray of what you might be wanting to type (presumably from the history?):
But there seems to be no way to actually accept the suggestion: pressing tab just does the normal PowerShell autocomplete (usually of a cmdlet or path).
What is this feature and can I "tab" to get the command tantilisingly shown?
For me it was Shift + RightArrow.
If you have EditMode VI enabled, then make sure to define whatever key combination you would like to use for this to SelectForwardChar. To set SelectForwardChar to Shift + RightArrow insert the following line of code into your VSCode PowerShell Profile:
Set-PSReadLineKeyHandler -Key Shift+RightArrow -Function SelectForwardChar
The key combination SHIFT + RIGHTARROW should do the trick. I hope this helps!

Go to previous command without scrolling through multiline commands in iPython

I have the current newest version of iPython (7.6.1) and when I try to use the up-arrow keys to get to previous commands, when I hit a multiline command, the up-arrow instead slowly goes up through each line instead of going to the previous command. To get to the command before the multiline command, I have to scroll all the way up to the top of the multiline command before I can get to the previous command. Is there another shortcut I can use to skip the multiline command and get the previous one?
At least on a Linux machine, PgUp/PgDn appears to do the trick.
If search for a particular item, partial entry followed by up/dn is nice. For example to find a previous function definition I might do
def^p
The ? help also suggests Ctrl + R for a history search. I haven't used that.
The ipython shortcuts section refers to me to prompt_toolkit, but that gives info on setting things up, not on current options.
In Macbook, you can use:
Fn + Shift + ↑ to go up
Fn + Shift + ↓ to do down

powershell console : any way to recall a command from keyboard shortcut?

I know I can use F7 to display command history and I can search the history to find a command that I've typed before ( like for example :)
Get-History |select -expand commandline |sls proc
but I wonder if the is a way to use a keybord shortcut to cycle through the history (like ctrl+R does on linux console) ?
Tab completion supports searching through memory, you could type:
#proc<TAB>
to cycle through commands that match the string 'proc'. But if you're looking for a more bash like editing experience, then you want PSReadline - https://github.com/lzybkr/PSReadLine.

IPython's history-search-backward not working as desired

IPython's history-search-backward feature is one of my favorite features. history-search-backward allows you to type part of a command and then search backward through your readline history for commands that began with that part of the command. By default (I believe) these are bound to UpArrow or Ctrl+P and DownArrow or Ctrl+N (for backward and forward respectively).
They are not working for me. Instead they just go linearly through my history instead of taking into account the characters I've already typed to (allgedly) filter my history.
I'm running IPython 0.13.2 (with Python 2 and 3) on Arch Linux from within XTerm.
If I hit Escape, Ctrl+P, then UpArrow and DownArrow work exactly as I want them to.
Additionally if I change my ipython_config.py to include
c.TerminalInteractiveShell.readline_parse_and_bind = ['"\\e[B": history-search-forward', '"\\e[A": history-search-backward']
then I can just do Escape UpArrow for the desired behaviour. (Here's the rest of my config file.)
Ctrl+V UpArrow produces ^[[A as I expect. I have the python readline library installed (which seems to fix common problems with macs running IPython).
I have these lines in my .bashrc
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
and they work exactly as I want them to within bash.
I have no idea what else to try next, so I've come here. Please help, I hope I've included enough information and done enough research.
The culprit was set keymap vi set in my .inputrc. I removed that and IPython history went back to what I expected. Thanks to #Thomas K!