How to Interactively Retrieve Terminal History

his is a command history utility with icons and colors that works on Windows and GNU/Linux.

📦 Dependencies

🪟 Windows

Fonts
Git

GCC or Clang

PDCurses

🐂 GNU/Linux

Fonts
Git

GCC or Clang

NCurses
CMake

Example…


This content originally appeared on DEV Community and was authored by Marcos Oliveira

his is a command history utility with icons and colors that works on Windows and GNU/Linux.

📦 Dependencies

🪟 Windows

🐂 GNU/Linux

Example using APT:

sudo apt install build-essential cmake libncurses-dev git

The fonts need to be installed manually as per the link above.

🚧 Build

🪟 Windows

PowerShell

git clone https://github.com/terroo/his
Set-Location his
g++ -I C:\mingw64\include main.cpp his.cpp C:\mingw64\lib\pdcurses.a -o his
New-Item -Path "C:\His\bin" -ItemType Directory
Move-Item .\his.exe -Destination "C:\His\bin\"

You can now exit the cloned directory and remove it.

Create an environment variable for your user

[System.Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\His\bin", [System.EnvironmentVariableTarget]::User)

Close and open the terminal and test: his --version

🐂 GNU/Linux

git clone https://github.com/terroo/his
cd his
cmake . -B build
cmake --build build
sudo cmake --install build

You can now exit the cloned directory and remove it: cd .. && rm -rf his/. And test: his --version

💼 Usage

After SELECTING the top command, press ENTER to run it via his

his --help

Usage:
his [options]

Options:
  --match-start,   -m  Match only the exact command.
  --no-show-icons, -n  No displays icons.
  --help,          -h  Show this message.
  --version,       -v  Show version info.

🏃 Running

🐂 On GNU/Linux

🪟 On Windows

📹 Video tutorial showing step by step how the his command was made.

https://youtu.be/gILIsK3MiGQ


This content originally appeared on DEV Community and was authored by Marcos Oliveira


Print Share Comment Cite Upload Translate Updates
APA

Marcos Oliveira | Sciencx (2025-07-21T00:45:49+00:00) How to Interactively Retrieve Terminal History. Retrieved from https://www.scien.cx/2025/07/21/how-to-interactively-retrieve-terminal-history/

MLA
" » How to Interactively Retrieve Terminal History." Marcos Oliveira | Sciencx - Monday July 21, 2025, https://www.scien.cx/2025/07/21/how-to-interactively-retrieve-terminal-history/
HARVARD
Marcos Oliveira | Sciencx Monday July 21, 2025 » How to Interactively Retrieve Terminal History., viewed ,<https://www.scien.cx/2025/07/21/how-to-interactively-retrieve-terminal-history/>
VANCOUVER
Marcos Oliveira | Sciencx - » How to Interactively Retrieve Terminal History. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/07/21/how-to-interactively-retrieve-terminal-history/
CHICAGO
" » How to Interactively Retrieve Terminal History." Marcos Oliveira | Sciencx - Accessed . https://www.scien.cx/2025/07/21/how-to-interactively-retrieve-terminal-history/
IEEE
" » How to Interactively Retrieve Terminal History." Marcos Oliveira | Sciencx [Online]. Available: https://www.scien.cx/2025/07/21/how-to-interactively-retrieve-terminal-history/. [Accessed: ]
rf:citation
» How to Interactively Retrieve Terminal History | Marcos Oliveira | Sciencx | https://www.scien.cx/2025/07/21/how-to-interactively-retrieve-terminal-history/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.