summaryrefslogtreecommitdiffstats
path: root/docs/plistutil.1
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2026-02-20 03:38:36 +0100
committerGravatar Nikias Bassen2026-02-20 03:38:36 +0100
commite3d5bbdf1f213caafedf185251fba02558d30b98 (patch)
treedc62bee53ebb9b3057b2a6fef043684efcefc125 /docs/plistutil.1
parent30132a9e2ce44f8325d574ea7a3c28466c132f0e (diff)
downloadlibplist-e3d5bbdf1f213caafedf185251fba02558d30b98.tar.gz
libplist-e3d5bbdf1f213caafedf185251fba02558d30b98.tar.bz2
plistutil: Add a --nodepath option to allow selecting a specific node
Diffstat (limited to 'docs/plistutil.1')
-rw-r--r--docs/plistutil.146
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/plistutil.1 b/docs/plistutil.1
index b1f7773..f322bab 100644
--- a/docs/plistutil.1
+++ b/docs/plistutil.1
@@ -29,6 +29,52 @@ convert to/from JSON or OpenStep the output format needs to specified.
29.B \-p, \-\-print FILE 29.B \-p, \-\-print FILE
30Print PList in human-readable format. 30Print PList in human-readable format.
31.TP 31.TP
32.B \-n, \-\-nodepath PATH
33Restrict output to nodepath defined by
34.I PATH
35which selects a specific node within the plist document.
36A node path describes traversal through dictionaries and arrays using / to
37separate the components.
38Traversal begins at the root node and proceeds from left to right.
39Each component selects a child of the current node.
40If the current node is a dictionary, the component is interpreted as a
41dictionary key name.
42If the current node is an array, the component must be a non-negative decimal
43integer specifying the array index (0-based).
44
45Given the following structure:
46.PP
47.RS
48.nf
49<plist version="1.0">
50<dict>
51 <key>Users</key>
52 <array>
53 <dict>
54 <key>Name</key>
55 <string>Alice</string>
56 </dict>
57 <dict>
58 <key>Name</key>
59 <string>Bob</string>
60 </dict>
61 </array>
62</dict>
63</plist>
64.fi
65
66A nodepath of:
67.TP
68\f[B]Users\f[] resolves to the entire array.
69.TP
70\f[B]Users/0\f[] resolves to the first dictionary in the array.
71.TP
72\f[B]Users/0/Name\f[] resolves to the string value "Alice".
73.TP
74\f[B]Users/1/Name\f[] resolves to the string value "Bob".
75.RE
76
77.TP
32.B \-c, \-\-compact 78.B \-c, \-\-compact
33JSON and OpenStep only: Print output in compact form. By default, the output 79JSON and OpenStep only: Print output in compact form. By default, the output
34will be pretty-printed. 80will be pretty-printed.