Skip to content

Releases: mitchpaulus/mshell

v0.13.0

07 Apr 13:53

Choose a tag to compare

v0.13.0 - 2026-04-07

Added

  • match ... end pattern matching syntax with value matching, type matching, _ wildcard, maybe destructuring (just v/none), list destructuring ([a b ...rest]), and dict destructuring ({ 'key': v })
  • map on dictionaries (maps over values, preserving keys)
  • Functions
    • filter builtin now supports dictionaries, filtering by value while preserving keys
    • cdh
    • cdp
    • fromUnixTimeMicro
    • fromUnixTimeMilli
    • fromUnixTimeNano
    • prompt
    • toUnixTimeMicro
    • toUnixTimeMilli
    • toUnixTimeNano
    • toSvgPathStr
    • unlinesCrLf
    • scaleLinear
  • Explicit version syntax (example: VER "v0.13.0") and execution. You can now specify the exact version a script should run with and this will force the execution to use that interpreter and corresponding standard library.
  • Multiple cut/copy selections in file manager.

Fixed

  • CLI interactive command execution now switches to a fresh output line before parsing/evaluation, so lexer/parser errors do not render on the prompt line.
  • Lexer ERROR tokens now stop parsing immediately (including simple CLI parsing), preventing fall through to evaluation errors like unimplemented ERROR token handling.

Changed

  • Startup now loads both std.msh and init.msh from version directories (msh/<version>/...), keeps init.msh optional for implicit current-version startup unless MSHINIT is set, requires it for VER scripts, re-execs VER scripts with msh-<version> when needed, and ignores MSHSTDLIB/MSHINIT for VER scripts.
  • cartesian type signature changed. Now is [[a]] [a] -- [[a]]. This make it easy to chain more than one Cartesian product. Usually start the chain off with empty [[]] as an identity element.

What's Changed

Full Changelog: v0.12.0...v0.13.0

v0.12.0

19 Feb 20:00
cd925da

Choose a tag to compare

Version bump for release (#160)

v0.11.0

18 Feb 22:58

Choose a tag to compare

0.11.0 - 2026-02-18

Added

  • completionDefs builtin: pushes a dictionary of completion definitions, keyed by command name with quotation values
  • mshFileManager builtin: pops a starting directory from the stack, opens the file manager, and cds to the final directory on exit
  • msh fm now accepts an optional starting directory argument
  • Built-in file manager via msh fm subcommand and Ctrl-O in interactive mode
    • Dual-pane layout with directory listing and file/directory preview
    • Vim-style navigation (j/k, h/l, gg/G, Ctrl-u/Ctrl-d)
    • Search with /, case-insensitive match highlighting, n/N to cycle matches
    • Rename with r, cursor positioned before extension, Ctrl-W word delete
    • Bookmarks with m + char to set, ; + char to jump
    • Editor integration with e (uses $EDITOR)
    • Directory change on quit (Ctrl-O returns to shell in new directory)
    • Version-sorted entries, directories first and colored blue
    • Binary file detection for preview
    • Preview caching for fast scrolling
    • Cut/copy/paste buffer (d cut, yy copy, p paste, c clear) shared across instances
    • Delete to trash (x) with confirmation, using platform-native trash
    • msh fm prints final directory to stdout for cd "$(msh fm)" usage

What's Changed

Full Changelog: v0.10.0...v0.11.0

v0.10.0

13 Feb 16:56

Choose a tag to compare

0.10.0 - 2026-02-13

Added

  • Tail-call optimization (TCO) for recursive definitions in tail position.
  • Functions
    • sin
    • cos
    • tan
    • arctan
    • ln
    • ln2
    • ln10
    • pow
    • random
    • randomFixed
    • randomNorm
    • sqrt
    • randomTri
    • tempFileExt
  • CLI Alt-D inserts the current date as YYYY-MM-DD

Fixed

  • Windows CMD.EXE /C quoting now handles quoted commands with extra arguments (e.g., npm.cmd paths with spaces).

Changed

  • Builds/releases now are pure Go, built with CGO_ENABLED=0.

What's Changed

Full Changelog: v0.9.0...v0.10.0

v0.9.0

27 Jan 14:27
ff03e4a

Choose a tag to compare

0.9.0 - 2026-01-27

Added

  • Prefix quote syntax (functionName. ... end) as an alternative to (...) functionName
  • <> operator for in-place file modification. Reads file to stdin, writes stdout back on success.
    Example: [sort -u] `file.txt` <> !
  • Functions
    • chomp
    • cstToUtc
    • fromOleDate
    • toOleDate
    • __gitCompletion
    • __sshCompletion
    • strCmp
    • strEscape
    • reSplit
    • linearSearch
  • Function definition metadata dictionaries in def signatures
  • Definition-based CLI completions via the complete metadata key
  • CLI completions for:
    • msh
    • git
    • fd
    • rg
    • ssh
  • CLI history prefix search on Ctrl-N/Ctrl-P (case-insensitive)
  • Alt-. to cycle last argument from history in the CLI
  • Bin map file and msh bin CLI commands for binary overrides
  • msh completions subcommand for bash, fish, nushell, and elvish
  • CLI syntax highlighting for environment variables
  • GitHub Action for installing mshell in CI workflows
  • Append stderr redirection with 2>>
  • Combined stdout/stderr redirection with &> (truncate) and &>> (append)
  • Same-path detection when using > and 2> with identical paths (shares single file descriptor)
  • Full stderr redirection support for quotations (2>, 2>>, &>, &>>)
  • Null byte validation for redirection file paths and cp/mv commands

Fixed

  • CLI binary mode now converts literal redirect targets (e.g., cmd > file.txt converts file.txt to a string for stdout, path for stdin)
  • CTRL-C now only kills the running subprocess instead of both the subprocess and the shell

Changed

  • Breaking change: @name now only reads mshell variables and no longer falls back to environment variables; use $NAME for environment access.
  • w/we now accept binary input and write raw bytes to stdout/stderr.
  • Renamed .s to stack, .def to defs, .env to env
  • Removed .b (use binPaths instead)

What's Changed

Full Changelog: v0.8.0...v0.9.0

v0.8.0

29 Dec 15:20
f647999

Choose a tag to compare

0.8.0 - 2025-12-29

Added

  • Functions
    • 2each
    • 2tuple
    • floatCmp
    • ceil
    • floor
    • leftPad
    • lastIndexOf
    • numFmt
    • preserveInt option for numFmt
    • now
    • date
    • nullDevice
    • enumerate
    • enumerateN
    • takeWhile
    • dropWhile
    • 2unpack
    • 2apply
    • title
    • zipDirInc
    • zipDirExc
    • zipDir
    • zipPack
    • zipList
    • zipExtract
    • zipExtractEntry
    • zipRead
    • chunk
    • repeat
    • return
    • toJson
    • base64encode
    • base64decode
    • : shorthand for get
  • timeout option for httpGet and httpPost
  • Support for comma-separated variable stores (e.g. a!, b!, c!)
  • LSP completion suggestions for @ variable references
  • LSP rename support for variables scoped to definitions and globals
  • Default CTRL-F binding matching fish shell behavior
  • Execution operators for capturing stdout/stderr as strings or binary (*b, ^, ^b)

Changed

  • Breaking change: renamed the builtin that returns the current datetime from date to now; date now truncates a datetime to its date-only component.
  • parseJson now accepts binary input and decodes it as UTF-8 before parsing.
  • fileExists now uses golang os.Lstat instead of os.Stat, meaning if you have a broken symlink in Linux, fileExists will now return true instead of false.
  • Slice semantics are slightly different. You now get a new backing array guaranteed for slice. This would come up if you did a partial slice (0:n), and then extended that in a loop or map. You could then be "extending" into the same backing array, causing previous items in the loop to be overwritten.
  • mv will now allow moving a file path into a directory path. Previously had to be file to file.
  • skip and take no longer throw exception when n is greater than the length of the list.
  • Input redirection can now accept binary data directly and stream it to stdin without string conversion.

Fixed

  • Fixed infinite loop in versionSortCmp when non-digit after digit.

What's Changed

Full Changelog: v0.7.0...v0.8.0

v0.7.0

03 Oct 18:50

Choose a tag to compare

0.7.0 - 2025-10-03

Added

  • Basic tab completion for the CLI
  • Basic HTML parsing
  • Start of VS code extension
  • httpGet and httpPost for making web requests.
  • Functions
    • isNone
    • parseHtml
    • absPath
    • bind
    • findByTag
    • concat
    • cartesian
    • groupBy
    • reFind
    • reFindAllIndex
    • md5
    • eachWhile
    • rmf
    • take
    • skip

Fixed

  • Handling of .cmd and .bat
  • Now immediately close file when appending
  • mv made more robust
  • Fixed broken line/columns in lexing
  • Better handling of UTF-8 input

Changed

  • Now return Maybes for conversions
  • Removed canParseDt
  • get returns Maybe
  • No escaping in path literals
  • In JSON mappings, null now goes to none, not 0.
  • fileSize now returns Maybe

What's Changed

Full Changelog: v0.6.0...v0.7.0

v0.6.0

17 Jul 14:19

Choose a tag to compare

v0.6.0 updates

v0.5.0

24 Jun 19:40

Choose a tag to compare

Bump version

v0.4.1

27 May 16:49

Choose a tag to compare

Add version sorting `sortV` and `sortVu`