3

With PSReadLine 2.2.0 beta4

Set-PSReadLineOption -PredictionSource History

Set-PSReadLineOption -PredictionViewStyle ListView

powershell can show history like this:

enter image description here

Does Bash or any other Linux shell have this feature?

Gary Allen
  • 385
  • 1
  • 3
  • 11

1 Answers1

0

You can use the history command to see your previous commands. If you want to filter then you can use the grep command, for example

history | grep git

you will get for example :

  207  git push origin init-repo
  226  git status
  227  git add war/src/main/java/com/xxx/Application.java
  228  git status
  229  git fetch
  230  git checkout init-repo
  231  git stash
  232  git stash pop
  233  git add pom.xml
  234  git status
  235  git add *
  236  git add all
  237  git add-all
  238  git --help
  239  git add --all
  240  git stash
  241  git stash pop
  242  git add --all
  243  git pull
  502  history | grep git
[admin@host]$ 
Tim
  • 24
  • 6
  • 3
    How would one use this in such a way that it is able to "run as you type" and provide a selectable list like shown in the screenshot? – J_D Jul 22 '22 at 12:55