Skip to content

Commit

Permalink
Update man-page to inivar and rewrite it in asciidoc
Browse files Browse the repository at this point in the history
This includes information about all command-line arguments. The section
'SEE ALSO' has been removed.
  • Loading branch information
havardAasen committed Dec 17, 2023
1 parent 4ffda48 commit b072f29
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 62 deletions.
3 changes: 2 additions & 1 deletion docs/man/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ cat1/
cat3/
cat9/

man1/emccalib.1
man1/emccalib.tcl.1
man1/halstreamer.1
man1/hy_gt_vfd.1
man1/inivar.1
man1/linuxcnc.1
man1/mqtt-publisher.1
man1/pi500_vfd.1
Expand All @@ -17,7 +19,6 @@ man1/svd-ps_vfd.1
man1/thermistor.1
man1/wj200_vfd.1
man1/xhc-whb04b-6.1
man1/emccalib.1

man3/hm2_pktuart.3

Expand Down
61 changes: 0 additions & 61 deletions docs/man/man1/inivar.1

This file was deleted.

72 changes: 72 additions & 0 deletions docs/src/man/man1/inivar.1.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// Copyright (c) 2020 andypugh
// SPDX-License-Identifier: GPL-2.0-or-later

= INIVAR(1)
:docdate: 2023-12-17

== NAME

inivar - Query an INI file

== SYNOPSIS

*inivar* *-var* _variable_ [*-sec* _section_] [*-num* _occurrence_number_] [*-tildeexpand*] [*-ini* _FILE_]

== DESCRIPTION

Prints to stdout the INI file result of a variable-in-section search, useful for scripts that want
to pick things out of INI files.

Uses _emc.ini_ as default filename. _variable_ needs to be supplied. If _section_ is omitted, first
instance of _variable_ will be looked for in any section. Otherwise, only a match of the variable in
_section_ will be returned.

== OPTIONS

*-var* _variable_::
The variable to search for, if multiple matches exists and *-num* is not specified, the first
match is returned.

*-sec* _section_::
The section to search in, if omitted, all sections are searched.

*-num* _occurrence_number_::
The occurrence number specifies which instance of the variable within the _FILE_, and _section_
if provided, should be returned. If omitted, the first matching occurrence is returned.

*-tildeexpand*::
Replace the tilde (~) with the home directory path (equivalent to *$(HOME)*) in the value
obtained from _variable_ in _FILE_.

*-ini* _FILE_::
The INI file to search in, defaults to _emc.ini_.

== EXIT STATUS

*0*::
Success.

*1*::
_variable_ was not found.

*-1*::
Failure.

== BUGS

None known at this time.

== AUTHOR

This man page written by andypugh, as part of the LinuxCNC project.

== REPORTING BUGS

Report bugs at https://github.com/LinuxCNC/linuxcnc/issues

== COPYRIGHT

Copyright (c) 2020 andypugh.

This is free software; see the source for copying conditions. There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

0 comments on commit b072f29

Please sign in to comment.