#compdef fgfs local curcontext="$curcontext" state line expl args variant ret=1 typeset -A opt_args # liste des appareils et leur description local aircrafts=( ${(f)"$(find $FGADDON/Aircraft -maxdepth 2 -type f -name "*-set.xml" -exec grep '' '{}' + \ | sed -r 's|^.+/(.+)-set.xml:.+description>(.+)(.+)#--\1[\2]#p' $FGDIR/source/fgdata/Translations/default/options.xml)"} ) args+=('*: :->aircraft') _arguments -C $args && ret=0 case "$state" in (aircraft) _describe 'aircraft' aircrafts ;; esac return ret