Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
Using bash-completion for commands that have sub-commands (e.g. pcc, nodemap, mirror, etc.) do not properly provide the tab-completion for only those sub-commands. It appears that the sub-command output is mixed in with the full top-level command-list, which is not helpful for users.
This appears to be an issue with the --list-commands handling that is used to generate the tab completion:
# lfs --list-commands quit exit help --help version --version list-commands --list-commands --ignore_errors ignore_errors setstripe getstripe setdirstripe getdirstripe mkdir rm_entry rmentry unlink_foreign pool_list find check osts mdts df getname setquota quota project flushctx changelog changelog_clear fid2path path2fid rmfid data_version hsm_state hsm_set hsm_clear hsm_action hsm_archive hsm_restore hsm_release hsm_remove hsm_cancel hsm swap_layouts migrate mv ladvise mirror getsom somsync heat_get heat_set pcc # lfs pcc --list-commands quit exit help --help version --version list-commands --list-commands --ignore_errors ignore_errors attach attach_fid state status detach detach_fid delete pin unpin find check osts mdts df getname setquota quota project flushctx changelog changelog_clear fid2path path2fid rmfid data_version hsm_state hsm_set hsm_clear hsm_action hsm_archive hsm_restore hsm_release hsm_remove hsm_cancel hsm swap_layouts migrate mv ladvise mirror getsom somsync heat_get heat_set pcc
The second list includes the PCC sub-commands attach, attach_fid, detach, detach_fid, pin, status, unpin but mixed in with other commands that are not suitable at this point.