2

I'm having trouble adapating to the behaviour of PowerShell tab completion from bash tab completion and wondering if there is a way to change it.

In PowerShell when I press tab it expands to the first available match. You can press Tab again to get to the next result. In bash it expands only as far as the common match. If you press tab again a list of available matches are shown but the command line is not further modified.

The problem I have in PowerShell is that if there are many matches I don't want to tab through them all; it takes too long and I often miss the one I want. I want like in bash where I can keep typing from the common prefix to narrow down the selection.

Is there someway to change this behaviour in PowerShell?

1 Answers1

2

Try PSReadLine:

This module replaces the command line editing experience in PowerShell.exe for versions 3 and up. It provides:

  • Syntax coloring
  • Simple syntax error notification
  • A good multi-line experience (both editing and history)
  • Customizable key bindings
  • Cmd and emacs modes (neither are fully implemented yet, but both are usable)
  • Many configuration options
  • Bash style completion (optional in Cmd mode, default in Emacs mode)
  • Bash/zsh style interactive history search (CTRL-R)
  • Emacs yank/kill ring
  • PowerShell token based "word" movement and kill
  • Undo/redo
  • Automatic saving of history, including sharing history across live sessions
  • "Menu" completion (somewhat like Intellisense, select completion with arrows) via Ctrl+Space
beatcracker
  • 2,712