Open wada811 opened 5 years ago
コマンドラインで git を使っていると git git と打ち込んでいてエラーになる。 エラーにならずに実行したい。
git git
shift
git
$@
function drop_git(){ if (( $# > 0 )); then while [[ "$1" == "git" ]] do shift 1 done \git "$@" else \git fi } alias git="drop_git"
let
(( ))
Why
コマンドラインで git を使っていると
git git
と打ち込んでいてエラーになる。 エラーにならずに実行したい。What
shift
する。git
コマンドに全引数$@
を渡して実行する。How
Ref
let
を(( ))
に変更