skip to Main Content

I don’t know how I enabled this feature before, but I found it incredibly useful for someone who primarily works in the terminal.

It displays the history of commands based on my inputs, allowing me to select them quickly. Now, I have no way to enable this table again… I’ve already searched on Google for this feature, but I don’t see anyone mentioning it…

enter image description here

2

Answers


  1. using this command in terminal can show you the history of commands

    history
    

    maybe you can find the whole history in your .zsh_history or .bash_history?

    if you can’t display the history of commands by using this command,you may need reset the bash config file.

    like ~/.zshrc includes

    HISTSIZE=1000
    SAVEHIST=2000
    HISTFILE=~/.zsh_history
    

    reload file:

    source ~/.zshrc
    
    Login or Signup to reply.
  2. The screenshot looks like Oh My Posh with PSReadLine installed. You can configure the history and autocompletion in your PowerShell profile (type $profile to show the path, or directly open it with code $profile if you have e.g. VSCode in your $PATH):

    Import-Module PSReadLine
    Set-PSReadLineOption -PredictionSource History
    Set-PSReadLineOption -PredictionViewStyle ListView
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search