1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00

Use alternative rather than name to match manpage

This commit is contained in:
Chris Croome
2022-04-25 11:14:18 +01:00
parent abbfc92da0
commit d2adc2630c

View File

@ -30,7 +30,7 @@ Schema:
"value": string, # (null if 'none') "value": string, # (null if 'none')
"alternatives": [ "alternatives": [
{ {
"name": string, "alternative": string,
"priority": integer, "priority": integer,
"slaves": [ "slaves": [
{ {
@ -63,7 +63,7 @@ Examples:
"value": "/bin/nano", "value": "/bin/nano",
"alternatives": [ "alternatives": [
{ {
"name": "/bin/ed", "alternative": "/bin/ed",
"priority": -100, "priority": -100,
"slaves": [ "slaves": [
{ {
@ -73,7 +73,7 @@ Examples:
] ]
}, },
{ {
"name": "/bin/nano", "alternative": "/bin/nano",
"priority": 40, "priority": 40,
"slaves": [ "slaves": [
{ {
@ -104,7 +104,7 @@ Examples:
"value": "/bin/nano", "value": "/bin/nano",
"alternatives": [ "alternatives": [
{ {
"name": "/bin/ed", "alternative": "/bin/ed",
"priority": "-100", "priority": "-100",
"slaves": [ "slaves": [
{ {
@ -114,7 +114,7 @@ Examples:
] ]
}, },
{ {
"name": "/bin/nano", "alternative": "/bin/nano",
"priority": "40", "priority": "40",
"slaves": [ "slaves": [
{ {
@ -246,7 +246,7 @@ def parse(
raw_output['alternatives'].append(alt_obj) raw_output['alternatives'].append(alt_obj)
slaves = [] slaves = []
alt_obj = {"name": line_list[1]} alt_obj = {"alternative": line_list[1]}
continue continue
if line.startswith('Priority: '): if line.startswith('Priority: '):