Watch
1
0
Fork
You've already forked dotfiles
0
dotfiles/bin/carg
2026-06-04 09:42:35 -04:00

16 lines
371 B
Shell
Executable file

#!/usr/bin/env bash
# This program should be installed as `carg`. It fixes typos like
#
# carg oc -> cargo c
# carg obuild -> cargo build
#
# It unconditionally removes one leading `o` from its first argument and then
# runs the corrected `cargo` subcommand with the rest of the arguments.
set -euo pipefail
sub="$1"; shift;
sub="${sub#o}"
exec cargo "$sub" "$@"