x-plane-env: Add rudimentary zsh completion
parent
bf05a3fc05
commit
1e4348a775
|
@ -195,17 +195,24 @@ in buildFHSUserEnv rec {
|
||||||
[ stdenv.cc.cc.lib curl openssl ] ++
|
[ stdenv.cc.cc.lib curl openssl ] ++
|
||||||
# For fly with lua
|
# For fly with lua
|
||||||
[ freeglut libudev ]);
|
[ freeglut libudev ]);
|
||||||
|
|
||||||
extraBuildCommands = ''
|
extraBuildCommands = ''
|
||||||
chmod u+w $out/etc
|
chmod u+w $out/etc
|
||||||
mkdir $out/etc/openal
|
mkdir $out/etc/openal
|
||||||
chmod u-w $out/etc
|
chmod u-w $out/etc
|
||||||
echo "drivers=pulse" > $out/etc/openal/alsoft.conf
|
echo "drivers=pulse" > $out/etc/openal/alsoft.conf
|
||||||
mkdir $out/xplane-extra
|
mkdir -p $out/xplane-extra
|
||||||
'' + (concatMapStrings (addon:
|
'' + (concatMapStrings (addon:
|
||||||
optionalString (addon.passthru ? build) ''
|
optionalString (addon.passthru ? build) ''
|
||||||
ADDONPATH=${addon}
|
ADDONPATH=${addon}
|
||||||
printf "Addon ${addon.pname}\n" >&2
|
printf "Addon ${addon.pname}\n" >&2
|
||||||
${addon.passthru.build}
|
${addon.passthru.build}
|
||||||
'') uniqueAddons);
|
'') 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;
|
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