Skip to main content

command_basename

Function command_basename 

Source
pub fn command_basename(program: &str) -> &str
Expand description

Executable basename used to match a for_command grant binding.

/usr/bin/gh and gh both yield gh. Path separators of either style are recognized so a Windows-style C:\Tools\gh.exe still matches for=gh when compared on a Unix host (and vice versa). A trailing .exe / .bat / .cmd / .com suffix is stripped so gh.exe matches for=gh.