Tags: dominicvl/p4-completion
Tags
Prevent @Label completion unless a user has disabled hostcomplete The hostcomplete shopt will complete any "word@" with a hostname, which is a problem for us, since Perforce uses @ to specify a file at a given label, e.g. "file@label". bash-completion disables the hostcomplete shopt by default and offers an alternative for hostname completion for programs like ssh and scp. But if you don't have bash-completion installed, hostcomplete could be enabled, and this will do weird things if we try to offer completion with the @ symbol. This change prevents us from suggesting the @ symbol as a completion option if hostcomplete is enabled, and prevents any attempts to complete a word with the @ symbol. Disabling hostcomplete with `shopt -u hostcomplete` will bring back the @Label completion functionality.