Repository navigation
Update dependency shfmt to v3.15.0 - #9
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/shfmt-3.x
branch
from
October 21, 2024 05:26
9f0aa46 to
14483db
Compare
renovate
Bot
force-pushed
the
renovate/shfmt-3.x
branch
from
March 7, 2025 00:20
14483db to
d9e2335
Compare
renovate
Bot
force-pushed
the
renovate/shfmt-3.x
branch
from
July 19, 2025 16:10
d9e2335 to
74408ed
Compare
renovate
Bot
force-pushed
the
renovate/shfmt-3.x
branch
from
March 14, 2026 09:49
74408ed to
15855ba
Compare
renovate
Bot
force-pushed
the
renovate/shfmt-3.x
branch
from
April 15, 2026 12:53
15855ba to
c7aa456
Compare
renovate
Bot
force-pushed
the
renovate/shfmt-3.x
branch
from
August 29, 2026 06:45
c7aa456 to
b287484
Compare
renovate
Bot
force-pushed
the
renovate/shfmt-3.x
branch
from
September 6, 2026 19:59
b287484 to
5a247ad
Compare
renovate
Bot
force-pushed
the
renovate/shfmt-3.x
branch
from
December 5, 2026 17:21
5a247ad to
315ec85
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.8.0→3.15.0Release Notes
mvdan/sh (shfmt)
v3.15.0Compare Source
This release brings the interpreter much closer to Bash and hardens it
against untrusted scripts, so that it fails gracefully rather than
crashing or exhausting memory.
Some of these interpreter fixes may break existing scripts run with
interpor
gosh, as they now behave like Bash:The last command of a pipeline runs in a subshell, so
cmd | read xnolonger sets
xunless thelastpipeoption is set.Unquoted backslashes are removed from assignment values, redirection
targets, case words, and here-strings, as they already were from command
arguments. For example,
x=C:\dirnow assignsC:dir. Quote Windowspaths, as in
x='C:\dir', or use forward slashes.cmd/shfmt
-bl, --block-next-lineandblock_next_lineto place{,then, anddoon their own lines - #721$XDG_CONFIG_HOME/shfmt/editorconfig, and acceptcase_indentandlanguage_dialectas properties - #1402syntax
BlockNextLine, deprecatingFunctionNextLine- #721Redirect.ClosePos, and end heredocs at EOF like Bash, dash, and Zsh - #1428DeclClause.Assigns- #1327CaseItem.Lparen- #1194SplitBraces, and track positions viaBraceExp.LbraceandBraceExp.Rbrace- #1435BinaryNextLineto binary test and arithmetic expressions - #813thenanddoon their own line after multi-line conditions - #1210main "$@"; exit $?on the same line - #564, #679[[ ]]or after escaped newlines - #619, #844, #1290, #1447, #1449a[i]- #1013[[,select, andfunctionwithLangPOSIX- #1092StmtsSeq,InteractiveSeq,Walk, and with heredocs in backquotes, and limit nesting to 10000 levels to avoid stack overflows - #1448, #1458, #1459TryClause,RepeatClause,CallArithm,WordIter.Names,FuncDecl.Args, andParamExp.Subscripts- #1211, #1294, #1297, #1335, #1361, #1438{echo foo}, glob groups in case patterns, and subscripts as words - #1203, #1233, #1295, #1342, #1441syntax/typedjson
shell
Splitto split a command line into words without expanding them, andJointo quote words back into oneMatchto match a string against a pattern likecaseand[[ ]]doGlobto expand patterns over anfs.FSlike Bash, with**and brace expansioninterp
Runner.WaitBackgroundto wait for all background jobs - #1431BackgroundContextso that background jobs can outlive eachRuncall - #1440ProcSubstHandlerto customize process substitutionsExitandFatalso that exec handlers can exit the shellWithHandlerContextto call the interpreter back from handlersjobs,kill,disown, andumaskbuiltins minimally, and expand$!to a real PID where possible - #1401, #1411, #1440read -d,-n, and-N,shopt -q, and thelastpipeoption - #551xtrace- #753Dirafter a reset change directory likecd- #1125evalto 1000 levelsexpand
AssignValueto expand tildes after colons in assignments - #1451Config, fixing races between concurrent calls${var@op}, and anchored replacements like Bash - #1081, #1442$'\cX'control-character escapes - #1450set -u,read, and brace expansionpattern
fileutil
env -Sshebangs inShebang- #1465v3.14.1Compare Source
<<-heredoc bodies rather than replacing them with spaces<<-ones, whose output no longer parsed$#"$foo"and$+"$foo"- #1405\*act as glob metacharacters@(aas literals, avoiding a panicv3.14.0Compare Source
This release drops support for Go 1.25 and includes many enhancements,
particularly in the interpreter, which implements more shell features
and fixes many divergences from Bash.
--detectto find shell files by executable bit or shebang - #944Preorder, an iterator over all nodes, complementingWalkencoding.TextUnmarshalerimplementations for each operator type${ foo;}and${|foo;}inside double quotes - #1368{varname}redirects, likeexec {fds[3]}>&-- #719${args[cmd,#]}- #1285#as the start of a comment inside[[ ]]tests - #1326thenordowith a semicolon when heredocs are pending - #1047!in arithmetic expressions, avoiding history expansion - #987SplitBracesreject malformed sequences and skip backslash escapes - #1330${=name},${~name}, and${^name}prefixes - #1238;|case terminator and leading parentheses for globs - #1293, #1279[globs in arrays - #1278, #1322">>", rather than integers - #1321BashOptsto set Bash options likeshopt- #962AccessHandlerto control file access checks, used by-randcd- #1318HandlerContext.LastExitStatus, and provide aHandlerContextto stat handlershelpandtimesbuiltins, as well as$-- #1398;∧;&case terminators - #1391-Ntest operator, and make-ntand-otfollow POSIX - #1340a=([5]=x)- #1373execfails withENOEXEC- #1065js/wasm, where subprocesses and pipes are unavailableexecwith no argumentsRunBracesSeqwith a config and error reporting, deprecatingBracesVariable.Indexesto describe sparse indexed arrays&&and||operators - #1371"${a[@]%o}"- #1081${!arr[@]}consistent with the quoted form - #672[as a literal character, like Bash - #1372[![:space:]]dashshebangs as POSIX shell for-ln=auto- #1307v3.13.1Compare Source
[[zsh]]in EditorConfig files.zshrcand.bash_profile--apply-ignorewhen used with explicit args - #1310;;with the previous line when formatting - #1289$1[foo]was parsed as a subscript in Zsh - #1288$!in double quotes in Zsh - #1298namerefvariablesv3.13.0Compare Source
This release introduces support for Zsh
in the parser and formatter, which was tracked in issue #120
alongside the label https://github.com/mvdan/sh/labels/zsh.
While support is not complete, it should be far enough for many use cases.
This release also drops support for Go 1.24 and includes many other enhancements:
-lprints any filenamesshfmt -versionis now derived from the git current tag, dropping the-ldflagsworkaroundLangZshLangVariantis now a bitset, allowing the use of sets like "Bash-like"InteractiveSeqandStmtsSeqiterator methods forParserPrintervia struct embeddingdeclare {a,b}_c=valueshopt -s dotglobandshopt -s extglob!(expr)extended glob patternsdeclare,type,readConfig.DotGlobandConfig.ExtGlobfor the interpreterVariable.Flagsto get the one-characterdeclareflagsGlobLeadingDotandExtendedOperatorsfor the interpreterNegExtGlobErrorto mark the use of!(expr)negation patternsv3.12.0Compare Source
mvdan-shJS package is discontinued in favor ofsh-syntax- #1145--writeto replace non-regular files - #843IsBuiltinto check if a command name is a shell built-in - #1164HandlerContext.Builtinto allowExecHandlerFuncto call built-ins$!andwait PID- #221ExecHandlerFuncerrors via theRunner.RunAPIHandlerContext.Posto provide handlers with source positionsNewExitStatusandIsExitStatusin favor ofExitStatuswaitto always return the status of the last given job$RANDOMand$SRANDOM$BASH_REMATCHwhen matching regular expressions via=~Bracesmode; usesyntax.SplitBracesinstead**to only act as "globstar" when alone as a path element - #1149*and**to not match leading dots in basenamesNoGlobStarmode to match the POSIX semanticsv3.11.0Compare Source
This release drops support for Go 1.22 and includes many enhancements.
-l=0and-f=0to split filenames with null bytes - #1096Parser.WordsSeqParser.IncompleteandIsIncompleteto work well withParser.Words- #937RecoverErrorsLangErrorto include which language was used when parsingtestread/write/exec operators to work correctly on directories - #1116cancelreaderdependency withos.File.SetReadDeadlineOpenHandlerwhen opening named pipes for process substitutions - #1120TMPDIRif set viaEnvto create temporary files such as named pipesFieldsSeqUnsetkind with a newVariable.Setboolean fieldv3.10.0Compare Source
--filenameout of the parser options category - #1079v3.9.0which broke redirecting files to stdin - #1099v3.9.0whereHandlerContext.Stdinwas never nilInteractiveoption to be used by interactive shells - #1100<&-v3.9.0Compare Source
This release drops support for Go 1.21 and includes many fixes.
os.Pipefor stdin to prevent draining by subprocesses - #1085nocaseglobbash option - #1073@kparameter expansion operatortest -Oandtest -Goperators on non-Windows - #1080read -sbuiltin flag - #1063A special thanks to @theclapp for their contributors to this release!
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.