/usr/share/bash-completion/completions/lldptool is in lldpad 1.0.1+git20150824.036e314-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | # bash completion for lldptool
#
## lldptool --help
# lldptool v0.9.41
# Copyright (c) 2007-2010, Intel Corporation
#
# Substantially modified from: hostapd_cli v 0.5.7
# Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi> and contributors
#
# Usage:
# lldptool <command> [options] [arg] general command line usage format
# lldptool go into interactive mode
# <command> [options] [arg] general interactive command format
#
# Options:
# -i [ifname] network interface
# -V [tlvid] TLV identifier
# may be numeric or keyword (see below)
# -n "neighbor" option for command
# -a "add" option for command
# -d "remove" option for command
# -r show raw message
# -R show only raw messages
#
# Commands:
# license show license information
# -h|help show command usage information
# -v|version show version
# -q|quit exit lldptool (interactive mode)
# -S|stats get LLDP statistics for ifname
# -t|get-tlv get TLVs from ifname
# -T|set-tlv set arg for tlvid to value
# -l|get-lldp get the LLDP parameters for ifname
# -L|set-lldp set the LLDP parameter for ifname
# This file must be updated with any changes to, or additions to the options.
# Could not get numeric value to work for the --stats interval
# Considered parsing output of --help to complete options
have lldptool && _lldptool_options()
{
local cur prev opts cmds opts_and_cmds
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
cmds="license -h help -v version -q quit -s stats -t get-tlv -T set-tlv -l get-lldp -L set-lldp"
opts="-i -V -n -a -d -r -R"
opts_and_cmds="$opts $cmds"
case "${cur}" in
*)
COMPREPLY=( $(compgen -W "${opts_and_cmds}" -- ${cur}) )
;;
esac
case "${prev}" in
-i)
_available_interfaces
return 0
;;
esac
return 0
}
complete -F _lldptool_options lldptool
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh
|