diff --git a/scripts/wrong-filename.sh b/scripts/wrong-filename.sh index 6cf415d99b..78b0779a3c 100755 --- a/scripts/wrong-filename.sh +++ b/scripts/wrong-filename.sh @@ -17,7 +17,7 @@ set -e # Iterate through all Markdown files in the 'pages' directories find pages* -name '*.md' -type f | while read -r path; do # Extract the expected command name from the filename - COMMAND_NAME_FILE=$(basename "$path" | head -c-4 | sed 's/\.fish//' | sed 's/\.js//' | sed 's/\.1//' | tr '-' ' ' | tr '[:upper:]' '[:lower:]') + COMMAND_NAME_FILE=$(basename "$path" | head -c-4 | sed 's/\.fish//' | sed 's/\.js//' | sed 's/\.1//' | sed 's/\.2//' | sed 's/\.3//' | tr '-' ' ' | tr '[:upper:]' '[:lower:]') # Extract the command name from the first line of the Markdown file COMMAND_NAME_PAGE=$(head -n1 "$path" | tail -c+3 | sed 's/--//' | tr '-' ' ' | tr '[:upper:]' '[:lower:]')