Move TOTP secrets to a dedicated entry field (breaks sshyp entry format compatibility)

This commit is contained in:
2024-05-21 19:21:42 -04:00
parent 637e718199
commit 67bf6e42b9
11 changed files with 47 additions and 31 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ _mutnCompletions() {
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "password username totp url note" -- "$cur" )
;;
edit )
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "password username url note rename" -- "$cur" )
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "password username totp url note rename" -- "$cur" )
;;
gen )
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "update" -- "$cur" )
+3 -3
View File
@@ -7,9 +7,9 @@ function cliMUTNEntryCompleter {
(Get-ChildItem -Path $mutnPath -Recurse -File).FullName.Substring($mutnPath.Length) -replace '\\', '/' -replace ' ', '` '
}
} catch {
$trimmedPaths = $null # If any errors occur (especially, "You cannot call a method on a null-valued expression", set $trimmedPaths to $null
$trimmedPaths = $null # if any errors occur (especially, "You cannot call a method on a null-valued expression", set $trimmedPaths to $null
}
if ($null -eq $trimmedPaths) { # If no entries are found, add 'help' to $trimmedPaths
if ($null -eq $trimmedPaths) { # if no entries are found, add 'help' to $trimmedPaths
$trimmedPaths = 'help'
}
$trimmedPaths | Where-Object { $_ -like "$wordToComplete*" }
@@ -21,7 +21,7 @@ function cliMUTNOptionCompleter {
$possibleValues = @{
add = @('password', 'note', 'folder')
copy = @('password', 'username', 'totp', 'url', 'note')
edit = @('password', 'username', 'url', 'note', 'rename')
edit = @('password', 'username', 'totp', 'url', 'note', 'rename')
gen = @('update')
}
+1 -1
View File
@@ -23,7 +23,7 @@ case ${words[-2]} in
compadd {password,username,totp,url,note}
;;
edit )
compadd {password,username,url,note,rename}
compadd {password,username,totp,url,note,rename}
;;
gen )
compadd update