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.9.8'


# 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.0'

# 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',
    'ConvertFrom-AwkProgram',
    '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-AwkString',
    'Expand-EscapeSequences',
    'Find-JqBranchKeyword',
    'Find-JqKeyword',
    'Find-JqTopLevelChar',
    'Find-JqTopLevelStr',
    'Format-AwkPrintf',
    'Format-BashDate',
    'Format-BashSize',
    'Format-LsGrid',
    'Format-LsLine',
    'Format-PsAuxLine',
    'Format-PsCustomLine',
    'Get-BashBgRunspacePool',
    'Get-BashFileInfo',
    'Get-BashItem',
    'Get-BashLsProviderEntries',
    'Get-BashPlatform',
    'Get-BashText',
    'Get-BrowseDisplayProperties',
    'Get-BrowseTargetText',
    'Get-DotNetProcEntry',
    'Get-JqMatchingBracket',
    'Get-LinuxProcEntry',
    'Get-LsDisplayName',
    'Get-LsEntryFromFsi',
    'Get-LsEntryFromPsItem',
    'Initialize-BrowseAdapters',
    'Invoke-AwkAction',
    'Invoke-BashAwk',
    'Invoke-BashBackground',
    'Invoke-BashBg',
    'Invoke-BashEcho',
    'Invoke-BashFg',
    'Invoke-BashJobs',
    'Invoke-BashKill',
    'Invoke-BashRedirect',
    # 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',
    'Invoke-BashWait',
    'Invoke-BrowseAction',
    'Invoke-BrowseCommand',
    'Invoke-BrowseInteractive',
    'Invoke-JqFilter',
    'Invoke-JqIf',
    'Invoke-JqRecurse',
    'Invoke-JqSelect',
    'Invoke-ProcessSub',
    'Invoke-ProcessSubPipeline',
    'Invoke-ProcessSubString',
    'New-BashObject',
    'New-BrowseAction',
    'New-BrowseAdapter',
    'New-BrowseBinding',
    'New-BrowseSafetyPreview',
    'New-FlagDefs',
    'Open-BashFileReader',
    'Read-AwkBlock',
    'Read-BashFileBytes',
    'Read-BashFileLines',
    'Read-BashFileRaw',
    'Read-BashFileStreaming',
    'Register-BashCompletions',
    'Register-BashLsProvider',
    'Resolve-AwkExpression',
    'Resolve-AwkStringFunc',
    'Resolve-BashGlob',
    'Resolve-BrowseAdapter',
    'Resolve-JqDotPath',
    'Resolve-JqStringInterpolation',
    'Set-BashDisplayProperty',
    'Set-BashErrorMode',
    'Show-BashHelp',
    'Split-AwkFields',
    'Split-AwkFuncArgs',
    'Split-AwkStatements',
    'Split-JqComma',
    'Split-JqPipe',
    'Test-AwkPattern',
    'Test-BashCondition',
    'Test-BashHelpFlag',
    'Test-BrowseCommandRequiresConfirmation',
    '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', 'printenv', 'basename', 'dirname', 'pwd', 'hostname', 'whoami', 'uname',
               'fold', 'expand', 'unexpand', 'strings', 'split', 'tac',
               'base64', 'md5sum', 'sha1sum', 'sha256sum', 'file',
               'rg',
               'gzip', 'gunzip', 'zcat', 'tar',
               'yq', 'xan',
                'sleep', 'time', 'which', 'unalias',
                  'readlink', 'mktemp', 'type', 'bash',
                'wait', 'jobs', 'fg', 'bg',
                'shift', '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'

# 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.9.7: CI hardening and cross-platform parity. Detach ps-bash-host inherited stdio (dup2 /dev/null over fds 0/1/2 + close inherited pipe fds 3+) so the daemon never holds the launcher pipe write ends open across Linux/macOS test runners (this fix lifted the indefinite-hang quarantine on PsBash.Differential.Tests / PsBash.Canary.Tests / PsBash.Escalation.Tests). Fix three Pester regressions: less alias missing from AliasesToExport, Invoke-BashPwd StrictMode crash on undefined $global:__PsBashCwd, and Invoke-BashPwd path-collapse on macOS due to preferring $env:PWD over (Get-Location).Path. Fix CommandNotFoundException not propagating to $LASTEXITCODE; ps-bash now returns exit 127 like bash. Fix Invoke-BashSource silent failure on missing files (now sets $LASTEXITCODE=1 and writes a diagnostic). Fix PS1 \\w / \\W using Windows-style backslashes on POSIX. Fix here-string and heredoc body missing trailing newline (cat <<< \"hello\" now produces \"hello\\n\"). Tag every line of multi-line PSBASH_DEBUG output so AssertOracle.StripDebugLines does not leak transpile content into differential stderr comparison. Parser: \"done\" reserved only as first word of a simple command (per bash man) so \"echo done\" no longer drops the argument. macOS TerminalMode probe now exercises ICANON (was Linux-only, ICANON bit value differs). HostCommandTests endpoint name shortened to fit macOS AF_UNIX 104-char limit. Canary tests use [SkippableFact] so Skip.If actually skips. ProcessRunHelper passes -c $Configuration to dotnet run so Escalation tests resolve the Release launcher. CI workflows gain paths-ignore (.dartai/**, docs/spikes, **/*.md) + concurrency.cancel-in-progress + --blame-hang-timeout + timeout-minutes caps. v0.9.6: Add host management commands (ps-bash host status/shutdown/restart), implement cd as an emitter builtin with $env:PWD tracking, fix pwd to honor __PsBashCwd and .NET CurrentDirectory, detect stale host processes when the binary has been reinstalled, harden eval depth probe for set -u compatibility, wrap statement-style emitter output in $() for pipeline chains, fix CtrlRSearch alternate-screen restore idempotency, guard PSObjectFormatter against missing properties, suppress IL2026 trim warnings in the host, and add AOT-compatible JSON serialization for HostMetadata. v0.9.5: Remove the legacy script-worker path, run the launcher exclusively through ps-bash-host/SdkWorker, and fix SDK object output to emit BashText for ls-style records instead of PSObject serialization. v0.9.4: Patch release for cmdlet packaging and host IPC hardening. Stages the built PsBash.Cmdlets binary for PSGallery publishing, keeps Invoke-BashEval behind the experimental build flag, and simplifies host transport startup paths. v0.9.1: Memory and error-loop hardening. SdkWorker streams output via PSDataCollection.DataAdded instead of buffering Collection<PSObject>; DataAdded handler stops the pipeline on callback failure instead of looping into a broken sink. RunCommandCollect capped at 4 MB. HostProtocol.StreamLineReader enforces a 1 MB max-line guard against malformed IPC frames. HostServer accept loop adds a 10 ms delay on error to prevent CPU busy-spin. Background memory watcher now wraps its poll body in try/catch so a transient failure cannot silently kill the watcher. jq pipe/comma/recurse/path accumulation converted from O(n^2) PS array += to List[object].Add/AddRange. v0.9.0: Two-binary IPC host architecture. ps-bash is now a small AOT launcher that delegates PowerShell execution to a long-lived ps-bash-host daemon over a named-pipe (Windows) / Unix-domain-socket (Linux/macOS) transport. The host hosts a single Microsoft.PowerShell.SDK runspace shared across connections, eliminating per-invocation pwsh startup cost (~250ms) and enabling state persistence for set -e / positional params / hooks across -c invocations. Idle shutdown (PSBASH_HOST_IDLE_SECS, default 600s) and parent-death watchdog ensure the host exits when the launcher does. Distributions now ship both ps-bash and ps-bash-host in the same archive. v0.8.20: Publish PsBash.Cmdlets binary module to PSGallery alongside PsBash. PsBash.Cmdlets provides Invoke-BashEval, Invoke-BashSource, ConvertTo-PowerShell, and Test-BashSyntax cmdlets. Install-Module PsBash.Cmdlets automatically pulls in PsBash as a dependency. v0.8.17: LineEditor — fix right-arrow suggestion acceptance and refactor redraw pattern for safety. v0.8.16: Fix manifest to not export Invoke-BashEval/Invoke-BashSource as functions (they are binary cmdlets). v0.8.15: Error rewriting - map pwsh runtime errors back to bash line numbers. v0.8.14: Parse-time eval — `eval ARG` is now resolved by PsEmitter at transpile time: arg word parts are reconstructed into the bash source eval would see, which is re-parsed and emitted inline. Static bodies (literals, quoted literals, variable references) fold into normal pwsh with no runtime eval cmdlet. Dynamic bodies — `eval "$(cmd)"`, `eval `cmd``, `eval $((expr))`, `eval <(cmd)` — are rejected at transpile time with a clear message telling the user to inline the command''s output, instead of the prior behavior where rc sourcing hung past its timeout on nested ps-bash subprocess spawns. Also: route -c through InteractiveShell.ExpandAliases before transpile for REPL parity, with regression tests for `-c "... --<word> ..."` where `<word>` starts with a recognized short-flag letter. PSBASH_TEST_TIMEOUT wall-clock cap for test.sh. Shell test harness always closes child stdin for clean EOF. install-local.ps1 applies the NTFS rename-to-.old trick to every locked file, not just ps-bash.exe, so a live shell holding Core.dll no longer blocks redeploy. v0.8.13: Bash CLI compatibility for Claude Code wrappers (bundled -lc, -c -l cmd interleaving). Fix three transpiler bugs in Claude prelude (cmd || true, >|, < /dev/null). Add --unix-paths flag and PSBASH_UNIX_PATHS env var for opt-in MSYS drive-path translation. Hide child console windows when ps-bash is spawned by a GUI/Node parent. Interactive shell startup loading indicator and console-input restore after foreground children. v0.8.12: Replace all silent catch blocks with stderr logging. Fix sequence suggestion test. v0.8.10: Fix flaky background-job Pester tests and child-process module loading for CI stability. v0.8.9: Add install alias to module manifest. v0.8.8: Fix Ctrl+C in shell mode, ANSI prompt after git pull, install command, --noprofile flag, PATH command resolution, cursor redraw, history deduplication. v0.8.7: Direct execution for interactive external commands (claude, copilot, etc.). v0.8.6: Skip ps -u USER on non-Windows CI. v0.8.5: Skip ps -u USER on Linux CI. v0.8.4: Add missing Set-Alias for balias. v0.8.3: Remove PsBuiltinAliases, combined flag parsing, ls -F/-A/--color, interactive shell, rm nul guard.'

    } # 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 = ''

}