Any projects which want to use Hush code from now on will need to be licensed as GPLv3 or we will send the lawyers: https://www.softwarefreedom.org/ Notably, Komodo (KMD) is licensed as GPLv2 and is no longer compatible to receive code changes, without causing legal issues. MIT projects, such as Zcash, also cannot pull in changes from the Hush Full Node without permission from The Hush Developers, which may in some circumstances grant an MIT license on a case-by-case basis.
58 lines
1.6 KiB
Bash
58 lines
1.6 KiB
Bash
# bash programmable completion for komodod(1)
|
|
# Copyright (c) 2012-2017 The Bitcoin Core developers
|
|
# Copyright (c) 2016-2017 The komodo developers
|
|
# Distributed under the MIT software license, see the accompanying
|
|
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
|
|
|
_komodod() {
|
|
local cur prev words=() cword
|
|
local komodod
|
|
|
|
# save and use original argument to invoke komodod for -help
|
|
# it might not be in $PATH
|
|
komodod="$1"
|
|
|
|
COMPREPLY=()
|
|
_get_comp_words_by_ref -n = cur prev words cword
|
|
|
|
case "$cur" in
|
|
-conf=*|-pid=*|-loadblock=*|-rpccookiefile=*|-wallet=*)
|
|
cur="${cur#*=}"
|
|
_filedir
|
|
return 0
|
|
;;
|
|
-datadir=*|-exportdir=*)
|
|
cur="${cur#*=}"
|
|
_filedir -d
|
|
return 0
|
|
;;
|
|
-*=*) # prevent nonsense completions
|
|
return 0
|
|
;;
|
|
*)
|
|
|
|
# only parse -help if senseful
|
|
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
|
|
local helpopts
|
|
helpopts=$($komodod -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
|
|
COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
|
|
fi
|
|
|
|
# Prevent space if an argument is desired
|
|
if [[ $COMPREPLY == *= ]]; then
|
|
compopt -o nospace
|
|
fi
|
|
return 0
|
|
;;
|
|
esac
|
|
} &&
|
|
complete -F _komodod komodod
|
|
|
|
# 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
|