You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 10, 2018. It is now read-only.
perhaps you could include a -F Force flag that will make C3P overwrite any file without question.
Without -F C3P should always ask for confirmation before opening (and possibly overwriting) an existing file.
This would also mean that the unwashed masses can't have their files overwritten if they forget the -f flag;
Accidents can only happen if -F is included, which would of course be the sole responsibility of the user (rm -rf anyone?)
…th shebang functionality. This should also fix the problem in #7 for the most part. I still want to look at the possibility of a -F force flag for overwriting existing files.
Created system to subdivide commands for reading but not executing within if/else structure.
Made sure normal empty lines get into the output.
Refined number recognition.
Fixed#8.
Signed-off-by: Jeff <[email protected]>
I've just changed the order of the flags in commit 5de7967. The input file is the positional argument at the end (the destination file is given with a -d flag). So this problem of accidental overwrite because of a missing flag will not be a problem anymore.
The reason for changing that order is mostly to do with my wish for this tool to be useful in a shebang (#!).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The invocation
python C3P file.txt
will erase the contents of file.txtThis is a easy typo to make, and it isn't even useful behaviour.
The text was updated successfully, but these errors were encountered: