0

Tab completion does not work with time prefix:

time <tab>

How can I add the auto completion? Just want the default command completion behavior.

daisy
  • 53,527
  • 78
  • 236
  • 383
  • First of all, `time` in bash is not a builtin, it's a [reserved word](https://unix.stackexchange.com/questions/270614/why-does-bash-implement-time-as-a-reserved-word-instead-of-a-builtin). Secondly, this reserved word in bash only has one possible flag - `-p`. Why do you need autocomplete for that? – aviro Mar 01 '22 at 08:44
  • on ZSH with OMZ this works – mashuptwice Mar 01 '22 at 10:16
  • it should also complete all possible commands. eg `time dock[tab]` completes `time docker` because docker is an available command in my system. I wish I knew how it worked as I want the same behaviour for one fo my scripts. – Brad Mar 31 '22 at 03:39
  • @Brad see [Creating a bash completion script](https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial) – aviro Mar 31 '22 at 13:58

0 Answers0