On 16/02/16 12:41, Paul Eggert wrote: > On 02/16/2016 10:48 AM, Ruediger Meier wrote: > >> What about readlink, basename, mktemp ... Why they don't have a >> terminal mode too? > > If a command is commonly used at the top level, it probably should do > something like 'ls' does, yes. The commands you mention aren't often > used for that, though, so it's not high priority to change them.
Also commands like these don't have human interactive formatting like ls, such as column alignment etc., and thus are more programmatic. Consequently they can leverage the new %q printf format that was also added in coreutils 8.25 $ realpath_shell() { realpath -z "$@" | xargs -r0 printf '%q\n'; } $ touch 'z 1' 'z 2' $ realpath_shell z* '/home/padraig/git/coreutils/z 1' '/home/padraig/git/coreutils/z 2' cheers, Pádraig.