Since you are using bash-completion, the easiest solution is probably to ask it how
nohup is completed1:
$ complete -p nohup
complete -F _command nohup
and then apply the same completion recipe to
$ complete -F _command detach
Refer to "Where should I install my own local completions?" in bash-completion's FAQ for the most suitable place for this command.
_command function in turn invokes
_command_offset, which is, according to a comment in
# A meta-command completion function for commands like sudo(8), which need to
# first complete on a command, then complete according to that command's own
# completion definition.
1 Assuming an interactive
bash shell in which
bash_completion has been sourced. If you are using Arch Linux, as a comment of yours seemed to suggest, this is true by default for every interactive Bash session (