summaryrefslogtreecommitdiffstats
path: root/ksh/conf/complete.ksh
blob: 19e4739bac74ef795f7488bfae51c03c750ab6c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/ksh

complete() {
	if type "$1" >/dev/null
	then
		typeset cmd="$1"
		typeset num="$2"
		shift 2
		set -A "complete_${cmd}${num:+"_$num"}" -- "$@"
	fi
}

complete sysctl "" $(sysctl | sed 's/[ =].*//')
complete rcctl 1 disable enable get ls order set restart start stop
complete rcctl 2 $(rcctl ls all)
complete git 1 $(git --list-cmds=main)
complete kill 1 -9 -HUP -INFO -KILL -TERM
complete pkill 1 -9 -HUP -INFO -KILL -TERM
complete ifconfig 1 $(ifconfig | grep '^[a-z]' | cut -d: -f1)
Un proyecto texto-plano.xyz