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

[cryptsetup] luksErase is not completed #758

Open
3 tasks done
ghost opened this issue Jun 14, 2022 · 1 comment · May be fixed by #759
Open
3 tasks done

[cryptsetup] luksErase is not completed #758

ghost opened this issue Jun 14, 2022 · 1 comment · May be fixed by #759

Comments

@ghost
Copy link

ghost commented Jun 14, 2022

Describe the bug

When I press the tab key in cryptsetup luks, luksErase is not completed.

To reproduce

  1. Type cryptsetup luksE

Expected behavior

luksErase appears as a candidate for completion.

Versions (please complete the following information)

  • Operating system name/distribution and version: Arch Linux
  • bash version, echo "$BASH_VERSION": 5.1.16(1)-release
  • bash-completion version, (IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}"): 2.11

Additional context

Debug trace

@akinomyoga
Copy link
Collaborator

This is because just the list hardcoded in completions/cryptsetup is not up to date:

COMPREPLY=($(compgen -W 'open close resize status benchmark
repair erase luksFormat luksAddKey luksRemoveKey luksChangeKey
luksKillSlot luksUUID isLuks luksDump tcryptDump luksSuspend
luksResume luksHeaderBackup luksHeaderRestore' -- "$cur"))

The upstream option parser is found here:

https://gitlab.com/cryptsetup/cryptsetup/-/blob/main/src/cryptsetup.c#L3155-3208
https://gitlab.com/cryptsetup/cryptsetup/-/blob/main/src/cryptsetup.c#L2831-2867
https://gitlab.com/cryptsetup/cryptsetup/-/blob/main/src/cryptsetup_args.h#L28-53

The differences are

--- a.txt^I2022-06-14 17:51:57.795545785 +0900
+++ b.txt^I2022-06-14 17:52:12.900602154 +0900
@@ -1,20 +1,41 @@
 benchmark
+bitlkClose
+bitlkDump
+bitlkOpen
 close
+config
+convert
+create
 erase
 isLuks
+loopaesClose
+loopaesOpen
 luksAddKey
 luksChangeKey
+luksClose
+luksConfig
+luksConvertKey
 luksDump
+luksErase
 luksFormat
 luksHeaderBackup
 luksHeaderRestore
 luksKillSlot
+luksOpen
 luksRemoveKey
 luksResume
 luksSuspend
 luksUUID
 open
+plainClose
+plainOpen
+reencrypt
+refresh
+remove
 repair
 resize
 status
+tcryptClose
 tcryptDump
+tcryptOpen
+token

@akinomyoga akinomyoga linked a pull request Jun 14, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant