436 Commits

Author SHA1 Message Date
Alexandre Pasmantier
cc27b5ec6b refactor: drop dependency to the ignore crate (#493) 2025-05-01 23:05:56 +02:00
Alexandre Pasmantier
f887a2390e
feat(cli): add a --ui-scale [0,100] cli parameter (#492) 2025-05-01 20:46:05 +02:00
github-actions[bot]
64c599ef10
chore(changelog): update changelog (auto) (#491)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-05-01 17:43:30 +02:00
Alexandre Pasmantier
b9f42e8c29
refactor(preview): simplify channel previews code and remove intermediate PreviewKind struct (#490) 2025-05-01 17:42:01 +02:00
Swann Castel
dbff3a330b
fix(alias): move terminal raw mode before loading bat assets #444 (#484) 2025-04-29 21:42:12 +02:00
Alexandre Pasmantier
e2f52b835d
refactor(cable): improve naming and documentation for prototypes.rs (#487) 2025-04-29 18:31:57 +02:00
Alexandre Pasmantier
4385317e06
refactor(cable): split cable related code into separate submodules (#486)
This refactors `television/channels/cable.rs` into two additional
submodules:
- `television/channels/cable/preview.rs`
- `television/channels/cable/prototypes.rs`
2025-04-29 18:07:42 +02:00
Alexandre Pasmantier
0514a914b6
fix(alias): rename the aliases channel to alias (#485) 2025-04-29 17:41:57 +02:00
Alexandre Pasmantier
d3bb3b0a56
docs: cleanup old todo list (#483) 2025-04-28 00:10:58 +02:00
Alexandre Pasmantier
c2f4cc258f
refactor: tv no longer needs to write the default cable channel recipes to the user's configuration directory (#482)
The cable channel prototypes are now compiled into the binary itself,
and users can override them with a custom cable file.
2025-04-28 00:04:38 +02:00
Alexandre Pasmantier
67677fb917
refactor!: all channels are now cable channels (#479)
- tv's default channel (when lauching `tv`) is now configurable via the
`default_channel` configuration option
- add `RUST_BACKTRACE=1` and `--nocapture` to ci testing for better
debugging
- remove all builtin channels and associated glue code as well as the
`ToCliChannel` and `ToUnitChannel` derive macros
- recode all builtin channels using shell commands (along with `fd`,
`bat`, and `rg`)
- add support for interactive shell commands inside cable channels
- drop the `send_to_channel` feature until further notice (will be
reimplemented later on in a more generic and customizable way)
2025-04-27 23:50:14 +02:00
nkxxll
1f0c178a2d
fix(results): remove keymap hint if help is disabled (#480)
fixes #471
2025-04-26 00:09:49 +00:00
github-actions[bot]
a602dda347
chore(changelog): update changelog (auto) (#478)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-04-22 01:26:31 +02:00
Alexandre Pasmantier
f28c18ed64 chore: release version 0.11.9 0.11.9 2025-04-22 01:22:23 +02:00
nkxxll
bbbdcb0271
feat(cli): add substring matching with --exact flag (#477)
fixes #368 

@alexpasmantier I tried to parse down the exact flag to the find method,
but I can't find an elegant way to do so because the channel creates its
own configurations for the matcher inside of the `new` method. I started
adding the exact flag to the new function of each of the channels but it
just does not seem right to do so. Do you have an idea on how to improve
the change? I would think of passing the config struct to the new
function and exposing the config of the channel for channel transitions,
but I'm not sure... 🤔

I have done it here for the stdin channel just to show you how it would
look like and it works fine😄! Looking forward to hearing your thoughts
on that 👍

ref issue: #368

---------

Co-authored-by: Alexandre Pasmantier <alex.pasmant@gmail.com>
2025-04-22 00:37:07 +02:00
Alexandre Pasmantier
ce02824f3c
perf(stdin): avoid unnecessary allocations when streaming from stdin (#475) 2025-04-20 23:11:02 +02:00
github-actions[bot]
433d7fa270
chore(changelog): update changelog (auto) (#474)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-04-20 19:58:50 +00:00
Alex Pasmantier
b4438ab835 chore: bump to 0.11.8 0.11.8 2025-04-20 21:44:41 +02:00
nkxxll
0bd4d4274e
feat(cli): add custom header for input field (#472)
#362 

Add a custom header and the cli flag for the input field.

Maybe I should replace channel name with header name in the draw method
instead of checking in the draw loop whether the header is there or
not...

Co-authored-by: Alexandre Pasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-04-20 19:20:14 +00:00
Alexandre Pasmantier
a938c1c469
perf(ui): add frame rate throttling to avoid consuming unnecessary CPU resources (#473)
This adds quite a nice bump to overall UI reactiveness.
2025-04-20 18:51:27 +02:00
Alexandre Pasmantier
2be2ae7cde
fix(unicode): add support for more unicode characters (#470) 2025-04-18 12:11:13 +00:00
Alexandre Pasmantier
315a9f71fa
test(benches): refactor benches into a simpler and more scalable structure (#467) 2025-04-14 17:41:16 +00:00
github-actions[bot]
ec8a7dbfc3
chore(changelog): update changelog (auto) (#465)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-04-12 21:18:55 +00:00
Alex Pasmantier
169358442b chore: bump to 0.11.7 0.11.7 2025-04-12 23:15:18 +02:00
Alexandre Pasmantier
cb0a46fff5
feat(input): add action to delete input line (#464)
This is hard-coded to be bound to <kbd>C-u</kbd> by default.

With tv's default keybindings configuration, this is overriden by
`scroll_preview_half_page_up` which means users will need to bind that
to something else in order to "unlock" that delete-line functionality.
2025-04-12 21:09:12 +00:00
Alexandre Pasmantier
6771ecdde5
chore(project): migrate from Makefile to Just (#463)
```
Available recipes:
    br                   # Build the project in release mode
    build profile='dev'  # Build the project with the specified profile (dev by default) [alias: b]
    check                # Check the project for errors and warnings [alias: c]
    clean                # Clean up cargo build artifacts
    default              # List all available commands
    fix                  # Fix linting and formatting errors [alias: f]
    format               # Format the code using cargo fmt
    lint                 # Lint the code using cargo clippy
    release kind='patch' # Publish a new release (major, minor, or patch) [alias: rl]
    run                  # Run the program in debug mode with logs enabled [alias: r]
    setup                # Setup the project environment for local development
    test                 # Run the tests for the project [alias: t]
    update-changelog     # Update the project's changelog
    update-man           # Update the project's manpages [alias: m]
```
2025-04-12 20:36:29 +00:00
Alexandre Pasmantier
425be1e01b
fix(ui): fix slight responsiveness regression in 0.11.6 (#461)
We were drawing an excessive amount of frames while any channel was in
its `running` state which resulted in rendering operations monopolizing
CPU resources thus making the application appear less responsive to the
user.

Fixes #459
2025-04-12 10:29:03 +00:00
Daniel Mar
de6200e45d
feat(shell): support completion in the middle of a prompt (#450)
I think it's better to insert our output at the cursor so this can be
invoked in the middle of a prompt. Previously we would assume the cursor
is at the end of the prompt and invocation in the middle of one would
discard everything after the cursor.

---------

Co-authored-by: Alexandre Pasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-04-11 13:22:58 +00:00
github-actions[bot]
e23c307649
chore(changelog): update changelog (auto) (#458)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-04-09 22:05:14 +00:00
Alexandre Pasmantier
a008d3f4b4
chore: bump to 0.11.6 (#457) 0.11.6 2025-04-09 22:02:32 +00:00
Alexandre Pasmantier
5bf3d20c83
feat(cli): add a --no-help flag to allow disabling showing the help panel (#456)
This will disable the help panel and associated toggling actions
entirely. This is useful when the help panel is not needed or
when the user wants `tv` to run with a minimal interface (e.g. when
using it as a file picker for a script or embedding it in a larger
application).
2025-04-09 21:46:16 +00:00
Alexandre Pasmantier
b81873738a
feat(cli): add a --no-remote flag to lock the application on the cli-invoked channel (#455)
This will disable the remote control panel and associated actions
entirely. This is useful when the remote control is not needed or when
the user wants `tv` to run in single-channel mode (e.g. when using it as
a file picker for a script or embedding it in a larger application).
2025-04-09 19:55:12 +00:00
Alexandre Pasmantier
4a584b437c
fix(pwsh): use adequate quoting when formatting preview commands for pwsh (#454)
Fixes #382 and #381


![image](https://github.com/user-attachments/assets/6513cea7-fd42-40e0-8d3b-6bf687f846ca)
2025-04-09 19:02:58 +00:00
dependabot[bot]
6d26db2993
chore(deps): bump tokio from 1.44.1 to 1.44.2 (#453)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.44.1 to 1.44.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.44.2</h2>
<p>This release fixes a soundness issue in the broadcast channel. The
channel
accepts values that are <code>Send</code> but <code>!Sync</code>.
Previously, the channel called
<code>clone()</code> on these values without synchronizing. This release
fixes the channel
by synchronizing calls to <code>.clone()</code> (Thanks Austin Bonander
for finding and
reporting the issue).</p>
<h3>Fixed</h3>
<ul>
<li>sync: synchronize <code>clone()</code> call in broadcast channel (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7232">#7232</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/7232">#7232</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7232">tokio-rs/tokio#7232</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ec4b1d7215"><code>ec4b1d7</code></a>
chore: forward port 1.43.x</li>
<li><a
href="e3c3a56718"><code>e3c3a56</code></a>
Merge branch 'tokio-1.43.x' into forward-port-1.43.x</li>
<li><a
href="a7b658c35b"><code>a7b658c</code></a>
chore: prepare Tokio v1.43.1 release</li>
<li><a
href="c1c8d1033d"><code>c1c8d10</code></a>
Merge remote-tracking branch 'origin/tokio-1.38.x' into
forward-port-1.38.x</li>
<li><a
href="aa303bc205"><code>aa303bc</code></a>
chore: prepare Tokio v1.38.2 release</li>
<li><a
href="7b6ccb515f"><code>7b6ccb5</code></a>
chore: backport CI fixes</li>
<li><a
href="4b174ce2c9"><code>4b174ce</code></a>
sync: fix cloning value when receiving from broadcast channel</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.44.1...tokio-1.44.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.44.1&new-version=1.44.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/alexpasmantier/television/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-08 12:48:11 +00:00
Daniel Mar
d4913d73f6
fix: silence the string match in tv_smart_autocomplete (#449) 2025-04-07 07:48:41 +00:00
Alexandre Pasmantier
4892dc3c3c
feat(cli): add --select-1 cli flag to automatically select unique result (#448)
Adds a `--select-1` flag that enables `tv` to automatically select the
only result and exit when such a case appears.

Fixes #440
2025-04-06 22:00:04 +00:00
Alexandre Pasmantier
69c4dcc5c5
refactor(debug): improve configuration debug logging (#447) 2025-04-06 17:28:35 +00:00
Alexandre Pasmantier
82e3f890c8
refactor(passthrough)!: drop support for unused passthrough keybindings (#446)
BREAKING CHANGE: the CLI `passthrough_keybindings` are no longer
available. This feature wasn't used anywhere to my knowledge (github
search) and was adding unnecessary complexity to the code.
2025-04-06 16:16:41 +00:00
github-actions[bot]
8b267bb1ff
chore(changelog): update changelog (auto) (#443)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-04-01 01:36:17 +02:00
Alexandre Pasmantier
875b63defe chore: bump to 0.11.5 0.11.5 2025-04-01 01:31:51 +02:00
Alexandre Pasmantier
6ba235fa11
fix(results): fix alignment for non unit width unicode characters (#442)
Fixes #439
2025-04-01 01:30:18 +02:00
github-actions[bot]
f9a49acccf
chore(changelog): update changelog (auto) (#436)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-03-23 16:59:02 +01:00
Alexandre Pasmantier
5f8b240c8b chore: bump to 0.11.4 0.11.4 2025-03-23 16:56:53 +01:00
Alexandre Pasmantier
8e17ef694e
refactor: nicer results alignment to improve discoverability of matched patterns (#435)
<img width="1018" alt="Screenshot 2025-03-23 at 16 13 54"
src="https://github.com/user-attachments/assets/89777043-e98f-464c-b508-0c0dce9d4b26"
/>

Fixes #373
2025-03-23 16:20:58 +01:00
github-actions[bot]
b81e0df791
chore(changelog): update changelog (auto) (#433) 2025-03-21 23:23:09 +01:00
Alexandre Pasmantier
dae6a8816a chore: bump to 0.11.3 0.11.3 2025-03-21 22:00:05 +01:00
Alexandre Pasmantier
c573503cbf
fix(config): fix shell integration keybindings not overwriting defaults (#431)
Fixes #430
2025-03-21 21:33:53 +01:00
Alexandre Pasmantier
f8bd6c2dd5
ci(x86): add statically linked musl build for x86_64 (#429)
Fixes #339 

```
$ ldd target/x86_64-unknown-linux-musl/release/tv
        statically linked
```
2025-03-21 13:03:58 +01:00
github-actions[bot]
5752402237
chore(changelog): update changelog (auto) (#428)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-03-21 02:12:16 +01:00
Alexandre Pasmantier
918dc6686d chore: bump to 0.11.2 0.11.2 2025-03-21 01:12:45 +01:00