PsBash.psd1

#
# Module manifest for module 'PsBash'
#
# Generated by: Andy Brummer
#
# Generated on: 04/02/2026
#

@{

# Script module or binary module file associated with this manifest.
RootModule = 'PsBash.psm1'

# Version number of this module.
ModuleVersion = '0.15.1'


# ID used to uniquely identify this module
GUID = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'

# Author of this module
Author = 'Andy Brummer'

# Company or vendor of this module
CompanyName = 'Unknown'

# Copyright statement for this module
Copyright = '(c) Andy Brummer. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Real bash commands for PowerShell with typed objects. 76 commands (ls, grep, sort, awk, sed, jq, find, ps, du, tar, etc.) that accept real bash flags and return structured PowerShell objects while producing identical text output. Pipeline bridge pattern preserves typed objects through grep, sort, head, tail.'

# Supported PSEditions
CompatiblePSEditions = 'Core'

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '7.4'

# Name of the PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
# RequiredModules = @()

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = 'PsBash.Format.ps1xml'

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @(
    'Compare-Version',
    'Complete-BashBgJob',
    'Complete-BashBgJobsAtExit',
    'ConvertFrom-BashArgs',
    'ConvertFrom-HumanNumeric',
    'ConvertFrom-MonthName',
    'ConvertFrom-SimpleYaml',
    'ConvertFrom-YamlValue',
    'ConvertTo-BrowseRow',
    'ConvertTo-JqJson',
    'ConvertTo-PermissionString',
    'ConvertTo-SimpleYaml',
    'Disable-BashHookPrompt',
    'Emit-BashLine',
    'Enable-BashHookPrompt',
    'Expand-EscapeSequences',
    'Find-JqBranchKeyword',
    'Find-JqKeyword',
    'Find-JqTopLevelChar',
    'Find-JqTopLevelStr',
    'Format-BashDate',
    'Format-BashSize',
    'Format-LsGrid',
    'Format-LsLine',
    'Get-BashFileInfo',
    'Get-BashItem',
    'Get-BashJobCount',
    'Get-BashLsProviderEntries',
    'Get-BashPlatform',
    'Get-BashText',
    'Get-BrowseDisplayProperties',
    'Get-BrowseTargetText',
    'Get-JqMatchingBracket',
    'Get-LsDisplayName',
    'Get-LsEntryFromFsi',
    'Get-LsEntryFromPsItem',
    'Initialize-BrowseAdapters',
    'Invoke-BashBg',
    # Invoke-BashEcho / Invoke-BashKill / Invoke-BashRedirect migrated to binary
    # cmdlets (PsBash.Cmdlets); they are no longer psm1 functions, so exporting them
    # here was stale (harmless — PowerShell ignores missing names — but misleading).
    'Invoke-BashFg',
    'Invoke-BashJobs',
    # Wrapper: normalizes 'sed -e A -e B' to '-e @(A,B)' so the underlying
    # binary cmdlet's array Expression parameter accepts repeated -e.
    'Invoke-BashSed',
    # Wrapper: bundles repeated -e patterns and split bundles whose letters
    # prefix-match common parameters (-ie / -ve / -we) before the cmdlet
    # binder sees them; also disambiguates -E (extended regex flag).
    'Invoke-BashGrep',
    'Invoke-BashWait',
    'Invoke-BashBind',
    'Invoke-BashCaller',
    'Invoke-BashDisown',
    'Invoke-BashEnable',
    'Invoke-BashLogout',
    'Invoke-BashSuspend',
    'Invoke-BrowseAction',
    'Invoke-BrowseCommand',
    'Invoke-BrowseInteractive',
    'Invoke-JqFilter',
    'Invoke-JqIf',
    'Invoke-JqRecurse',
    'Invoke-JqSelect',
    'Invoke-ProcessSub',
    'New-BashProcessSubPath',
    'Invoke-ProcessSubPipeline',
    'Invoke-ProcessSubString',
    'New-BashObject',
    'New-BrowseAction',
    'New-BrowseAdapter',
    'New-BrowseBinding',
    'New-BrowseSafetyPreview',
    'Register-BrowseAdapter',
    'Get-BrowseAdapter',
    'Unregister-BrowseAdapter',
    'New-FlagDefs',
    'Open-BashFileReader',
    'Read-BashFileBytes',
    'Read-BashFileLines',
    'Read-BashFileRaw',
    'Read-BashFileStreaming',
    'Register-BashCompletions',
    'Register-BashLsProvider',
    'Remove-BashBgFinished',
    'Remove-BashBgState',
    'Resolve-BashCommand',
    'Resolve-BashGlob',
    'Resolve-BrowseAdapter',
    'Resolve-JqDotPath',
    'Resolve-JqStringInterpolation',
    'Set-BashDisplayProperty',
    'Set-BashErrorMode',
    'Show-BashHelp',
    'Split-JqComma',
    'Split-JqPipe',
    'Test-BashHelpFlag',
    'Test-BrowseCommandRequiresConfirmation',
    'Write-BashBgSignalReport',
    'Write-BashError',
    'Write-BashFileRaw',
    'Write-BashFileText',
    'Write-BashHostStderr'
)


# Cmdlets to export from this module. The psm1 imports PsBash.Cmdlets.dll
# via -Global; its exported cmdlets propagate to this module's session state
# and need to be re-exported through this entry to be Get-Command-resolvable.
# Wildcard form keeps the manifest in sync with the binary surface without a
# per-cmdlet list duplicating PsBash.Cmdlets.psd1.
CmdletsToExport = '*'

# Variables to export from this module
# VariablesToExport = @()

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = 'echo', 'printf', 'ls', 'cat', 'grep', 'sort', 'head', 'tail', 'wc', 'find', 'stat',
               'cp', 'mv', 'rm', 'mkdir', 'rmdir', 'touch', 'ln', 'ps', 'sed', 'awk',
               'cut', 'tr', 'uniq', 'rev', 'nl',
               'diff', 'comm', 'column', 'join', 'paste',
               'tee', 'xargs', 'jq',
               'date', 'seq', 'expr',
               'du', 'tree',
               'env', 'nohup', 'printenv', 'true', 'false', 'basename', 'dirname', 'cd', 'pwd', 'hostname', 'whoami', 'uname',
               'fold', 'expand', 'unexpand', 'strings', 'split', 'tac',
               'base64', 'md5sum', 'sha1sum', 'sha256sum', 'file', 'od', 'chmod',
               'rg', 'cd',
               'gzip', 'gunzip', 'zcat', 'tar',
               'yq', 'xan',
                'sleep', 'time', 'which', 'unalias',
                  'readlink', 'mktemp', 'type', 'bash', 'sh',
                'wait', 'jobs', 'fg', 'bg',
                'shift', 'getopts', 'flock', 'timeout', 'times', 'history', 'fc', 'hash', 'umask', 'ulimit', 'compgen', 'realpath', 'command', 'source', 'unset',
                'pushd', 'popd', 'dirs',
                'yes', 'tput', 'shopt',
                # NB: the '[' alias (the bash `test` builtin) is intentionally NOT
                # listed here. A bare '[' is an invalid wildcard pattern that breaks
                # Test-ModuleManifest and Publish-Module ("wildcard character pattern
                # is not valid: ["). The psm1 registers '[' via a global AllScope
                # Set-Alias on import, so the command is still available to users.
                'kill', 'test', 'let', 'id', 'shuf', 'balias',
                'install', 'browse', 'more', 'less',
                'trap', 'alias', 'mapfile', 'readarray',
                'ping', 'tracert', 'traceroute',
                'psgit', 'gtui',
                'psav', 'psffmpeg', 'avtui'

# DSC resources to export from this module
# DscResourcesToExport = @()

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

    PSData = @{

        Tags = @('bash', 'linux', 'cross-platform', 'cli', 'grep', 'awk', 'sed', 'jq',
                 'pipeline', 'typed-objects', 'powershell-module', 'devops', 'unix',
                 'shell', 'commands', 'windows', 'macos', 'PSEdition_Core')

        LicenseUri = 'https://github.com/standardbeagle/ps-bash/blob/main/LICENSE'

        ProjectUri = 'https://github.com/standardbeagle/ps-bash'

        # ReleaseNotes of this module
        ReleaseNotes = 'v0.15.1: Bash-compatibility fixes. A pipe stage is a subshell: cd, source, set, umask and the other state builtins in it change nothing in the caller. Refused assignments (readonly, a[]=, circular nameref) drop the rest of the line as bash does, and end the shell under set -e or posix. local -a/-A and declare in a function make a local array; a callee''s array write reaches the caller''s local; a local''s attributes and nameref are its frame''s. Diagnostics name the script and line (t.sh: line N:) for refusals, bad subscripts, failglob, ambiguous redirects and arithmetic errors; an arithmetic error discards the line. A builtin given too many arguments drops the line; exec reads the stdin it inherits; a piped script (cat f | bash) is read from stdin; env -i no longer clears the host environment; time and timeout pass their pipe byte for byte; every command rejects an option it does not have; on Windows the output of a redirected nohup command run by the Git ls/sh reaches its file, and 2> truncates. v0.15.0: Bash-compatibility release (XFAIL marks in the bash spec suite 140 -> 79). BREAKING: paths a script sees use forward slashes on Windows ($PWD, ~, $HOME, mktemp, realpath print C:/x; input still accepts C:\x and /c/x); bash code no longer resolves PowerShell aliases (gci, iex, r are command not found, 127, unless a function or program has the name; use the full cmdlet name); a nested shell sees exported variables only (x=1; sh -c "echo $x" prints an empty line; use export; a plain prog still sees all). Background jobs: output streams as the job runs, in launch order, with bounded memory; a job reads its own copy of the variables; a job sleep counts from its &. New: kill -SIG $$ and signals sent to a shell pid reach its trap; hash keeps the bash table; BASH_LINENO; --rcfile; a session whose hosts are all busy runs the command on a private host (PSBASH_EXEC_OVERFLOW_MS). Fix: pasted Unicode quote and dash marks no longer break the emitted PowerShell; line tools join a piece without its newline into the next line (printf a | sed); a while-read pipe stage reads lines as they are written; set -e ends a failing pipe stage; exit, break and errexit stop at subshell boundaries; pipefail after && and ||; an assignment sets PIPESTATUS; stopping a child ends its whole process tree; a 2>&1 child keeps its write order; a nested bash streams and is never timed out; a record keeps its trailing empty lines; base64 and od stream endless input; /dev/* names are never opened as files; file redirects write as output is produced; readlink and realpath canonicalize like GNU; kill -l prints the bash signal table; {a,} is one word; command and nohup run #! scripts; command not found carries the bash line prefix. Builtins and variables: help, bind, caller, enable, disown, logout, suspend; PPID, SHLVL, SRANDOM, BASH_SUBSHELL, default IFS; exec N<>file read-write descriptors; a DEBUG trap set on one line fires. Commands: GNU option parsing for uname, shuf, id, ping and tee; seq, tr, touch and install operand errors; date MMDDhhmm; env -C runs pwd in DIR; mkdir dir/; kill -RTMIN+N; a #! script reads the exact bytes piped to it. macOS: scripts no longer die with exit 138 (SIGUSR1 is left to the .NET runtime); stat, signals and ioctl are decoded per OS and arch. Known issues: docs/known-issues.md. v0.14.5: Bash-parity pass: 189 oils spec cases fixed (XFAIL 316 -> 127). Fix: "$@" inside a function reached a command as one joined word (cat "$@" with two files failed) and dash options passed to a function (f -i x) broke grep/head "$@". Fix: a stopped command no longer kills the shared host; a nested ps-bash joins its enclosing session instead of starting a second daemon; ps-bash host list, and host gc removes only orphaned hosts. New: fc, piped bash -i runs as an interactive session, history -a/-w/-r, PROMPT_COMMAND, \D{fmt} in prompts, compgen -X/-A user/-A command, set -v/-n, BASHOPTS, umask -p, mapfile -O, printf %(fmt)T honors TZ, LC_ALL=C counts bytes, kill/wait jobspecs, ulimit soft/hard limits, redirect target globs. Also: GLOBIGNORE, POSIX ERE in =~, octal and invalid arithmetic values, NUL bytes in $( ) and read, printf %q of invalid UTF-8, sed \xHH, cat /dev/zero, a script with a NUL byte is refused as binary, unterminated quotes are syntax errors, failglob and bad substitutions drop the rest of the line, aliases with here-docs, tilde and globstar inside braces. v0.14.4: Resource-leak pass. Fix: a mktemp file a long script still needed was deleted once any shell ran a process substitution five minutes later. Now removed instead of piling up: socket files left by killed hosts, old module extraction directories (about 5 MB per build, kept while any process uses them), and empty mktemp -d directories older than 10 days. A background-job spare host that failed to start is replaced at once. Fix: aliases in plain PowerShell with Import-Module PsBash ("Unable to find type"); $_ in and after a pipeline; exec {fd}>file allocates a descriptor and >&$fd writes to it; bash -i -c sets HISTFILE; a quoted ] does not close a glob bracket. v0.14.3: Bash-compatibility batch (about 140 fixes, checked against bash 5.2). New: chmod (octal and symbolic modes, -R -v -c -f), od, nohup for background processes that outlive the shell, symbolic umask modes, set -a / allexport, $SHELLOPTS, history in scripts; launcher -e, -u, -o and -O apply to the -c string. Fix: unquoted expansions glued to text split as bash splits them, in arguments, $(...), [ ] and extglob patterns; arrays (sparse slices, element initializers in declare/local, subscripts as words, associative key order); namerefs, unset and local scoping; exit and return statuses, errexit, the ERR trap and errtrace; return inside eval text, source searches PATH; exec on stdin/stdout/stderr and numbered descriptors on a simple command; [ ] and [[ ]] operand rules; redirects to /dev/stdout and /dev/stderr; pushd, popd and dirs; trap DEBUG, CDPATH, the time keyword. Fix: bash -c and bash script.sh run the host bash when no ps-bash launcher is installed beside an embedded module (Linux), and start in the shell directory, not the process directory. v0.14.2: New ExecutableLookup (PsBash.Core): one execvp-style PATH search shared by the interactive shell, test -x, traceroute, tab completion and embedders - directories and files without an execute bit are skipped, so a non-executable file earlier on PATH no longer shadows the real binary (was exit 13 permission denied). find no longer forks stat per entry on Linux/macOS (Owner/Group resolve lazily). 10 more Oils spec cases now pass. v0.14.1: Bash-compatibility batch (about 250 fixes, oracle-verified). New: set -x trace, wait -n, timeout command, local -n namerefs write through, typeset -n/+n, aliases expand at transpile time under expand_aliases, compgen -F/-C/-W/-A, ${v@a/K/k/A}, readonly arrays, terminal tab title follows the running command. Fix: dirs -c/-v/-p, ERR trap LINENO and errtrace. Fix: read (heredoc, -d, -N/-n/-t, REPLY, backslash-newline); parameter expansion (indirect ${!ref}, ${#a[i]}, case-modifying `${v^}`/`${v,,}` with patterns, ${@-w}, negative slices); arrays written in functions reach the caller, per-element operators, unset a[-1]; declare/typeset/readonly/local attributes and declare -p output; `[` / `[[` operand and grouping rules, integer-expression errors; arithmetic edge cases and failing (( )) status; trap signal specs and EXIT traps in subshells; set -e with missing commands (127) and set option handling; alias bodies run as bash, egrep/fgrep; brace and tilde expansion corners; printf 64-bit integers; PIPESTATUS, BASH_VERSINFO, FUNCNAME, LINENO; background jobs see loop variables; rm -rf of the current directory; scripts piped into bash/sh. Release: NuGet publish uses trusted publishing (OIDC). v0.14.0: Remote sessions. New: ps-bash session attach NAME gives a reattachable terminal (tmux-style) - a detached broker owns a PTY and the interactive shell, so the shell and its screen outlive the client; Ctrl-] d detaches, a new client gets the last 1 MiB of output replayed, several clients can attach (--read-only to watch), and session stop ends it. Remote use is ssh -t host ps-bash session attach NAME. Works on Linux, macOS and Windows (ConPTY); the wire protocol is documented in docs/sessions.md. Named sessions (PSBASH_SESSION=NAME) are now stateful by default: variables, cd and functions persist between commands in one pinned runspace (--stateless restores a fresh runspace per command); session list shows each mode. Changed: the Windows named-pipe transport is removed; AF_UNIX sockets are the only transport (a socket path over the OS limit now fails with a message naming TMPDIR). Fix: a shell started under a Windows pseudoconsole no longer inherits the parent redirected stdio (it read EOF and exited with no prompt), so PSBASH_PTY=1 works when ps-bash is launched from a pipe-driven parent. v0.13.0: Release integrity and safety. SECURITY: tar extraction refuses to write through an existing symlink or junction below the destination (it could escape the directory and still report success). New: named durable sessions - ps-bash session start|list|status|stop NAME plus PSBASH_SESSION=NAME give a host that outlives its launchers and runs concurrently with other sessions (docs/sessions.md). New: history lists entries, history -d ID deletes one, history -c erases all (secure delete, WAL truncate, VACUUM); a line starting with a space, or any line while PSBASH_HISTORY_PRIVATE=1, is never recorded; an unopenable history DB degrades to in-memory with a warning. Fix: install.sh and install.ps1 install the complete package (host and runtime files), smoke-test a real command before switching, keep the previous version for rollback, and name an unsupported platform. Release pipeline: binaries are built from one pinned commit, smoke-tested, and published only after the tests pass; dry-run mode rehearses a branch. Test harness: deadlines are checkpoints that extend while the machine is starved. Older versions: https://github.com/standardbeagle/ps-bash/releases'

    } # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

}