(destination: str, overwrite: bool = False)
| 86 | |
| 87 | |
| 88 | def write_default_config(destination: str, overwrite: bool = False) -> None: |
| 89 | import mycli |
| 90 | |
| 91 | with resources.files(mycli).joinpath("myclirc").open('r') as f: |
| 92 | default_config = f.read() |
| 93 | destination = os.path.expanduser(destination) |
| 94 | if not overwrite and exists(destination): |
| 95 | return |
| 96 | |
| 97 | with open(destination, "w") as f: |
| 98 | f.write(default_config) |
| 99 | |
| 100 | |
| 101 | def get_mylogin_cnf_path() -> str | None: |