Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b5aa59a
`edit`: Remove setting null feature from `d`
hymkor Feb 7, 2026
85efca1
Release notes: Mentioned to `edit`: `dd`,`dr`
hymkor Feb 7, 2026
f38dca3
README: Update key-bindings table
hymkor Feb 7, 2026
bb80b89
Merge pull request #35 from hymkor/push-oyrmsxxmsvsp
hymkor Feb 7, 2026
5370998
Release notes: Add PR number #35 (#36)
hymkor Feb 7, 2026
0a45906
Release notes: Mentioned to Csvi#79 (`go work use csvi sqlbless`) (#37)
hymkor Feb 7, 2026
47ed3a7
Stop using deprecated fields: `csvi.KeyEventArgs.CursorRow` and `Curs…
hymkor Feb 8, 2026
1f333d8
go1.20.14.exe get github.com/hymkor/csvi@develop
hymkor Feb 8, 2026
609f437
Release notes: Mentioned to #38
hymkor Feb 8, 2026
edaa5d8
Merge pull request #38 from hymkor/push-nkupvtkttrqt
hymkor Feb 8, 2026
730cb99
`edit`: When no modified, `q` quites immediately without prompt.
hymkor Feb 8, 2026
d1481af
Release notes: Mentioned to #39
hymkor Feb 8, 2026
8c5724d
Merge pull request #39 from hymkor/push-tsmoxsyvvqyz
hymkor Feb 8, 2026
f94f311
go1.20.14.exe get github.com/nyaosorg/go-box/v3@latest (#40)
hymkor Feb 10, 2026
1ae502d
Makefile: `make release` can work on non Windows machines now
hymkor Feb 10, 2026
db91f2d
Makefile: Remove `make get` entry
hymkor Feb 12, 2026
6e10d45
Makefile: Improve `make build`
hymkor Feb 12, 2026
6c9c2ef
Makefile: `make manifest` uses `go run` instead of make-scoop-manifes…
hymkor Feb 12, 2026
c6db43a
Makefile: Use `go run` instead of `minipage.exe`
hymkor Feb 12, 2026
43e8b32
Makefile: Add `make readme` entry
hymkor Feb 12, 2026
24a3dd6
README: Add the badges linked to GitHub Repository
hymkor Feb 12, 2026
febfb9a
Merge pull request #41 from hymkor/push-kstqlxwpsomt
hymkor Feb 14, 2026
7e41aff
Update Csvi to v1.22.0
hymkor Feb 14, 2026
343f851
Bump to v0.27.4
hymkor Feb 14, 2026
8e70111
Update the manifest of the scoop-installer for v0.27.4
hymkor Feb 14, 2026
97dfdd6
Update GitHub Pages for v0.27.4
hymkor Feb 14, 2026
6d0b4f3
Merge pull request #42 from hymkor/release-v0.27.4
hymkor Feb 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ VERSION:=$(shell git describe --tags 2>$(NUL) || echo v0.0.0)
GOOPT:=-ldflags "-s -w -X github.com/hymkor/sqlbless.Version=$(VERSION)"
EXE=$(shell $(GO) env GOEXE)

all:
build:
$(GO) fmt ./...
$(SET) "CGO_ENABLED=0" && $(GO) build $(GOOPT) && $(GO) build -C "$(CURDIR)/cmd/sqlbless" -o "$(CURDIR)/$(NAME)$(EXE)" $(GOOPT)
$(SET) "CGO_ENABLED=0" && $(GO) build -C "$(CURDIR)/cmd/sqlbless" -o "$(CURDIR)" $(GOOPT)

test:
$(GO) test -v ./...

_dist:
$(MAKE) all
$(SET) "CGO_ENABLED=0" && $(GO) build -C "$(CURDIR)/cmd/sqlbless" -o "$(CURDIR)" $(GOOPT)
zip -9 $(NAME)-$(VERSION)-$(GOOS)-$(GOARCH).zip $(NAME)$(EXE)

dist:
Expand All @@ -42,22 +42,17 @@ clean:
$(DEL) *.zip $(NAME)$(EXE)

manifest:
make-scoop-manifest *-windows-*.zip > $(NAME).json
$(GO) run github.com/hymkor/make-scoop-manifest@master -all *-windows-*.zip > $(NAME).json

release:
pwsh -Command "latest-notes.ps1" | gh release create -d --notes-file - -t $(VERSION) $(VERSION) $(wildcard $(NAME)-$(VERSION)-*.zip)

get:
$(GO) get -u
$(GO) get golang.org/x/sys@v0.30.0
# $(GO) get golang.org/x/text@v0.22.0
$(GO) get golang.org/x/term@v0.29.0
$(GO) get golang.org/x/exp@v0.0.0-20240531132922-fd00a4e0eefc
$(GO) mod tidy
# cd "$(CURDIR)/cmd/sqlbless" && $(GO) get -u && $(GO) mod tidy
$(GO) run github.com/hymkor/latest-notes@latest | gh release create -d --notes-file - -t $(VERSION) $(VERSION) $(wildcard $(NAME)-$(VERSION)-*.zip)

docs:
minipage -outline-in-sidebar -readme-to-index README.md > docs/index.html
minipage -outline-in-sidebar -readme-to-index README_ja.md > docs/index_ja.html
go run github.com/hymkor/minipage@latest -outline-in-sidebar -readme-to-index README.md > docs/index.html
go run github.com/hymkor/minipage@latest -outline-in-sidebar -readme-to-index README_ja.md > docs/index_ja.html

readme:
go run github.com/hymkor/example-into-readme@latest
go run github.com/hymkor/example-into-readme@latest -target README_ja.md

.PHONY: all test dist _dist clean manifest release docs
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
SQL-Bless
===========

<!-- badges.cmd | -->
<!-- stdout:go run github.com/hymkor/example-into-readme/cmd/badges@latest -->
[![Go Test](https://github.com/hymkor/sqlbless/actions/workflows/go.yml/badge.svg)](https://github.com/hymkor/sqlbless/actions/workflows/go.yml)
[![License](https://img.shields.io/badge/License-MIT-red)](https://github.com/hymkor/sqlbless/blob/master/LICENSE)
[![Go Reference](https://pkg.go.dev/badge/github.com/hymkor/sqlbless.svg)](https://pkg.go.dev/github.com/hymkor/sqlbless)
[![GitHub](https://img.shields.io/badge/github-repo-blue?logo=github)](https://github.com/hymkor/sqlbless)
<!-- -->

**&lt;English&gt;** / [&lt;Japanese&gt;](./README_ja.md)
Expand Down Expand Up @@ -95,11 +96,16 @@ Supported commands
- `EDIT [tablename [WHERE conditions...]]`
- Start an [editor][csvi] to modify the selected records of the table.
- In the editor, these keys are bound.

| Key | Bindings
|-------|-----------------------------
|`x`,`d`| Set NULL to the current cell
|`q` | Quit editor with confirmation to apply or discard changes

| Key | Action |
| --- | --- |
| `r` | Replace cell value (using built-in readline) |
| `o` | Append a new row |
| `dd`, `dr` | **Delete the current row** |
| `x` | **Set the current cell to NULL** |
| `q` | Quit editor (with apply/discard confirmation) |

**Note:** The `D` key is disabled to prevent accidental execution due to terminal escape sequence delays. Please use `dd` or `dr` instead.

- Because the EDIT statement automatically generates SQL from data changed in the editor, it may not be able to properly represent SQL data for special types specific to individual databases. If you find it, we would appreciate it if you could [contact us](https://github.com/hymkor/sqlbless/issues/new).
- `HOST command-line`
Expand Down
17 changes: 12 additions & 5 deletions README_ja.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
SQL-Bless
=========

<!-- badges.cmd | -->
<!-- stdout:go run github.com/hymkor/example-into-readme/cmd/badges@latest -->
[![Go Test](https://github.com/hymkor/sqlbless/actions/workflows/go.yml/badge.svg)](https://github.com/hymkor/sqlbless/actions/workflows/go.yml)
[![License](https://img.shields.io/badge/License-MIT-red)](https://github.com/hymkor/sqlbless/blob/master/LICENSE)
[![Go Reference](https://pkg.go.dev/badge/github.com/hymkor/sqlbless.svg)](https://pkg.go.dev/github.com/hymkor/sqlbless)
[![GitHub](https://img.shields.io/badge/github-repo-blue?logo=github)](https://github.com/hymkor/sqlbless)
<!-- -->

[&lt;English&gt;](./README.md) / **&lt;Japanese&gt;**
Expand Down Expand Up @@ -94,10 +95,16 @@ SQL-Bless は、そうした現場での教訓から生まれた、安全で再
- 選択したテーブルのレコードを修正するため [エディタ][csvi] を起動します
- エディタ中では以下のキーが拡張されます

| Key | Bindings
|-------|-----------------------------
|`x`,`d`| セルに NULL をセットする
|`q` | 変更を適用するかを確認してから終了
| キー | 操作内容 |
| --- | --- |
| `r` | カレントセルを組み込みの readline で編集する |
| `o` | 新しい行を末尾に追加する |
| `dd`, `dr` | カレント行を削除する |
| `x` | カレントセルに NULL を設定する |
| `q` | エディタを終了する(変更の適用または破棄を確認) |

**※** ターミナルのエスケープシーケンス遅延による誤作動を防ぐため、`D` キーによる削除は無効化された。行の削除には `dd` または `dr` を使用のこと


- EDIT文は、エディターでの変更データから自動で SQL を生成する都合、個々のデータベース固有の特殊な型向けの SQL データをうまく表現できない場合があります。見つかりましたら、[ご連絡](https://github.com/hymkor/sqlbless/issues/new)いただけるとたすかります。
- `HOST command-line`
Expand Down
4 changes: 2 additions & 2 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ func doDescTables(ctx context.Context, ss *session, commandIn commandIn) error {
var name string

handler := func(e *csvi.KeyEventArgs) (*csvi.CommandResult, error) {
if e.CursorRow.Index() == 0 {
if e.CurrentRow().Index() == 0 {
return &csvi.CommandResult{}, nil
}
header := e.Front()
for i, c := range header.Cell {
if strings.EqualFold(c.Text(), ss.Dialect.TableNameField) {
name = e.CursorRow.Cell[i].Text()
name = e.CurrentRow().Cell[i].Text()
return &csvi.CommandResult{Quit: true}, nil
}
}
Expand Down
28 changes: 21 additions & 7 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1140,11 +1140,12 @@
</head><body>
<div class="main markdown-body">
<h1 id="sql-bless">SQL-Bless</h1>
<!-- raw HTML omitted -->
<!-- stdout:go run github.com/hymkor/example-into-readme/cmd/badges@latest -->
<p><a href="https://github.com/hymkor/sqlbless/actions/workflows/go.yml"><img src="https://github.com/hymkor/sqlbless/actions/workflows/go.yml/badge.svg" alt="Go Test" /></a>
<a href="https://github.com/hymkor/sqlbless/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-red" alt="License" /></a>
<a href="https://pkg.go.dev/github.com/hymkor/sqlbless"><img src="https://pkg.go.dev/badge/github.com/hymkor/sqlbless.svg" alt="Go Reference" /></a></p>
<!-- raw HTML omitted -->
<a href="https://pkg.go.dev/github.com/hymkor/sqlbless"><img src="https://pkg.go.dev/badge/github.com/hymkor/sqlbless.svg" alt="Go Reference" /></a>
<a href="https://github.com/hymkor/sqlbless"><img src="https://img.shields.io/badge/github-repo-blue?logo=github" alt="GitHub" /></a></p>
<!-- -->
<p><strong>&lt;English&gt;</strong> / <a href="./index_ja.html">&lt;Japanese&gt;</a></p>
<p>SQL-Bless is a command-line database client similar to SQL*Plus, supporting multiple database systems.</p>
<p>It was designed with reliability and transparency in mind.
Expand Down Expand Up @@ -1306,20 +1307,33 @@ <h2 id="supported-commands">Supported commands</h2>
<thead>
<tr>
<th>Key</th>
<th>Bindings</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>x</code>,<code>d</code></td>
<td>Set NULL to the current cell</td>
<td><code>r</code></td>
<td>Replace cell value (using built-in readline)</td>
</tr>
<tr>
<td><code>o</code></td>
<td>Append a new row</td>
</tr>
<tr>
<td><code>dd</code>, <code>dr</code></td>
<td><strong>Delete the current row</strong></td>
</tr>
<tr>
<td><code>x</code></td>
<td><strong>Set the current cell to NULL</strong></td>
</tr>
<tr>
<td><code>q</code></td>
<td>Quit editor with confirmation to apply or discard changes</td>
<td>Quit editor (with apply/discard confirmation)</td>
</tr>
</tbody>
</table>
<p><strong>Note:</strong> The <code>D</code> key is disabled to prevent accidental execution due to terminal escape sequence delays. Please use <code>dd</code> or <code>dr</code> instead.</p>
</li>
<li>
<p>Because the EDIT statement automatically generates SQL from data changed in the editor, it may not be able to properly represent SQL data for special types specific to individual databases. If you find it, we would appreciate it if you could <a href="https://github.com/hymkor/sqlbless/issues/new">contact us</a>.</p>
Expand Down
30 changes: 22 additions & 8 deletions docs/index_ja.html
Original file line number Diff line number Diff line change
Expand Up @@ -1140,11 +1140,12 @@
</head><body>
<div class="main markdown-body">
<h1 id="sql-bless">SQL-Bless</h1>
<!-- raw HTML omitted -->
<!-- stdout:go run github.com/hymkor/example-into-readme/cmd/badges@latest -->
<p><a href="https://github.com/hymkor/sqlbless/actions/workflows/go.yml"><img src="https://github.com/hymkor/sqlbless/actions/workflows/go.yml/badge.svg" alt="Go Test" /></a>
<a href="https://github.com/hymkor/sqlbless/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-red" alt="License" /></a>
<a href="https://pkg.go.dev/github.com/hymkor/sqlbless"><img src="https://pkg.go.dev/badge/github.com/hymkor/sqlbless.svg" alt="Go Reference" /></a></p>
<!-- raw HTML omitted -->
<a href="https://pkg.go.dev/github.com/hymkor/sqlbless"><img src="https://pkg.go.dev/badge/github.com/hymkor/sqlbless.svg" alt="Go Reference" /></a>
<a href="https://github.com/hymkor/sqlbless"><img src="https://img.shields.io/badge/github-repo-blue?logo=github" alt="GitHub" /></a></p>
<!-- -->
<p><a href="./index.html">&lt;English&gt;</a> / <strong>&lt;Japanese&gt;</strong></p>
<p>SQL-Bless は、SQL*Plus に着想を得た、複数のデータベースエンジンに対応するコマンドライン用 SQL クライアントです。</p>
<p>SQL-Bless は「安全性と再現性」を最優先に設計されています。
Expand Down Expand Up @@ -1303,21 +1304,34 @@ <h2 id="%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89
<table>
<thead>
<tr>
<th>Key</th>
<th>Bindings</th>
<th>キー</th>
<th>操作内容</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>x</code>,<code>d</code></td>
<td>セルに NULL をセットする</td>
<td><code>r</code></td>
<td>カレントセルを組み込みの readline で編集する</td>
</tr>
<tr>
<td><code>o</code></td>
<td>新しい行を末尾に追加する</td>
</tr>
<tr>
<td><code>dd</code>, <code>dr</code></td>
<td>カレント行を削除する</td>
</tr>
<tr>
<td><code>x</code></td>
<td>カレントセルに NULL を設定する</td>
</tr>
<tr>
<td><code>q</code></td>
<td>変更を適用するかを確認してから終了</td>
<td>エディタを終了する(変更の適用または破棄を確認)</td>
</tr>
</tbody>
</table>
<p><strong>※</strong> ターミナルのエスケープシーケンス遅延による誤作動を防ぐため、<code>D</code> キーによる削除は無効化された。行の削除には <code>dd</code> または <code>dr</code> を使用のこと</p>
</li>
<li>
<p>EDIT文は、エディターでの変更データから自動で SQL を生成する都合、個々のデータベース固有の特殊な型向けの SQL データをうまく表現できない場合があります。見つかりましたら、<a href="https://github.com/hymkor/sqlbless/issues/new">ご連絡</a>いただけるとたすかります。</p>
Expand Down
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,23 @@ go 1.20
require (
github.com/glebarez/go-sqlite v1.22.0
github.com/go-sql-driver/mysql v1.8.1
github.com/hymkor/csvi v1.21.1
github.com/hymkor/csvi v1.22.0
github.com/hymkor/go-multiline-ny v0.22.4
github.com/hymkor/go-shellcommand v0.0.2
github.com/hymkor/struct2flag v0.0.4
github.com/lib/pq v1.10.9
github.com/mattn/go-colorable v0.1.14
github.com/mattn/go-isatty v0.0.20
github.com/microsoft/go-mssqldb v1.7.2
github.com/nyaosorg/go-box/v3 v3.0.0
github.com/nyaosorg/go-box/v3 v3.1.1
github.com/nyaosorg/go-readline-ny v1.14.1
github.com/nyaosorg/go-ttyadapter v0.3.0
github.com/sijms/go-ora/v2 v2.8.22
)

require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/clipperhouse/stringish v0.1.1 // indirect
github.com/clipperhouse/uax29/v2 v2.3.0 // indirect
github.com/clipperhouse/uax29/v2 v2.6.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
github.com/golang-sql/sqlexp v0.1.0 // indirect
Expand Down
14 changes: 6 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xO
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw=
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA=
github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs=
github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA=
github.com/clipperhouse/uax29/v2 v2.3.0 h1:SNdx9DVUqMoBuBoW3iLOj4FQv3dN5mDtuqwuhIGpJy4=
github.com/clipperhouse/uax29/v2 v2.3.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g=
github.com/clipperhouse/uax29/v2 v2.6.0 h1:z0cDbUV+aPASdFb2/ndFnS9ts/WNXgTNNGFoKXuhpos=
github.com/clipperhouse/uax29/v2 v2.6.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
Expand All @@ -25,8 +23,8 @@ github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EO
github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hymkor/csvi v1.21.1 h1:8rgQgH0mGTeuzabk7cN53g87LwoR/uMQIAmIEqIk0bo=
github.com/hymkor/csvi v1.21.1/go.mod h1:zm4EcSzlGiiCtPWq77a+L3Q5IpJufIEX0q4iIGKXZhs=
github.com/hymkor/csvi v1.22.0 h1:fvUDS81s5LReepPjSI+/PWVmWlnxAYyL6SUILOOooO8=
github.com/hymkor/csvi v1.22.0/go.mod h1:zm4EcSzlGiiCtPWq77a+L3Q5IpJufIEX0q4iIGKXZhs=
github.com/hymkor/go-multiline-ny v0.22.4 h1:Ag2rkBpDnr3jp+AHe1CuXSOQ4AQ8D0+gBNVf+BAX+/0=
github.com/hymkor/go-multiline-ny v0.22.4/go.mod h1:v2lqQooHVAO53WICAIbgTn74bQtzsg4tFn29d+7JPwY=
github.com/hymkor/go-shellcommand v0.0.2 h1:6+XG2h/9DGk5i3Oh4rU48z/nsPWx4Sp73s6OpryQtyw=
Expand All @@ -50,8 +48,8 @@ github.com/microsoft/go-mssqldb v1.7.2 h1:CHkFJiObW7ItKTJfHo1QX7QBBD1iV+mn1eOyRP
github.com/microsoft/go-mssqldb v1.7.2/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/nyaosorg/go-box/v3 v3.0.0 h1:W5qfScEkKBoD68gbP/lwfWlvcTRB0rwXkhL+9iC62xI=
github.com/nyaosorg/go-box/v3 v3.0.0/go.mod h1:70GsE9mIh7JKVCxt71q3jEijO6C9YJmOZqWpPa9w+GY=
github.com/nyaosorg/go-box/v3 v3.1.1 h1:iTWE0MOTlD52yEySfhdN6nonX7Uagkn985xQZM6sCyI=
github.com/nyaosorg/go-box/v3 v3.1.1/go.mod h1:kuRLL+x9n7kqIAiSZRXgNxP+HJVelsCKplo2TQSnWIo=
github.com/nyaosorg/go-inline-animation v0.3.0 h1:LrOHowED2PrXEUWGagL1bLR+XTXD06EoWnLRAAn0PWc=
github.com/nyaosorg/go-inline-animation v0.3.0/go.mod h1:GLb7BXeLMuA12LMN3c8l69GQcmlAxit3oZRKILztOsU=
github.com/nyaosorg/go-readline-ny v1.14.1 h1:bWyXpR6jRaCXysx4bnioxk36+YjQ6dypHKMjHnzIXdk=
Expand Down
14 changes: 14 additions & 0 deletions release_note_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ Release notes (English)
=======================
( **English** / [Japanese](release_note_ja.md) )

v0.27.4
-------
Feb 14, 2026

- `edit` statement: Restore row deletion commands (`dd`, `dr`):
Fixed a keybinding conflict that rendered row deletion unavailable. The `d` key has been unassigned from the "Set Null" function to restore the `dd` and `dr` commands, following specification changes in Csvi. Field Null assignment remains available via the `x` key. (#35)
- `edit` statement: Prevent creation of empty lines at the end of the editable CSV content. ([csvi#79])
- (internal changes) Stop using deprecated fields: `csvi.KeyEventArgs.CursorRow` and `CursorCol` ([csvi#80],#38)
- `edit` statement: Quit immediately on `q` without a prompt if there are no changes.([csvi#81],#39)

[csvi#79]: https://github.com/hymkor/csvi/pull/79
[csvi#80]: https://github.com/hymkor/csvi/pull/80
[csvi#81]: https://github.com/hymkor/csvi/pull/81

v0.27.3
-------
Feb 6, 2026
Expand Down
14 changes: 14 additions & 0 deletions release_note_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ Release notes (Japanese)
========================
( [English](release_note_en.md) / **Japanese** )

v0.27.4
-------
Feb 14, 2026

- `edit`文: 行削除コマンド(`dd`, `dr`)の復旧
レコードの削除操作(`dd`, `dr`)を再び利用可能にした。以前のバージョンでは、Null設定機能を `d` キーにも割り当てていたため、Csvi側の仕様変更(`D` の廃止)に伴い、行削除が実行できない状態になっていた。今回、`d` へのNull設定機能を解除することでこの競合を解消した。※Null設定機能は、引き続き `x` キーで利用可能。 (#35)
- `edit`文: 編集対象の CSV データ末尾に空行が生成されないようにした。([csvi#79])
- (内部修正) 廃止予定のフィールド `csvi.KeyEventArgs.CursorRow` と `CursorCol` 使わないようにした ([csvi#80],#38)
- `edit`文: 変更がない場合は `q` で確認なしに終了するようにした。([csvi#81],#39)

[csvi#79]: https://github.com/hymkor/csvi/pull/79
[csvi#80]: https://github.com/hymkor/csvi/pull/80
[csvi#81]: https://github.com/hymkor/csvi/pull/81

v0.27.3
-------
Feb 6, 2026
Expand Down
14 changes: 9 additions & 5 deletions spread/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,27 @@ func (viewer *Viewer) edit(title string, validate func(*csvi.CellValidatedEvent)

applyChange := false
setNull := func(e *csvi.KeyEventArgs) (*csvi.CommandResult, error) {
if e.CursorRow.Index() < viewer.HeaderLines {
if e.CurrentRow().Index() < viewer.HeaderLines {
return &csvi.CommandResult{}, nil
}
ce := &csvi.CellValidatedEvent{
Text: viewer.Null,
Row: e.CursorRow.Index(),
Col: e.CursorCol,
Row: e.CurrentRow().Index(),
Col: e.CurrentCol(),
}
if _, err := validate(ce); err != nil {
return &csvi.CommandResult{Message: err.Error()}, nil
}
e.CursorRow.Replace(e.CursorCol, viewer.Null, &uncsv.Mode{Comma: viewer.Comma})
e.CurrentRow().Replace(e.CurrentCol(), viewer.Null, &uncsv.Mode{Comma: viewer.Comma})
return &csvi.CommandResult{}, nil
}

quit := func(app *csvi.KeyEventArgs) (*csvi.CommandResult, error) {
if !app.IsDirty() {
io.WriteString(app, "\n")
return &csvi.CommandResult{Quit: true}, nil
}

ch, err := app.MessageAndGetKey(`"Y": Save&Exit "N": Discard&Exit <ESC>: Cancel(edit)`)
if err != nil {
return nil, err
Expand All @@ -95,7 +100,6 @@ func (viewer *Viewer) edit(title string, validate func(*csvi.CellValidatedEvent)
keymap := map[string]func(*csvi.KeyEventArgs) (*csvi.CommandResult, error){
"q": quit,
"x": setNull,
"d": setNull,
}
for _, p := range viewer.OnEvents {
keymap[p.Key] = p.Handler
Expand Down
Loading