Selection of utilities

cdhist – Linux shell directory history

cdhist extends the shell’s built-in cd command with a history of previously visited directories. It intercepts interactive directory changes and maintains an ordered stack of locations, allowing users to return to earlier directories without remembering or retyping their paths.

The utility presents its history with numeric indices. Index zero represents the current working directory, while successive indices identify earlier locations. Users can select a directory from an interactive prompt, navigate directly by specifying its index, or use an external fuzzy finder to search the recorded paths. The shell integration does not alter the behaviour of cd in scripts or programs launched from the interactive session.

This is free and open source software.

Key Features

  • Maintains an ordered directory history without duplicate entries.
  • Configurable maximum number of recorded directories.
  • Display directory history without activating a selection prompt.
  • Search backwards through recorded paths using text fragments.
  • Integration with fuzzy finders including fzf, skim, television and fzy.
  • Quick navigation between Git worktrees.
  • Configurable automatic removal of obsolete directory entries.
  • Supports an alternative command name rather than replacing cd.
  • Customisable default options for interactive shell sessions.
  • Integration with Bash and Zsh.

Website: github.com/bulletmark/cdhist
Support:
Developer: Mark Blakeney
License: GNU General Public License v3.0

cdhist arguments

cdhist is written in Python. Learn Python with our recommended free books and free tutorials.


Related Software

Shell tools
fzfCommand-line fuzzy finder for your shell
zoxideSmarter cd command, inspired by z and autojump
brootReviewed under our Excellent Utilities series
McFlyAlso reviewed under our Excellent Utilities series
zMaintains a jump-list of the directories you actually use
autojumpOffers a fast way to navigate your filesystem
z.luaHelps you navigate faster by learning your habits
HSTRBash and zsh shell history suggest box
Zsh-zFast directory jumping based on frecency
enhancdNext-generation cd command
fzySimple, fast fuzzy finder for the terminal
NavitaRapid directory traversal
JumpQuick and fuzzy directory jumper
walkSimple and minimalistic terminal navigator
lacycd alternative that makes navigating much more efficient
DF-SHOWDirectory File Show
fzAdds fuzzy search to tab completion of z
paziFast autojump helper
jumperFiles/directories jumper
cdhistLinux shell cd history directory stack
icdShell utility that makes changing directories quicker and more convenient
SDDynamic directory navigation from the command line
DongleMove around deep directory trees
cdwecd with env vars
fastdiractQuick shell navigation and command execution
zmcd for lazy people
slingshotLightweight tool to browse files in the terminal
qcdQuickly change directory
navQuickly navigate through directories
menucdDirectory browser and changer
knNavigate folders quickly
jmpThe superior cd
gumpSmarter cd command

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted