fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
320ebb685
master
1function __fish_cryptenroll_pkcs11_devices 2systemd-cryptenroll --pkcs11-token-uri=list2> /dev/null| tail -n+2 | string replace -r'(\S+)\s(\S+).*' '$1\t$2' 3echo -e"auto\tautomatically determine URI of security token" 4echo -e"list\tlist available PKCS#11 tokens" 5end 6 7function __fish_cryptenroll_fido2_devices 8systemd-cryptenroll --fido2-device=list2> /dev/null| tail -n+2 | string replace -ar' +' ' ' | string replace -r'(\S+)\s(.*)' '$1\t$2' 9echo -e"auto\tautomatically determine device node of security token" 10echo -e"list\tlist available FIDO2 tokens" 11end 12 13function __fish_cryptenroll_tpm2_devices 14systemd-cryptenroll --tpm2-device=list2> /dev/null| tail -n+2 | string replace -r'(\S+)\s(\S+).*' '$1\t$2' 15echo -e"auto\tautomatically determine device node of TPM2 device" 16echo -e"list\tlist available TPM2 devices" 17end 18 19function __fish_cryptenroll_complete_wipe 20echo -e"all\twipe all key slots" 21echo -e"empty\twipe key slots unlocked by an empty passphrase" 22echo -e"password\twipe key slots unlocked by a traditional passphrase" 23echo -e"recovery\twipe key slots unlocked by a recovery key" 24echo -e"pkcs11\twipe key slots unlocked by a PKCS#11 token" 25echo -e"fido2\twipe key slots unlocked by a FIDO2 token" 26echo -e"tpm2\twipe key slots unlocked by a TPM2 chip" 27for iin ( seq 0 31 ) 28echo -e" $i \twipe key slot $i " 29end 30end 31 32complete -c systemd-cryptenroll -xa"(__fish_complete_blockdevice)" 33 34complete -c systemd-cryptenroll -l password -d"Enroll a regular password" 35complete -c systemd-cryptenroll -l recovery-key -d"Enroll an auto-generated recovery key" 36complete -c systemd-cryptenroll -l pkcs11-token-uri -kxa"(__fish_cryptenroll_pkcs11_devices)" -d"Enroll a PKCS#11 security token or smartcard" 37complete -c systemd-cryptenroll -l fido2-device -kxa"(__fish_cryptenroll_fido2_devices)" -d"Enroll a FIDO2 security token" 38complete -c systemd-cryptenroll -l fido2-with-client-pin -xa"yes no" -d"Require to enter a PIN when unlocking the volume" 39complete -c systemd-cryptenroll -l fido2-with-user-presence -xa"yes no" -d"Require to verify presence when unlocking the volume" 40complete -c systemd-cryptenroll -l fido2-with-user-verification -xa"yes no" -d"Require user verification when unlocking the volume" 41complete -c systemd-cryptenroll -l tpm2-device -kxa"(__fish_cryptenroll_tpm2_devices)" -d"Enroll a TPM2 security chip" 42complete -c systemd-cryptenroll -l tpm2-pcrs -x -d"Bind the enrollment of TPM2 device to specified PCRs" 43complete -c systemd-cryptenroll -l wipe-slot -kxa"(__fish_stripprefix='^--wipe-slot=' __fish_complete_list , __fish_cryptenroll_complete_wipe)" -d"Wipes one or more LUKS2 key slots" 44complete -c systemd-cryptenroll -l help -s h -d"Print a short help" 45complete -c systemd-cryptenroll -l version -d"Print a short version string"