5 releases (breaking)

0.5.0 Sep 24, 2023
0.4.0 Aug 19, 2023
0.3.0 Aug 1, 2023
0.2.0 Jul 3, 2023
0.1.0 Jun 30, 2023

#47 in #directories

GPL-3.0-only

30KB
436 lines

cdup

Version Downloads License Coverage report

cdup is a CLI utility to ascend directories by count. It currently ships with integrations for the following shells:

  • bash
  • fish
  • powershell
  • zsh

Installation

You can install cdup by building it with cargo. Run the following command:

cargo install --target-dir ~/.local cdup

This will create a binary in ~/.local/bin/cdup.

Usage

To get the run shell-specific instructions, use the following command:

cdup init

That will print instructions on how to add the up integration function to your shell.

Afterward, you can call up with a number to ascend the desired number of directories. Here's an example:

$ pwd
/home/rsprta/git/cdup
$ up
$ pwd
/home/rsprta/git
$ up rs
$ pwd
/home/rsprta
$ up 2
$ pwd
/

Acknowledgements

  • cdup uses the excellent clap library to create the command-line interface.
  • The terminal animation was created with Asciinema and svg-term-cli.

License

GNU General Public License v3.0

Dependencies

~1.2–1.8MB
~35K SLoC