Bash - a stylish Powershell escape-underline

In bash, I often use the underline highlight shortcut:

subl somedir/file.sh
./(escape underscore)

Fills the last item from the last line, for example:

./(escape underscore)

It becomes:

./somedir/file.sh

Is there any way to set this in powershell?

(I am using Powershell 5.1, ConEmu and PSReadLine and PCSX)

+4
source share
3 answers

If you use Emacs mode with PSReadline, then Escunderscore does the right thing. Alt+ .also does the same and is connected in both Emacs and Windows modes.

+1
source

I don't know a similar function in Powershell (maybe just create one yourself), but you can go with an array. For instance:

(Get-Childitem somedir)[-1]

, , , , .

0

- Select-Object:

:

Get-ChildItem | Select-Object -Last 1

:

ls | select -l 1 
0

Source: https://habr.com/ru/post/1653019/


All Articles