x-plane-env: Add rudimentary zsh completion
parent
bf05a3fc05
commit
1e4348a775
|
@ -195,17 +195,24 @@ in buildFHSUserEnv rec {
|
|||
[ stdenv.cc.cc.lib curl openssl ] ++
|
||||
# For fly with lua
|
||||
[ freeglut libudev ]);
|
||||
|
||||
extraBuildCommands = ''
|
||||
chmod u+w $out/etc
|
||||
mkdir $out/etc/openal
|
||||
chmod u-w $out/etc
|
||||
echo "drivers=pulse" > $out/etc/openal/alsoft.conf
|
||||
mkdir $out/xplane-extra
|
||||
mkdir -p $out/xplane-extra
|
||||
'' + (concatMapStrings (addon:
|
||||
optionalString (addon.passthru ? build) ''
|
||||
ADDONPATH=${addon}
|
||||
printf "Addon ${addon.pname}\n" >&2
|
||||
${addon.passthru.build}
|
||||
'') uniqueAddons);
|
||||
|
||||
extraInstallCommands = ''
|
||||
mkdir -p $out/share/zsh/site-functions
|
||||
ln -s ${./x-plane-env.zcomp} $out/share/zsh/site-functions/_x-plane-env
|
||||
'';
|
||||
|
||||
inherit runScript;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#compdef x-plane-env
|
||||
|
||||
_x-plane-env() {
|
||||
local descr ret=1
|
||||
local -a context line state state_descr
|
||||
local -A opt_args
|
||||
|
||||
_arguments : '--help:' \
|
||||
'1:action:(X-Plane Airfoil Plane Installer SHELL prepare ortho revert navdata)'
|
||||
}
|
Loading…
Reference in New Issue