A dead simple command that lets you run other commands in a different directory.
This saves you the trouble of having to cd all over the place.
Here's a short example:
cdo path/to/some/dir my-command arg0 arg1 --flag --other-flagThis will run my-command arg0 arg1 --flag --other-flag in the
path/to/some/dir directory.
For this, you'll need rust installed. See https://rustup.rs/.
-
Clone this repository
git clone https://github.com/dotboris/cdo cd cdo -
Install the binary onto your system
cargo install --path . -
If it's not already done, add the cargo bin directory (
$HOME/.cargo/bin) to yourPATHenvironment variable.This will vary depending on your operating system shell and system configuration.
-
Verify that
cdois installed correctlycdo --help
This uses the Nix Flakes system. You'll need to have that enabled.
-
Install
cdo# Install in profile nix profile install github:dotboris/cdo # Run in an ephemeral shell nix shell github:dotboris/cdo
There are many options for installing and using package in nix, this is a sampling of common methods.
-
Verify that
cdois installed correctlycdo --help