diff --git a/src/karl/services/passwords.py b/src/karl/services/passwords.py index 5eddf31..bf2cda0 100644 --- a/src/karl/services/passwords.py +++ b/src/karl/services/passwords.py @@ -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] diff --git a/tests/config/config.yaml b/tests/config/config.yaml new file mode 100644 index 0000000..d300746 --- /dev/null +++ b/tests/config/config.yaml @@ -0,0 +1,3 @@ +kp: + file: "../config/kp.kdbx" + secret: "../config/secret.txt" diff --git a/tests/files/test1/test.mo.yaml b/tests/files/test1/test.mo.yaml index 11bd6b5..d5a82d5 100644 --- a/tests/files/test1/test.mo.yaml +++ b/tests/files/test1/test.mo.yaml @@ -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}