Skip to content

README code mixes tabs and spaces in the same block #11193

Description

@Stefan-Heimersheim

Describe the bug

The code below used spaces to indent two of the lines, and tabs for the other 6 lines. This makes indenting inconsistent in settings where tabs are not rendered as 8 spaces.

Affected version

gh version 2.74.2 (2025-06-18)

Steps to reproduce the behavior

See the code block in this README

Expected vs actual behavior

Actual code, highlighting tabs and spaces with respective unicode characters

(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
␉ && sudo mkdir -p -m 755 /etc/apt/keyrings \
␣␣␣␣␣␣␣␣&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
␣␣␣␣␣␣␣␣&& cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
 ␉ && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
 ␉ && sudo mkdir -p -m 755 /etc/apt/sources.list.d \
 ␉ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
 ␉ && sudo apt update \
 ␉ && sudo apt install gh -y

Expected code: Use either tabs or spaces.

(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
	&& sudo mkdir -p -m 755 /etc/apt/keyrings \
	&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
	&& cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
	&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
	&& sudo mkdir -p -m 755 /etc/apt/sources.list.d \
	&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
	&& sudo apt update \
	&& sudo apt install gh -y

Activity

  1. Stefan-Heimersheim commented on Jul 1, 2025

    @Stefan-Heimersheim
    ContributorAuthor

    This is similar to #6456 and #9296. Since I already fixed it locally I went ahead and made a PR in #11194

  2. williammartin commented on Jul 1, 2025

    @williammartin
    Member

    Thanks @Stefan-Heimersheim, totally legit, appreciate the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocshelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions