Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set an explicit suffix on temporary filenames for toots #219

Closed
larsks opened this issue Nov 11, 2022 · 0 comments · Fixed by #220
Closed

Set an explicit suffix on temporary filenames for toots #219

larsks opened this issue Nov 11, 2022 · 0 comments · Fixed by #220

Comments

@larsks
Copy link
Contributor

larsks commented Nov 11, 2022

When you write a toot using toot post -e, the editor opens a temporary file named something like /tmp/tmp1234567. Because of the generic filename it's not possible to apply any automatic settings (syntax, wrapping, spell checking, etc) to the file.

Include an explicit prefix or suffix in the name so that toots are identifiable for the purpose of customizing editor settings.

E.g.:

with tempfile.NamedTemporaryFile(suffix='.toot') as fd:
  ...
larsks added a commit to larsks/toot that referenced this issue Nov 11, 2022
This enable suffix-based configuration in your editor when editing toots.

Closes ihabunek#219
ihabunek pushed a commit that referenced this issue Nov 11, 2022
This enable suffix-based configuration in your editor when editing toots.

Closes #219
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant