Giter VIP home page Giter VIP logo

cdl's Introduction

cdl

This project is a small remake in C of a bash script that i very frequently use. I just wanted to make this a bit more stable and easier to install and thus converted it into a C program with makefile and an install script.

What is this?

It is a very simple command to just save directory paths and quickly switch between them. I use this very often since i got bothered by constantly typing cd ../../../../folder and such. For example, you have the following folder structure:

~/Documents
│
├── work
│   │
│   ├── projectA
│   │   ├── src
│   │   └── docs
│   │
│   └── projectB
│       └── src
│
└── personal
    └── cool_project
        ├── src
        └── docs

in this situation if you want to navigate from ~/Documents/work/projectA/src to your personal project, you would either have to do cd ~/Documents/personal/cool_project or cd ../../../personal/cool_project what this tool allows is for you to be in ~/Documents/personal/cool_project and do cds cool_project and later once you want to navigate to it from anywhere, you can do cdl cool_project instead.

Requirements

  • gcc compiler

How to install

To start the installation script just run the following command as root (for bin access)

bash <(curl -s https://raw.githubusercontent.com/meir/cdl/main/install.sh)

To uninstall you can use the same script and add uninstall after it.

Nix Flakes

A Nix Flake is provided that you can install, after it is installed you can add source $(which cdl-alias) in your bash/sh/zsh/fish profile to load in the cdl alias properly.

How to use

This project has a few commands, they're simple CRUD commands to change the cache file.

command usage description
cdl cdl (name) change directory to last or (name)
cds cds (name) save directory path on last or (name)
cdls cdls list all saved name + directory paths
cdr cdr (name) remove directory path from cache by last or (name)
cdp cdp (name) print directory path saved in last or (name)
cdc cdc clear non existent paths from cd list

cdl's People

Contributors

meir avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.