mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-23 14:00:55 +01:00
25 lines
420 B
Text
25 lines
420 B
Text
|
_arc()
|
||
|
{
|
||
|
|
||
|
CUR="${COMP_WORDS[COMP_CWORD]}"
|
||
|
COMPREPLY=()
|
||
|
OPTS=$(arc shell-complete --current ${COMP_CWORD} -- ${COMP_WORDS[@]})
|
||
|
|
||
|
if [ $? -ne 0 ]; then
|
||
|
return $?
|
||
|
fi
|
||
|
|
||
|
if [ "$OPTS" = "FILE" ]; then
|
||
|
COMPREPLY=( $(compgen -f -- ${CUR}) )
|
||
|
return 0
|
||
|
fi
|
||
|
|
||
|
if [ "$OPTS" = "ARGUMENT" ]; then
|
||
|
return 0
|
||
|
fi
|
||
|
|
||
|
COMPREPLY=( $(compgen -W "${OPTS}" -- ${CUR}) )
|
||
|
|
||
|
}
|
||
|
complete -F _arc -o filenames arc
|