Skip to content

v0.2.0

Latest
Compare
Choose a tag to compare
@hymkor hymkor released this 31 Mar 12:01
· 3 commits to master since this release
  • Fix error occurred on Windows when cat -n < FILE | sponge FILE was executed because the shell did not close FILE.
    (Just rename once and at least complete the replacement)
  • Implement the new option: -b SUFFIX to rename and keep the original file with suffix.
  • Now terminates with an error when a file with the same name as a temporary file exists
  • The permission of new files are set same as original files now.
  • Use (original-name)-sponge(process-id) as the format for temporary filenames
  • Zero byte files are not created even when errors or interrupts stop
  • -h: print args[0], version, GOOS, GOARCH to the standard error output

  • Windows で cat -n < FILE | sponge FILE 形式で実行した時、シェルが FILE をクローズしていないため、エラーになる不具合を修正 (一旦、リネームだけして、少なくとも差し替えだけは完了させるようにした)
  • 元ファイルを別名で残すオプションを用意(-b 接尾語)
  • 一時ファイルと同名のファイルが存在している時、エラー終了させるようにした
  • 新ファイルのパーミッションを旧ファイルと同じになるようにした。
  • 一時ファイルのフォーマットとして (original-name)-sponge(process-id) を使うようにした
  • エラーや Ctrl-C で中断された時、ゼロバイトのファイルを作成しないようにした
  • -h で、args[0], バージョン, OS, GOARCH を標準エラー出力に表示するようにした。