Skip to content

Commit

Permalink
improve qemu regex readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Moomboh committed May 16, 2023
1 parent 7bf9e76 commit 71a3b72
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/shellingham/posix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,33 @@
from .._core import SHELL_NAMES, ShellDetectionFailure
from . import proc, ps

# Based on QEMU docs: https://www.qemu.org/docs/master/user/main.html
QEMU_BIN_REGEX = re.compile(
r"qemu-(alpha|armeb|arm|m68k|cris|i386|x86_64|microblaze|mips|mipsel|mips64|mips64el|mipsn32|mipsn32el|nios2|ppc64|ppc|sh4eb|sh4|sparc|sparc32plus|sparc64)"
r"""qemu-
(alpha
|armeb
|arm
|m68k
|cris
|i386
|x86_64
|microblaze
|mips
|mipsel
|mips64
|mips64el
|mipsn32
|mipsn32el
|nios2
|ppc64
|ppc
|sh4eb
|sh4
|sparc
|sparc32plus
|sparc64
)""",
re.VERBOSE,
)


Expand Down

0 comments on commit 71a3b72

Please sign in to comment.