cosmic/completion/log.d

19 lines
385 B
D
Raw Normal View History

2018-11-30 19:57:57 +00:00
#!/usr/bin/env bash
_log() {
local cur
cur=${COMP_WORDS[COMP_CWORD]}
local helplist
helplist=$(log -z)
2019-04-30 21:24:01 +00:00
mapfile -t COMPREPLY < <( compgen -W "$helplist" -- "$cur" )
2018-11-30 19:57:57 +00:00
}
# Detect if current shell is ZSH, and if so, load this file in bash
# compatibility mode.
if [ -n "$ZSH_VERSION" ]; then
autoload bashcompinit
bashcompinit
fi
complete -o default -o nospace -F _log log