forked from platformio/platformio-core
Sort boards by name
This commit is contained in:
@@ -59,7 +59,7 @@ def cli(query, installed, json_output): # pylint: disable=R0912
|
|||||||
name="Name"))
|
name="Name"))
|
||||||
click.echo("-" * terminal_width)
|
click.echo("-" * terminal_width)
|
||||||
|
|
||||||
for board in sorted(pboards, key=lambda b: b['id']):
|
for board in pboards:
|
||||||
if query:
|
if query:
|
||||||
search_data = "%s %s" % (board['id'],
|
search_data = "%s %s" % (board['id'],
|
||||||
json.dumps(board).lower())
|
json.dumps(board).lower())
|
||||||
@@ -97,7 +97,7 @@ def _get_boards(installed=False):
|
|||||||
boards.append(board)
|
boards.append(board)
|
||||||
except InternetIsOffline:
|
except InternetIsOffline:
|
||||||
pass
|
pass
|
||||||
return boards
|
return sorted(boards, key=lambda b: b['name'])
|
||||||
|
|
||||||
|
|
||||||
def _ouput_boards_json(query, installed=False):
|
def _ouput_boards_json(query, installed=False):
|
||||||
|
Reference in New Issue
Block a user