Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Upcoming (TBD)
==============

Features
---------
* `--checkup` now checks for external executables.


Bug Fixes
---------
* Watch command now returns correct time when ran as part of a multi-part query (#1565)
Expand Down
16 changes: 14 additions & 2 deletions mycli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2356,6 +2356,16 @@ def do_config_checkup(mycli: MyCli) -> None:
did_output_unsupported = False
did_output_deprecated = False

print('\n### External executables:\n')
for executable in [
'less',
'fzf',
]:
if shutil.which(executable):
print(f'The "{executable}" executable was found — good!')
else:
print(f'The recommended "{executable}" executable was not found — some functionality will suffer.')

indent = ' '
transitions = {
f'{indent}[main]\n{indent}default_character_set': f'{indent}[connection]\n{indent}default_character_set',
Expand All @@ -2364,7 +2374,8 @@ def do_config_checkup(mycli: MyCli) -> None:
reverse_transitions = {v: k for k, v in transitions.items()}

if not list(mycli.config.keys()):
print('\nThe local ~/,myclirc is missing or empty.\n')
print('\n### Missing file:\n')
print('The local ~/,myclirc is missing or empty.\n')
did_output_missing = True
else:
for section_name in mycli.config:
Expand Down Expand Up @@ -2432,7 +2443,8 @@ def do_config_checkup(mycli: MyCli) -> None:
'For more info on supported features, see the commentary and defaults at:\n\n * https://github.com/dbcli/mycli/blob/main/mycli/myclirc\n'
)
else:
print('User configuration all up to date!')
print('\n### Configuration:\n')
print('User configuration all up to date!\n')


if __name__ == "__main__":
Expand Down