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

Listen does not treat 'sed -i foo' as a modification #288

Closed
e2 opened this issue Dec 18, 2014 · 0 comments
Closed

Listen does not treat 'sed -i foo' as a modification #288

e2 opened this issue Dec 18, 2014 · 0 comments
Assignees
Labels
✨ Feature Adds a new feature

Comments

@e2
Copy link
Contributor

e2 commented Dec 18, 2014

Command: e.g. sed -e 's/foo/bar' -i baz.rb

Expected: modified: ['baz.rb']
Actual: added: ['baz.rb']

The cause:

sed uses the same "overwrite file using move()" technique other editors use for saving files.

But this is not detected like other editor operations, because the sed temporary files created (e.g. sedq7eVAR) are not ignored (if they were, Listen would treat them specially).

Implementation:

The file temp file template used by sed is /sed[[a-zA-Z0-9]]{6}/, but it should not match likely words, like 'sedatives' or possible file names like 'sedan2010'.

@e2 e2 added the ✨ Feature Adds a new feature label Dec 18, 2014
@e2 e2 self-assigned this Dec 18, 2014
@e2 e2 closed this as completed in f5a4b1e Dec 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature Adds a new feature
Projects
None yet
Development

No branches or pull requests

1 participant