Skip to content

Releases: hymkor/csvi

v1.15.1

19 Oct 05:54

Choose a tag to compare

Changes in v1.15.1 in (English)

Specification Changes

  • Removed runtime measurement for ambiguous-width Unicode characters
    Previously, csvi determined the display width of ambiguous-width characters (e.g., ) by printing them and reading the cursor position using ESC[6n].
    This caused issues on some older terminals and added unnecessary complexity, so the feature has been removed.
    The program now relies solely on mattn/go-runewidth for width determination.
    In most cases it works correctly, but if the width is misdetected, you can control it with the environment variable RUNEWIDTH_EASTASIAN:

    • Double-width: set RUNEWIDTH_EASTASIAN=1
    • Single-width: set RUNEWIDTH_EASTASIAN=0 (any non-1 value with at least one character is also valid)

    The options -aw, -an, and -debug-bell have been removed accordingly.

  • Added automatic light-background detection
    When the environment variable COLORFGBG is defined as (FG);(BG) and the foreground value (FG) is smaller than (BG),
    csvi now automatically uses color settings for light backgrounds (equivalent to -rv).

Bug Fixes

  • Fixed an issue where executing echo "ihihi" | csvi -auto "w|-|q|y" > file , resulted in unwanted text
    \r Calibrating terminal... (press any key to skip)\r
    appearing at the beginning of the output file.
    This was caused by fallback handling in the old width-measurement logic, which has now been removed, so the problem no longer occurs.

Internal Changes

  • Moved command-line option parsing from the main package cmd/csvi to the subpackage startup.
  • Removed the deprecated function (Config) Main.

Changes in v1.15.1 in (Japanese)

仕様変更

  • 曖昧幅の Unicode 文字の実測による幅判定を廃止
    曖昧幅(Ambiguous Width)文字(例:)の表示幅を ESC[6n により実測して自動判定していましたが、古い端末で動作しないなどの問題があったため、この方式を廃止しました。
    今後は mattn/go-runewidth による自動判断だけを使用します。ほとんどの環境では正しく動作しますが、まれに誤判定する場合は環境変数 RUNEWIDTH_EASTASIAN で指定してください。

    • 2桁幅にする場合:set RUNEWIDTH_EASTASIAN=1
    • 1桁幅にする場合:set RUNEWIDTH_EASTASIAN=01 以外なら任意の1文字以上で可)

    これに伴い、オプション -aw, -an, -debug-bell を削除しました。

  • 白背景向け配色の自動判定を追加
    環境変数 COLORFGBG(FG);(BG) 形式で定義されており、前景色が背景色より小さい数値の場合、白背景を想定した配色(-rv 相当)を自動適用するようにしました。

不具合修正

  • echo "ihihi" | csvi -auto "w|-|q|y" > file 実行時に、出力の先頭へ \r Calibrating terminal... (press any key to skip)\r が混入する問題を修正しました。原因は、曖昧幅実測が失敗した際のフォロー処理によるもので、この機構の廃止により再発しません。

内部的変更

  • コマンドラインオプション解析処理を "cmd/csvi" から "startup" パッケージへ移動。
  • 非推奨の関数 (Config) Main を削除。

v1.15.0

10 Oct 10:28

Choose a tag to compare

Changes in v1.15.0 in (English)

  • Added key bindings ] and [ to adjust the width of the current column (widen and narrow, respectively).
  • Added -rv option to prevent unnatural colors on terminals with a white background
  • At startup, the width of ambiguous-width Unicode characters was being measured, but on terminals that do not support the cursor position query sequence ESC[6n, this could cause a hang followed by an error. To address this:
    • -aw (treat ambiguous-width characters as 2 cells) and -an (treat ambiguous-width characters as 1 cell) options were added to skip the measurement and explicitly specify the character width.
    • If ESC[6n is not supported, the program now continues without aborting.
  • Suppress color output if the NO_COLOR environment variable is set (following https://no-color.org/ )
  • Added support for FreeBSD/amd64
  • Added API functions (Config) EditFromStringSlice, uncsv.NewRowFromStringSlice and and (*_Application) MessageAndGetKey.
  • Split the "csvi" package into subpackages such as "internal/ansi", "internal/manualctl", "legacy", and "candidate".

Changes in v1.15.0 in (Japanese)

  • 現在カーソルがあるカラムの幅を広げるキー ] と、逆に狭める [ を実装
  • 白背景の端末でも色が不自然にならないよう、-rv オプションを追加
  • 起動時に曖昧幅の Unicode 文字の表示幅を計測していたが、カーソル位置を取得するシーケンス ESC[6n をサポートしない端末では、入力待ちのままエラー終了してしまう問題があった。そのため:
    • 幅を明示的に指定して計測をスキップできる -aw(曖昧幅を2セルとして扱う)および -an(曖昧幅を1セルとして扱う)オプションを追加した。
    • ESC[6n が無効な場合でもエラーとせず、編集を継続できるようにした。
  • 環境変数 NO_COLOR が定義されている場合、カラー表示を抑制するようにした ( https://no-color.org/ に準拠 )
  • FreeBSD/amd64 をサポート
  • API関数: (Config) EditFromStringSlice, uncsv.NewRowFromStringSlice, (*_Application) MessageAndGetKey を追加
  • "csvi" パッケージを "internal/ansi", "internal/manualctl", "legacy", "candidate" などのサブパッケージに分解した

v1.14.0

28 Jun 02:22

Choose a tag to compare

Changes in v0.13.1 and v0.14.0 (English)

  • Added L (Shift-L) command to reload the file using a specified encoding to correct detection errors
    • Encoding name completion is supported.
    • UTF-16LE and UTF-16BE are not supported yet.
  • Added search command (* and #) to find the next occurrence of the current cell's content
  • Made it possible to build with Go 1.20.14 to support Windows 7, 8, and Server 2008 or later.

Changes in v0.13.1 and v0.14.0 (Japanese)

  • エンコーディングの誤判定を修正するため、指定されたエンコーディングでファイルを再読み込みする L (Shift-L) コマンドを追加
    • エンコーディング名の補完に対応
    • UTF-16LE および UTF-16BE には未対応
  • 現在カーソルがあるセルの内容で検索するコマンド *, # を追加
  • Windows 7,8,2008Server 環境での動作を可能にするため、Go 1.20.14 でビルドできるようにした

v1.13.0

14 May 06:17

Choose a tag to compare

v1.13.0 Pre-release
Pre-release

Changes in v1.13.0 (English)

🚀 Experimental Release for macOS Users

This release includes a macOS build for the first time!

We don't have access to a macOS environment, so we can't test it ourselves.
If you're a macOS user and willing to help, please try it and report back through GitHub Issues or Discussions.

Thank you for your support!

Other changes

  • Added -title option to display a title row above the header row.

Please share your thoughts and feedback on this release in Discussion #5 .

Changes in v1.13.0 (Japanese)

🚀 実験的な macOS 版の公開

このリリースでは、初めて macOS 向けバイナリを含めています!
Go 製である本ツールは理論上 macOS でも動作可能ですが、作者自身は macOS を所持しておらず、動作確認ができていません。

そのため今回は、実験的なプレリリースという形で macOS 版を同梱し、動作確認へのご協力をお願いするものです。

✅ 動いた! ❌ ダメだった!

など、Issue ・Discussion などでフィードバックをもらえるととても助かります。

この macOS バイナリは、単に GOOS=darwin としてビルドしたもので、特別な対応は行っていません。今後の正式対応の参考にさせていただきます。

その他の変更

  • -title オプションの追加により、ヘッダー行の上にタイトル行を表示できるようにした。

本リリースについてのご意見・フィードバックは #5 よりお願いいたします。

v1.12.0

08 Oct 09:35

Choose a tag to compare

  • #4 Define the different width for cells. e.g., -w 14,0:10,1:20 means: the first-column has 10 characters wide, the second 20, and other 14. (Thanks to @kevin-gwyrdh)
  • Fix: panic when 0 bytes files (nul or /dev/null) were given

  • #4 列ごとに違う幅を設定できるようにした。例: -w 14,0:10,1:20 1列目は10桁,2列目は20桁,他は14桁とする (Thanks to @kevin-gwyrdh)
  • 0バイトのファイル(nul,/dev/null)を与えるとクラッシュする不具合を修正

v1.11.1

06 Oct 16:11

Choose a tag to compare

Bug fix for the prediction implemented on v1.11.0

  • Fix: the prediction did not start when the original value of the current cell was empty.
  • Fix: the search target for the prediction shifted one column to the right when inserting a cell value with a.

v1.11.0 で実装された予測機能の不具合修正

  • 現行セルのオリジナルの値が空の時、予測表示が始まらない問題を修正
  • a でセル値を挿入する際、予測候補の検索先が一つ右の列にズレていた不具合を修正

__predict

v1.11.0

06 Oct 11:34

Choose a tag to compare

  • While entering text in a cell, automatically display suggestions from cells in the same column that contain the current input. Press or Ctrl-F to accept.) go-readline-ny v1.5.0
  • Support the hankaku-kana mode on the SKK input (Ctrl-Q to enter the hankaku-kana mode from SKK kana mode) go-readline-skk v0.4.0

  • セル編集中に、同じ列で現在入力中のテキストを含むセルのテキストを候補として自動的に表示し、 もしくは Ctrl-F で採用できるようにしました go-readline-ny v1.5.0
  • SKK入力で半角カナ入力をサポート(SKKのかな入力モードでCtrl-Qを押下する) go-readline-skk v0.4.0

v1.10.0

01 Jun 23:34

Choose a tag to compare

Changes from v1.9.1 to v1.10.0 (English)

New features

  • Add new options:-p Protect the header line ( Config.ProtectHeader for package configuration )
  • Do not create a row contains nothing but EOF.
  • When -fixcol is set, the new row which o & O insert has all columns same as the row cursor exists

Fixed bugs

  • When -fixcol is specified
    • Fix: o and O: inserted column was always the first one of the new line
    • Fix: O: the line of cursor is incorrect before new cell text is input
  • Fix timing to close the terminal input was incorrect
    (The cause is unknown; however, the issue has not manifested)

Modifying package

  • Added a mechanism for cell input validation
  • User functions can be assigned to keys
  • Make uncsv.Cell.Original() that returns the original value before modified.
  • csvi.Result has removed rows in a field.
  • Set 14 as the default of csvi.Config.CellWidth
  • Implement csvi.Config.Edit as a function instead of csvi.Config.Main as the entry function for external packages

v1.9.1 から v1.10.0 への変更点 (日本語)

新仕様

  • 新オプション追加:-p ヘッダー行を保護 ( パッケージ用設定:Config.ProtectHeader )
  • EOF だけの行を作成しないようにした
  • -fixcol 指定時、oO で挿入される行は、カーソルのある行と同じ全列を持たせるようにした。

不具合修正

  • カラム数固定(-fixcol)の時
    • oO で入力されたテキストが記入される列がカーソルのあった列ではなく常に先頭列になっていた不具合を修正
    • O でテキストを入力する時の反転セルの行位置がずれている不具合を修正
  • 端末入力(go-tty)のクローズタイミングがおかしかった点を修正
    (なぜか問題として表面化していない)

パッケージ修正

  • セルの入力チェックの仕組みを用意
  • キーに関数を割り当てられるようにした
  • 変更前のセル値を取得する uncsv.Cell.Original() を用意した
  • csvi.Result に削除した行情報を保持させるようにした。
  • csvi.Config.CellWidth のデフォルトを14桁とした
  • 外部へのエントリ関数として、csvi.Config.Main のかわりに csvi.Config.Edit を用意

v1.9.0

08 May 10:54

Choose a tag to compare

  • Add the option -fixcol that disables keys i,a, and x not to shift columns.
  • Move the main function to the sub-package cmd/csvi to be available as a package of Go
  • Add the option -readonly that forbide changing the value of cell. When enabled, "q" shutdowns csvi immediately

  • 列をズレさせないよう、i,a,x などを無効にする オプション -fixcol を追加
  • Goパッケージとして利用できるよう、main 関数をcmd/main へ移動
  • セルの変更を禁止する -readonly オプションの追加。この時は q で確認プロンプトは出さない

v1.8.1

26 Apr 02:46

Choose a tag to compare

  • Fix: crashed on starting csvi with no arguments
  • Fix: a cell were not flipped when the cursor was in a cell with no text.
  • Fix: the foreground color was not black, but gray.
  • Change the case STDOUT or STDERR is used on no arguments to make the content of foo.txt becomes foo\r\n when executing echo "foo" | csvi -auto "w|-|q|y" > foo.txt

  • 引数なしで csvi を起動すると落ちる問題を修正
  • テキストがないセルにカーソルがある時にセルが反転しない問題を修正
  • カーソルの文字色が黒ではなく灰色になっていた不具合を修正
  • echo "foo" | csvi -auto "w|-|q|y" > foo.txt で foo.txt が foo\r\n になるように、引数ゼロ時の標準出力と標準エラー出力の使い分けを変更した。