diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5ffa31..70779bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,10 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@nightly - uses: Swatinem/rust-cache@v2 + - name: Install fd + run: sudo apt-get install -y fd-find - name: Run tests - run: cargo test --locked --all-features --workspace + run: cargo test --locked --all-features --workspace -- --nocapture rustfmt: name: Rustfmt diff --git a/Cargo.lock b/Cargo.lock index 40f138e..3bb1c30 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2252,7 +2252,7 @@ dependencies = [ [[package]] name = "television-derive" -version = "0.0.26" +version = "0.0.27" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 42a9a10..d7460c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ build = "build.rs" path = "television/lib.rs" [dependencies] -television-derive = { path = "television-derive", version = "0.0.26" } +television-derive = { path = "television-derive", version = "0.0.27" } anyhow = "1.0" base64 = "0.22.1" diff --git a/cable/windows-channels.toml b/cable/windows-channels.toml index 6d39f84..e76f4a2 100644 --- a/cable/windows-channels.toml +++ b/cable/windows-channels.toml @@ -1,31 +1,29 @@ # Files [[cable_channel]] name = "files" -source_command = "Get-ChildItem -Recurse -File" +source_command = "Get-ChildItem -Recurse -File | Select-Object -ExpandProperty FullName" preview_command = ":files:" # Directories [[cable_channel]] name = "dirs" -source_command = "Get-ChildItem -Recurse -Directory" -preview_command = "Get-ChildItem -Force -LiteralPath '{}' | Format-List" +source_command = "Get-ChildItem -Recurse -Directory | Select-Object -ExpandProperty FullName" +preview_command = "ls -l {0}" # Environment variables [[cable_channel]] name = "env" source_command = "Get-ChildItem Env:" -preview_command = "$env:{0} -split ';'" # Aliases [[cable_channel]] name = "aliases" source_command = "Get-Alias" -interactive = true # GIT [[cable_channel]] name = "git-repos" -source_command = "Get-ChildItem -Recurse -Directory -Force -ErrorAction SilentlyContinue | Where-Object { Test-Path \"$($_.FullName)\\.git\" } | Select-Object -ExpandProperty FullName" +source_command = "Get-ChildItem -Path 'C:\\Users' -Recurse -Directory -Force -ErrorAction SilentlyContinue | Where-Object { Test-Path \"$($_.FullName)\\.git\" } | Select-Object -ExpandProperty FullName" preview_command = "cd '{}' ; git log -n 200 --pretty=medium --all --graph --color" [[cable_channel]] @@ -54,12 +52,6 @@ name = "docker-images" source_command = "docker image ls --format '{{.ID}}'" preview_command = "docker image inspect {0} | jq -C" -# S3 -[[cable_channel]] -name = "s3-buckets" -source_command = "aws s3 ls | ForEach-Object { ($_ -split '\s+')[-1] }" -preview_command = "aws s3 ls s3://{0}" - # Dotfiles (adapted to common Windows dotfile locations) [[cable_channel]] name = "my-dotfiles" diff --git a/television-derive/Cargo.toml b/television-derive/Cargo.toml index d6c67f9..afa6943 100644 --- a/television-derive/Cargo.toml +++ b/television-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "television-derive" -version = "0.0.26" +version = "0.0.27" edition = "2021" description = "The revolution will be televised." license = "MIT" diff --git a/television/utils/command.rs b/television/utils/command.rs index f971ac0..5a83bce 100644 --- a/television/utils/command.rs +++ b/television/utils/command.rs @@ -1,5 +1,8 @@ use std::process::Command; +#[cfg(not(unix))] +use tracing::warn; + use super::shell::Shell; pub fn shell_command(interactive: bool) -> Command { @@ -17,5 +20,10 @@ pub fn shell_command(interactive: bool) -> Command { cmd.arg("-i"); } + #[cfg(not(unix))] + if interactive { + warn!("Interactive mode is not supported on Windows."); + } + cmd }