Creating a git alias containing bash command substitution and an argument
问题 Got this: git diff $(git status -s | awk 'FNR == $LINE_NUM {print $2}') ...where line number is the file output by status. Now I want to create an alias for this command in .gitconfig : [alias] diff-num = $WHAT_SHOULD_I_PUT_HERE? I want this alias to run git's diff command based on the line number argument I'll type in on the command line. I'm new to bash and I'm not sure if I need a bash function to handle this or how to pass the argument into the substituted command. 回答1: The usual form for