Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter list of possible lpad commands on bad user input #458

Open
janosh opened this issue Oct 12, 2021 · 0 comments
Open

Filter list of possible lpad commands on bad user input #458

janosh opened this issue Oct 12, 2021 · 0 comments

Comments

@janosh
Copy link
Member

janosh commented Oct 12, 2021

Running lpad fizzle_wflows -s RUNNING raises

lpad: error: argument command: invalid choice: 'fizzle_wflows' (choose from 'version', 'init', 'reset', 'add', 'check_wflow', 'get_launchdir', 'append_wflow', 'dump_wflow', 'add_scripts', 'get_fws', 'get_fws_in_wflows', 'track_fws', 'rerun_fws', 'defuse_fws', 'pause_fws', 'reignite_fws', 'resume_fws', 'update_fws', 'get_wflows', 'defuse_wflows', 'pause_wflows', 'reignite_wflows', 'archive_wflows', 'delete_wflows', 'get_qids', 'cancel_qid', 'detect_unreserved', 'detect_lostruns', 'set_priority', 'webgui', 'recover_offline', 'forget_offline', 'admin', 'report', 'introspect')

since it should have been lpad defuse_wflows -s RUNNING.

Suggestion for a small QoL improvement: Instead of presenting the user with the whole list of possible commands, it's probably safe to assume they want to modify fireworks/workflows if the command they wrote contains _wfs/_wflows. In that case, only suggest the relevant commands, i.e. in this case

lpad: error: argument command: invalid choice: 'fizzle_wflows' (choose from 'get_fws_in_wflows', 'get_wflows', 'defuse_wflows', 'pause_wflows', 'reignite_wflows', 'archive_wflows', 'delete_wflows')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant