Skip to content
Myr

Add FAQ entry about `edit()` returning immediately (#3780)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Rowlando13 · committed by GitHub · parents 420c8fb, ce57b87 · Browse files · 2 files+32 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+32 added−0 removed

  • other:+32 added−0 removed

2 files+32 added−0 removed

modified:docs/faqs.md+22 added
modified:src/click/termui.py+10 added
868 unmodified lines
869 Note for Windows: to simplify cross-platform usage, the newlines are870 automatically converted from POSIX to Windows and vice versa. As such,871 the message here will have ``\n`` as newline markers.872873 .. warning::874875 The contract of this utility is that the editor command blocks until876 the editing session is over: Click waits for it to exit before877 reading the file back and cleaning it up. Editors whose command878 launches the real editor in the background and exits immediately879 break that contract. Click then returns before editing begins and880 removes the temporary file while the editor still has it open. See881 :ref:`edit-wait` to make such editors wait.882883 :param text: the text to edit.884 :param editor: optionally the editor to use. Defaults to automatic885 detection.886 :param env: environment variables to forward to the editor.
138 unmodified lines