Some tab completions, e.g. agents for tlctl load show <agent>, requires root. As non-root, executing > sudo tlctl load show MyAgent works perfectly fine, but tab completing the agent value won't work since the script is not run with sudo in that instance. It won't crash, but nothing is returned. Most scripts exhibit this problem with tab completing dynamic data that has to be queried, such as active user or agent names.
Note that we have to options for solving this: 1. Use a different way to get the required information. For example, instead of asking vsmserver, configured agent hostnames could be retreived using tl-config, which doesn't need root. 2. Try asking for sudo permissions for tab completion, perhaps sudorelaunch could work for us here? Perhaps there are saved credentials in the terminal already?
Note that this also applies to hiveconf paths in tl-config: > $ tl-config -a /tlwebadm > /tlwebadm: Folder not found > > # tl-config -a /tlwebadm > username = admin > password = xxx > cert = /opt/thinlinc/etc/tlwebadm/server.crt > certkey = /opt/thinlinc/etc/tlwebadm/server.key > listen_port = 1010 > gnutls_priority = NORMAL > logging/