mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-01 14:47:21 -04:00
Move TOTP secrets to a dedicated entry field (breaks sshyp entry format compatibility)
This commit is contained in:
@@ -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" )
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user