Utils/basename.ps1

Register-GnuUtil @{
    Name        = 'basename'
    Category    = 'Paths and names'
    Synopsis    = 'Strip directory and suffix from file names.'
    Usage       = @('basename NAME [SUFFIX]', 'basename OPTION... NAME...')
    Description = @('Print NAME with any leading directory components removed.', 'If specified, also remove a trailing SUFFIX.')
    Options     = @(
        @{ Short = 'a'; Long = 'multiple'; Help = 'support multiple arguments and treat each as a NAME' }
        @{ Short = 's'; Long = 'suffix'; Arg = 'SUFFIX'; Help = 'remove a trailing SUFFIX; implies -a' }
        @{ Short = 'z'; Long = 'zero'; Help = 'end each output line with NUL, not newline' }
    )
    Notes       = @('PowerShell note: on Windows both / and \ separate directories.')
}