diff options
| author | 2026-02-20 03:38:36 +0100 | |
|---|---|---|
| committer | 2026-02-20 03:38:36 +0100 | |
| commit | e3d5bbdf1f213caafedf185251fba02558d30b98 (patch) | |
| tree | dc62bee53ebb9b3057b2a6fef043684efcefc125 /docs/plistutil.1 | |
| parent | 30132a9e2ce44f8325d574ea7a3c28466c132f0e (diff) | |
| download | libplist-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.1 | 46 |
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 |
| 30 | Print PList in human-readable format. | 30 | Print PList in human-readable format. |
| 31 | .TP | 31 | .TP |
| 32 | .B \-n, \-\-nodepath PATH | ||
| 33 | Restrict output to nodepath defined by | ||
| 34 | .I PATH | ||
| 35 | which selects a specific node within the plist document. | ||
| 36 | A node path describes traversal through dictionaries and arrays using / to | ||
| 37 | separate the components. | ||
| 38 | Traversal begins at the root node and proceeds from left to right. | ||
| 39 | Each component selects a child of the current node. | ||
| 40 | If the current node is a dictionary, the component is interpreted as a | ||
| 41 | dictionary key name. | ||
| 42 | If the current node is an array, the component must be a non-negative decimal | ||
| 43 | integer specifying the array index (0-based). | ||
| 44 | |||
| 45 | Given 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 | |||
| 66 | A 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 |
| 33 | JSON and OpenStep only: Print output in compact form. By default, the output | 79 | JSON and OpenStep only: Print output in compact form. By default, the output |
| 34 | will be pretty-printed. | 80 | will be pretty-printed. |
