A better pwd with clipboard support and targeting
- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| src | ||
| .bwd-root | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| context7.json | ||
| INSTALLATION.md | ||
| LICENSE | ||
| README.md | ||
| release.toml | ||
bpwd
A better pwd with clipboard support and targeting.
Installation
Homebrew (macOS/Linux)
brew install CodeTease/tap/bwd
Scoop (Windows)
scoop bucket add codetease https://github.com/CodeTease/scoop-bucket
scoop install bwd
Cargo
cargo install bpwd
Release
You can also download the binary from the Release page.
For more download methods, see INSTALLATION.md.
Usage
bwd [target] [-c] [-s] [-j] [-r]
target: Optional path to resolve relative to current directory. Use--to separate flags from arguments (e.g.,bwd -- -my-dir).-c: Copy the result to clipboard.-s: Shorten path (replace home directory with$HOMEor%USERPROFILE%).-j: Output path information as JSON.-r: Print path relative to project root (searches for.gitor.bwd-root).
Examples
Standard Output (Absolute Path)
$ bwd
/home/codetease/projects/bpwd
Shortened Path (-s)
$ bwd -s
$HOME/projects/bpwd
JSON Output (-j)
$ bwd -j
{"path":"/home/codetease/projects/bpwd","short":"$HOME/projects/bpwd","root":"."}
Priority Logic
- JSON (
-j): Always outputs the JSON object. - Short (
-s): If JSON is not requested, outputs the shortened path. - Default: Outputs the absolute path.