PitchHut
Log in / Sign up
cd-nearest
5 views
Navigate your directories with effortless precision.
Pitch

Revisit your most accessed directories without the hassle of typing long paths. With c, simply enter a few characters to quickly switch to a recent location. This Windows-specific tool remembers your path history, streamlining your workflow. Experience the convenience of nostalgic directory navigation with modern efficiency.

Description

The cd-nearest command-line tool simplifies navigation between recently accessed directories, offering quick access without needing to remember full paths. Designed for Windows users, this utility allows you to jump to a directory using just a few characters, reminiscent of the classic Norton CD command from MS-DOS.

Features

  • Efficient Directory Navigation: Maintains a list of recently accessed directories, allowing you to use abbreviations to quickly navigate back to them.
  • User-Friendly Command: Use the simple command format like c su after the first full path entry. The command c can be renamed if desired, ensuring flexibility for your workflow.
  • Custom Directory Management: Automatically keeps track of visited paths in a CSV file located in your Documents directory, making it easy to edit or manage as needed.

Running the Tool

Initially, specify the full path to your desired directory:

c \MyProjects\FirstProject\Subdirectory

Subsequently, simply type a short form like c su to return directly to your recent destination, saving time and effort.

Development

This project is built on the best practices of directory management and inspired by a nostalgic command-line experience. The original implementation was developed in Python, showcasing the practicality and efficiency of this tool, while contributions for shell scripts across different operating systems are encouraged.

Code Example

Here's how you can implement the script in Python:

import os
import sys
import csv

def read_directory_list(file_path):
    if not os.path.exists(file_path):
        with open(file_path, 'w') as f:
            pass
        return []
    with open(file_path, 'r') as f:
        reader = csv.reader(f)
        return [row[0] for row in reader]

# And much more functionality as outlined in the README...

This snippet demonstrates reading previously visited directories and lays the foundations for keeping your navigation seamless.

Participate

Contributors are welcome to extend functionality with shell scripts for other operating systems or improve upon the existing features. Join the development and enhance this handy tool for all command-line enthusiasts!