News for hackers. Stuff that matters.
Re:/usr/bin/time: not the command you think you know by yrro on Tuesday March 07, 2017 @05:49AM (#13809503)
Is this behaviour documented anywhere? The closest I can find is https://www.gnu.org/software/bash/manual/bashref.html#Aliase... which remarks,

> The first word of each simple command, if unquoted, is checked to see if it has an alias.

I observe that t\ime works just as well as \time.

Re:/usr/bin/time: not the command you think you know by ptx on Tuesday March 07, 2017 @06:55AM (#13809729)
Just quoting it normally also works, apparently, as your excerpt from the man page suggests:

  $ help|head -1
  GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu)
  $ "time" --version
  GNU time 1.7
  $ time --version
  bash: --version: command not found
  
  real	0m0.001s
  user	0m0.000s
  sys	0m0.000s
Re:/usr/bin/time: not the command you think you know by sigjuice on Tuesday March 07, 2017 @10:31AM (#13811048)
t\ime is rather surprising. Is there any documentation or explanation on why it does what it does?
Re:/usr/bin/time: not the command you think you know by yrro on Tuesday March 07, 2017 @06:42PM (#13816381)
https://www.gnu.org/software/bash/manual/bashref.html#Escape...

I think it's because using the backslash to escape counts as quoting. So the following are all equivalent:

  $ \time foo
  $ t\ime foo
  $ 'time' foo