Skip to content

Releases: zawwz/lxsh

v1.5

04 May 13:49
Compare
Choose a tag to compare

Source map support, improvements, and many fixes.

Added features:

  • Options --map and --apply-map for generating and using source maps
  • Debashify brace expansions
  • Option --lxsh to force lxsh parsing

Improvements:

  • better minify of single-blocks

Bugfixes:

  • incorrect parsing of nested arithmetic
  • incorrect parsing of # in middle of argument
  • missing % arithmetic operator
  • subshell containing backslash incorrectly minified as backticks
  • incorrect parse of heredocuments on broken lists
  • incorrect parsing of bash array assign
  • segfault on empty array create when debashifying
  • quote-only argument gets emptied
  • %include broken on empty files
  • segfault on exec failure
  • incorrectly escaped dollasign on manipulation
  • parsing error on procsub redirect on block
  • parse error on sequential braces

v1.4

29 Oct 11:43
Compare
Choose a tag to compare

Extend minify feature and bugfixes

Improvements:

  • -m can now reduce subshells to backticks
  • -m can now dequote variable assigns
  • -m can now minify escaped dollarsigns

Bugfix:

  • backtick parsing broken
  • IFS missing from reserved variables
  • quote minify applies in heredocuments

v1.3.1

08 Oct 16:25
Compare
Choose a tag to compare

Major performance improvement

Improvements:

  • Major performance improvement on minifying features

Bugfix:

  • heredocuments generate extra newline

v1.3.0

14 Aug 12:05
76779cd
Compare
Choose a tag to compare

Many bugfixes and improvements to minify and debashify.

Added features:

  • option --bash for forcing bash parsing
  • can now parse pre-command assigns on cmdvar
  • added bash completion
  • can now debashify substring manipulations (${VAR:a:b})
  • can now debashify replace manipulation (${VAR/s/a/b/})
  • can now debashify variable manipulations (${!VAR})

Removal:

  • remove unused -e option on %include
  • removed option --minify-quotes (now integrated into regular minify)

Improvements:

  • minify will now reduce single-command braces and subshells
  • minify will now remove empty variable manipulations
  • improve minify on redirect-only commands
  • improve function minify on large sets
  • small performance optimization on parse

Bugfix:

  • segfault and infinite loops on parsing errors
  • incorrect "unexpected token" parsing error on heredocument
  • filename reference lost on parsing heredocument
  • parsing errors on heredocument don't abort execution
  • link commands resolved to strings not escaping correctly (quoted and non-quoted)
  • incorrect debashified echo in combined string and variable
  • interactive stdin on live-execution doesn't work
  • processing not applied on heredocument contents (variables etc)
  • missing escapes on quote minify
  • minify on empty case creating incorrect syntax
  • parsing escaped subshells on heredocuments can sometimes cause issues
  • quote minify doesn't escape parentheses
  • deletion of unused variables or readonly statements can cause some empty clauses
  • var and fct minify collisions with reserved words
  • minify quotes applying on heredocuments
  • fixed debashifying of bashtest regex ([[ =~ ]])
  • fixed debashifying applying on ${VAR:-val}
  • fixed parsing of for in with no value

v1.2.0

11 Jun 12:34
3429a39
Compare
Choose a tag to compare

Version 1.2.0

added features:

  • new string processor feature (singlequote strings)
  • added string processor: LXSH_STRING_PARSE
  • list all parsing errors instead of just the first
  • can now parse here documents placed in the middle of a line

removal:

  • removed -J option from release builds

improvements:

  • case minify is now more efficient
  • error logs are now colored
  • improved reliability of echo debashifying

internal:

  • implemented parsing context (possible parallel parsing)

bugfix:

  • quote minify not escaping redirect operators
  • incorrect parsing on compated case

v1.1.0

02 Apr 16:55
Compare
Choose a tag to compare

Breaking changes:

  • renamed minimize to minify

New features:

  • --minify-quotes to remove unnecessary quotes
  • lxsh extension commands. See --help-extend-fcts for details
  • --debashify can now debashify $RANDOM

Optimizations:

  • direct execution now parses and executes line-by-line instead of waiting for the full file parse

Bugfix:

  • list options have unwanted behavior when combining with other operations
  • incorrect parsing behavior on escaped backticks
  • escaped newlines not parsed correctly
  • minify on commands finishing with escaped spaces remove said space
  • argument -- is interpreted as a file

v1.0.0

28 Feb 14:47
Compare
Choose a tag to compare

Major release implementing big functionnalities:

  • Now fully POSIX compilant (was missing arithmetic and backtick parsing)
  • Bash support
  • Debashifying

There is no breaking change from v0.2 to this version


Full details:

Added:

  • implemented parsing and processing of arithmetics ( $(()) )
  • implemented parsing of backticks
  • implemented bash specific parsing
    • combined redirects (&>)
    • process substitution (<())
    • herestring (<<<)
    • array set (var=() and var[]=)
    • append operator (var+=)
    • bashtest ([[ ]])
    • array get (${var[]})
    • variable fetching (${!var})
  • added option --debashify
    • combined redirects (&>)
    • process substitution (<())
    • herestring (<<<)
    • bashtest ([[ ]])
    • indexed arrays and associative arrays
  • added option --no-shebang
  • added option --json
  • export/read/local/etc arguments are parsed as variables

bugfixes:

  • segfault on empty redirect-only commands
  • parsing errors not thrown in specific situations
  • parsing error on empty variable value
  • missing processing inside variable manipulations
  • shebang not resolved correctly on /bin/env
  • removal of redirects on empty commands has undesired effect
  • command getopts not parsed for variables

internal changes:

  • implemented arithmetic structure
  • implemented variable structure
  • changed export/read/local commands to have variable structure
  • CLI options are now all processed before parsing anything
  • added a json generator for debugging purposes

v0.2.1

11 Dec 13:01
Compare
Choose a tag to compare

This release fixes a bash related bug

Bugfixes:

  • fix collision on unset when minimizing functions (bash specific)

v0.2

27 Nov 10:48
Compare
Choose a tag to compare

This release extends on functionality that was considered incomplete

Additions:

  • Redirects are now parsed and minimized
  • Added --unset-var option
  • Added --no-exclude-reserved option
  • Added --list-var-def and --list-var-call options
  • Extended --remove-unused to now remove unused variables and remove recursively

Optimizations:

  • Optimized variable processing on export/local/unset/read commands
  • Optimized consecutive calls on variable/function operations

Bugfixes:

  • Fixed bug regarding << inputs being parsed as code

v0.1

14 Nov 17:41
Compare
Choose a tag to compare

First lxsh release