fix: inverted dots and slashes
This commit is contained in:
parent
e5f40e5833
commit
4791f68ef2
3 changed files with 9 additions and 6 deletions
|
|
@ -14,7 +14,7 @@ class KeyRequest:
|
|||
self._parse_prompt(prompt)
|
||||
|
||||
def _parse_prompt(self, prompt: str):
|
||||
prompt_parts = prompt.split("/")
|
||||
prompt_parts = prompt.split(".")
|
||||
key = None
|
||||
match len(prompt_parts):
|
||||
case 1:
|
||||
|
|
@ -27,7 +27,7 @@ class KeyRequest:
|
|||
key = None
|
||||
if key is None:
|
||||
return
|
||||
key_parts = key.split(".")
|
||||
key_parts = key.split("/")
|
||||
self.path = key_parts[:] if len(key_parts) > 1 else None
|
||||
self.entry_name = key_parts[-1]
|
||||
|
||||
|
|
|
|||
3
tests/config/config.yaml
Normal file
3
tests/config/config.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
kp:
|
||||
file: "../config/kp.kdbx"
|
||||
secret: "../config/secret.txt"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
value: ${sample}
|
||||
nested: ${some.nested.value}
|
||||
custom: ${custom/field}
|
||||
uname: ${sample/username}
|
||||
invalid: ${double/slash/example}
|
||||
nested: ${some/nested/value}
|
||||
custom: ${custom.field}
|
||||
uname: ${sample.username}
|
||||
invalid: ${double.dot.example}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue