Utils/readlink.ps1

Register-GnuUtil @{
    Name         = 'readlink'
    Category     = 'File info and disk usage'
    Synopsis     = 'Print resolved symbolic links or canonical file names.'
    Usage        = @('readlink [OPTION]... FILE...')
    Description  = @(
        'Print value of a symbolic link or canonical file name',
        ''
    )
    FileOperands = $true
    Options      = @(
        @{ Short = 'f'; Long = 'canonicalize'; Key = 'mode'; Value = 'parent'; Help = 'canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist' }
        @{ Short = 'e'; Long = 'canonicalize-existing'; Key = 'mode'; Value = 'all'; Help = 'canonicalize by following every symlink in every component of the given name recursively, all components must exist' }
        @{ Short = 'm'; Long = 'canonicalize-missing'; Key = 'mode'; Value = 'none'; Help = 'canonicalize by following every symlink in every component of the given name recursively, without requirements on components existence' }
        @{ Short = 'n'; Long = 'no-newline'; Help = 'do not output the trailing delimiter' }
        @{ Short = 'q'; Long = 'quiet'; Key = 'verbosity'; Value = 'quiet'; Help = 'suppress most error messages (on by default)' }
        @{ Short = 's'; Long = 'silent'; Key = 'verbosity'; Value = 'quiet'; Help = 'suppress most error messages (on by default)' }
        @{ Short = 'v'; Long = 'verbose'; Key = 'verbosity'; Value = 'verbose'; Help = 'report error messages' }
        @{ Short = 'z'; Long = 'zero'; Help = 'end each output line with NUL, not newline' }
    )
    Notes        = @('PowerShell note: junctions count as symbolic links; -n has no visible effect on pipeline output.')
}