Parse shell env file
Your task
Load a shell-style env file for a local dev runner. Per line: trim it; skip if empty or if it begins with "#". If what remains starts with the prefix "export " (the word plus a space), drop that prefix and trim again. Split at the first "=" (lines without "=" are skipped), trimming key and value. Finally, when a value both begins and ends with a double quote and is at least two characters long, remove exactly that outer pair, inner text stays untouched. Repeated keys: last one wins. Return the resulting dict.
Examples
parse_env_file(lines: list[str]) -> dict[str,str]Example 1
Input
parse_env_file(["export API_KEY=\"abc 123\"", "DEBUG=1"])Output
{"API_KEY": "abc 123", "DEBUG": "1"}