From 2e03d0a6b1f7d1dea3fcbdd0ff39326bf0524092 Mon Sep 17 00:00:00 2001 From: Bolun Thompson Date: Thu, 23 Jan 2025 00:19:55 +0000 Subject: [PATCH 1/2] Fix arrays in bash expansion Can't actually be passed in as an argument except for variables, which are unsafe anyways. --- sh_expand/bash_expand.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/sh_expand/bash_expand.py b/sh_expand/bash_expand.py index ec05efd..b849a95 100644 --- a/sh_expand/bash_expand.py +++ b/sh_expand/bash_expand.py @@ -130,8 +130,6 @@ def should_expand_var(word: list[CArgChar]) -> bool: raise ImpureExpansion("Potential dangerous tilde expansion:", carg) if pair in {"<(", ">(", "$("}: raise ImpureExpansion("Potential process substitution", carg) - if char == "(": - raise ImpureExpansion("Potential array", carg) if char == "$": seen_dollar_sign = True if char in need_to_expand_chars: From 561160811194e677f2bbc3e2c57d646c37e78dae Mon Sep 17 00:00:00 2001 From: Bolun Thompson Date: Thu, 23 Jan 2025 00:24:17 +0000 Subject: [PATCH 2/2] Inc version --- pyproject.toml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b9ebb2f..e963c8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "sh-expand" -version = "0.2.0" +version = "0.2.1" authors = [ { name="Michael Greenberg", email="michael@greenberg.science" }, { name="Konstantinos Kallas", email="konstantinos.kallas@hotmail.com" }, diff --git a/setup.py b/setup.py index 1e45287..63e798b 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ long_description = (Path(__file__).parent / "README.md").read_text() setup(name='sh-expand', - version='0.2.0', + version='0.2.1', packages=['sh_expand'], ## Necessary for the markdown to be properly rendered long_description=long_description,