bin: carg
This commit is contained in:
parent
45f8f60599
commit
e072fa3b77
1 changed files with 16 additions and 0 deletions
16
bin/carg
Executable file
16
bin/carg
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/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" "$@"
|
||||
Loading…
Reference in a new issue