16 lines
371 B
Shell
Executable file
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" "$@"
|