fix: file type handling on Enter - extensions checked before executable bit

- Reorder Category() to check known extensions (text, config, image,
  pdf, audio, video, archive) before the executable bit check.
  Fixes video/audio/image files with executable bit being opened in
  editor instead of system default application.
- Remove 'executable' from isEditableEntry() - executables are now
  launched via handleExecute() instead of opened in Neovim.
- Add handleExecute() method that runs executable files in the
  terminal via tea.ExecProcess.
- Update handleOpenSelected() to route: text/config -> editor,
  executable -> launch, everything else -> system default (xdg-open).
- Bump version to v0.2.1
This commit is contained in:
vrubelroman 2026-04-27 23:18:48 +03:00
parent c0df75c57e
commit df4df6b8f6
3 changed files with 35 additions and 17 deletions

View file

@ -36,13 +36,13 @@ go build -o vcom ./cmd/vcom
Run directly from the flake:
```bash
nix run github:vrubelroman/vcom?ref=v0.2.0
nix run github:vrubelroman/vcom?ref=v0.2.1
```
Install into user profile:
```bash
nix profile add github:vrubelroman/vcom?ref=v0.2.0
nix profile add github:vrubelroman/vcom?ref=v0.2.1
```
The Nix package wraps `vcom` with `ueberzugpp` in `PATH`, so image preview works in non-`kitty` terminals out of the box.
@ -52,7 +52,7 @@ The Nix package wraps `vcom` with `ueberzugpp` in `PATH`, so image preview works
Download and install the latest release:
```bash
curl -sL https://github.com/vrubelroman/vcom/releases/download/v0.2.0/vcom_0.2.0_amd64.deb -o /tmp/vcom_0.2.0_amd64.deb
curl -sL https://github.com/vrubelroman/vcom/releases/download/v0.2.1/vcom_0.2.1_amd64.deb -o /tmp/vcom_0.2.1_amd64.deb
sudo apt install /tmp/vcom_0.2.0_amd64.deb
```
@ -183,7 +183,7 @@ Built-in themes (use `T` to cycle or set `ui.theme` in config):
## Releases
Pushing a tag like `v0.2.0` triggers GitHub Actions release workflow (`.github/workflows/release.yml`) which:
Pushing a tag like `v0.2.1` triggers GitHub Actions release workflow (`.github/workflows/release.yml`) which:
- runs tests
- vendors Go modules
@ -193,9 +193,9 @@ Pushing a tag like `v0.2.0` triggers GitHub Actions release workflow (`.github/w
Release artifacts:
- `vcom-v0.2.0-x86_64-unknown-linux-gnu.tar.gz`
- `vcom_0.2.0_amd64.deb`
- `vcom-v0.2.0-checksums.txt`
- `vcom-v0.2.1-x86_64-unknown-linux-gnu.tar.gz`
- `vcom_0.2.1_amd64.deb`
- `vcom-v0.2.1-checksums.txt`
## Notes