From 59f8db0d778b36ba2b3dc83dbcc3e8592947ad8f Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 17 Aug 2023 09:42:03 +0200 Subject: clang-format: add "-l" alias for option in "tools/clang-format.sh" --- tools/clang-format.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/clang-format.sh b/tools/clang-format.sh index faf4fdb..1dcc8aa 100755 --- a/tools/clang-format.sh +++ b/tools/clang-format.sh @@ -390,16 +390,16 @@ usage() { printf "Reformat source files using clang-format.\n\n" printf "If no file is given the script runs on the whole codebase.\n" printf "OPTIONS:\n" - printf " -h Print this help message.\n" - printf " -i Reformat files (the default).\n" - printf " -n|--dry-run Only check the files (contrary to \"-i\").\n" - printf " -a|--all Check all files (the default).\n" - printf " -u|--upstream COMMIT Check only files from \`git diff --name-only COMMIT\` (contrary to \"-a\").\n" - printf " This also affects directories given in the [FILE] list, but not files.\n" - printf " If this is the last parameter and COMMIT is unspecified/empty, it defaults to \"main\".\n" - printf " -F|--fast Same as \`-u HEAD^\`.\n" - printf " --show-filenames Only print the filenames that would be checked/formatted\n" - printf " -- Separate options from filenames/directories\n" + printf " -h Print this help message.\n" + printf " -i Reformat files (the default).\n" + printf " -n|--dry-run Only check the files (contrary to \"-i\").\n" + printf " -a|--all Check all files (the default).\n" + printf " -u|--upstream COMMIT Check only files from \`git diff --name-only COMMIT\` (contrary to \"-a\").\n" + printf " This also affects directories given in the [FILE] list, but not files.\n" + printf " If this is the last parameter and COMMIT is unspecified/empty, it defaults to \"main\".\n" + printf " -F|--fast Same as \`-u HEAD^\`.\n" + printf " -l|--show-filenames Only print the filenames that would be checked/formatted\n" + printf " -- Separate options from filenames/directories\n" } ls_files_exist() { @@ -450,7 +450,7 @@ while (( $# )); do usage exit 0 ;; - --show-filenames) + -l|--show-filenames) SHOW_FILENAMES=1 shift continue -- cgit v0.12