projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better default paths for log and PID files on Windows.
[tinc]
/
bash_completion.d
/
tinc
diff --git
a/bash_completion.d/tinc
b/bash_completion.d/tinc
index
4c64fa2
..
c79e4ee
100644
(file)
--- a/
bash_completion.d/tinc
+++ b/
bash_completion.d/tinc
@@
-4,8
+4,8
@@
_tinc() {
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="-c -d -D -K -n -o -L -R -U --config --no-detach --debug --net --option --mlock --logfile --pidfile --chroot --user --help --version"
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="-c -d -D -K -n -o -L -R -U --config --no-detach --debug --net --option --mlock --logfile --pidfile --chroot --user --help --version"
- confvars="Address AddressFamily BindToAddress BindToInterface Broadcast Cipher ClampMSS Compression ConnectTo DecrementTTL Device DeviceType Digest DirectOnly E
CDSAPrivateKeyFile ECDSAPublicKey ECDSAPublicKeyFile ExperimentalProtocol Forwarding GraphDumpFile Hostnames IffOneQueue IndirectData Interface KeyExpire
LocalDiscovery MACExpire MACLength MaxOutputBufferSize MaxTimeout Mode Name PMTU PMTUDiscovery PingInterval PingTimeout Port PriorityInheritance PrivateKeyFile ProcessPriority Proxy PublicKeyFile ReplayWindow StrictSubnets Subnet TCPOnly TunnelServer UDPRcvBuf UDPSndBuf VDEGroup VDEPort Weight"
- commands="add connect debug del disconnect dump edit export export-all generate-e
cdsa-keys generate-keys generate-rsa-keys get help import info init log
pcap pid purge reload restart retry set start stop top version"
+ confvars="Address AddressFamily BindToAddress BindToInterface Broadcast Cipher ClampMSS Compression ConnectTo DecrementTTL Device DeviceType Digest DirectOnly E
d25519PrivateKeyFile Ed25519PublicKey Ed25519PublicKeyFile ExperimentalProtocol Forwarding GraphDumpFile Hostnames IffOneQueue IndirectData Interface KeyExpire ListenAddress
LocalDiscovery MACExpire MACLength MaxOutputBufferSize MaxTimeout Mode Name PMTU PMTUDiscovery PingInterval PingTimeout Port PriorityInheritance PrivateKeyFile ProcessPriority Proxy PublicKeyFile ReplayWindow StrictSubnets Subnet TCPOnly TunnelServer UDPRcvBuf UDPSndBuf VDEGroup VDEPort Weight"
+ commands="add connect debug del disconnect dump edit export export-all generate-e
d25519-keys generate-keys generate-rsa-keys get help import info init invite join log network
pcap pid purge reload restart retry set start stop top version"
case ${prev} in
-c|--config)
case ${prev} in
-c|--config)
@@
-61,6
+61,18
@@
_tinc() {
COMPREPLY=( $(compgen -W "reachable nodes edges subnets connections graph" -- ${cur}) )
return 0
;;
COMPREPLY=( $(compgen -W "reachable nodes edges subnets connections graph" -- ${cur}) )
return 0
;;
+ network)
+ nets=""
+ pushd /etc/tinc >/dev/null 2>/dev/null
+ for dir in *; do
+ if [[ -f "$dir/tinc.conf" ]]; then
+ nets="$nets $dir"
+ fi
+ done
+ popd >/dev/null 2>/dev/null
+ COMPREPLY=( $(compgen -W "${nets}" -- ${cur}) )
+ return 0
+ ;;
esac
if [[ -z ${cur} ]] ; then
COMPREPLY=( $(compgen -W "${opts} ${commands}" -- ${cur}) )
esac
if [[ -z ${cur} ]] ; then
COMPREPLY=( $(compgen -W "${opts} ${commands}" -- ${cur}) )