Bash completion: Difference between revisions

Jump to navigation Jump to search
m
cat: FlightGear
(updated history of original completion script from 2005)
m (cat: FlightGear)
Line 2: Line 2:


By default the bash-shell is only able to complete the names of the executables (like "fgfs", "terrasync"), but can be extended by third-party scripts to further complete options (e.g. --enable-fullscreen ) and key/value pairs (e.g. --aircraft=seahawk ) specific to some executable.
By default the bash-shell is only able to complete the names of the executables (like "fgfs", "terrasync"), but can be extended by third-party scripts to further complete options (e.g. --enable-fullscreen ) and key/value pairs (e.g. --aircraft=seahawk ) specific to some executable.


== Installation ==
== Installation ==
You can download a completion script for the fgfs-command from [https://gitorious.org/fg-bashcomp].
You can download a completion script for the fgfs-command from [https://gitorious.org/fg-bashcomp].
The completion script is called "fgfs". [[#Usage|Usage]] documents the application of that script.
The completion script is called "fgfs". [[#Usage|Usage]] documents the application of that script.
Line 19: Line 17:
* put the completion script in the global bash-completion directory (on ArchLinux: /usr/share/bash-completion/completions/ )
* put the completion script in the global bash-completion directory (on ArchLinux: /usr/share/bash-completion/completions/ )
* restart your shell
* restart your shell


== Usage ==
== Usage ==
The completion script is able to auto-complete all options listed in
The completion script is able to auto-complete all options listed in
<syntaxhighlight lang="bash">fgfs --help --verbose</syntaxhighlight>
<syntaxhighlight lang="bash">fgfs --help --verbose</syntaxhighlight>
Line 52: Line 48:


If --vor/--ndb is given, auto-completion will work for the --vor-frequency/--ndb-frequency key, and offer the frequencies of navigation aids with the given name.
If --vor/--ndb is given, auto-completion will work for the --vor-frequency/--ndb-frequency key, and offer the frequencies of navigation aids with the given name.


== History ==
== History ==
* According to the [https://www.mail-archive.com/flightgear-users@flightgear.org/msg11275.html mailing list], bash completion has been available for Flightgear since 2005 (at this time completion functionality has been really rare), but not updated since 2008. The code can be found in the [https://gitorious.org/fg/flightgear flightgear repository on github] in the scripts/completion directory.
* According to the [https://www.mail-archive.com/flightgear-users@flightgear.org/msg11275.html mailing list], bash completion has been available for Flightgear since 2005 (at this time completion functionality has been really rare), but not updated since 2008. The code can be found in the [https://gitorious.org/fg/flightgear flightgear repository on github] in the scripts/completion directory.
* in 2014 [[User:Hamster]] has announced a [https://gitorious.org/fg-bashcomp new completion script] in the [http://forum.flightgear.org/viewtopic.php?f=6&t=22349 forums], which adds functionality for completion of runways, parking positions and some more
* in 2014 [[User:Hamster]] has announced a [https://gitorious.org/fg-bashcomp new completion script] in the [http://forum.flightgear.org/viewtopic.php?f=6&t=22349 forums], which adds functionality for completion of runways, parking positions and some more
[[Category:FlightGear]]

Navigation menu