Utils/dirname.ps1
|
Register-GnuUtil @{ Name = 'dirname' Category = 'Paths and names' Synopsis = 'Strip last component from file name.' Usage = @('dirname [OPTION] NAME...') Description = @( 'Output each NAME with its last non-slash component and trailing slashes', "removed; if NAME contains no /'s, output '.' (meaning the current directory)." ) Options = @( @{ Short = 'z'; Long = 'zero'; Help = 'end each output line with NUL, not newline' } ) Notes = @('PowerShell note: on Windows both / and \ separate directories; C:\foo gives C:\.') } |