nix-community/comma

comma fails to run with fish

rapenne-s opened this issue · 4 comments

I installed comma using flakes on NixOS unstable, I use fish as shell and comma fails to run on this shell, works fine with bash.

solene@t470 ~/data (master)> env RUST_BACKTRACE=full , musikcube
thread 'main' panicked at 'failed to execute nix-locate: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:84:10
stack backtrace:
   0:     0x55a363e6423b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h04e1659590c75b7f
   1:     0x55a363e75c0c - core::fmt::write::h934b5967ac569ed6
   2:     0x55a363e53b55 - std::io::Write::write_fmt::h5ab422a8ac80f319
   3:     0x55a363e5b731 - std::panicking::default_hook::{{closure}}::h494c7f9d4414967f
   4:     0x55a363e5b331 - std::panicking::default_hook::h48ddca4adf4aa3dc
   5:     0x55a363e5bc81 - std::panicking::rust_panic_with_hook::h003457efeb6d6b49
   6:     0x55a363e64a20 - std::panicking::begin_panic_handler::{{closure}}::h251c8136df2fab02
   7:     0x55a363e64354 - std::sys_common::backtrace::__rust_end_short_backtrace::h27a470ecec345006
   8:     0x55a363e5b812 - rust_begin_unwind
   9:     0x55a363de5991 - core::panicking::panic_fmt::h4fce74342b1c33c5
  10:     0x55a363de5a23 - core::result::unwrap_failed::h8c4993f73e62bc49
  11:     0x55a363deea11 - comma::main::h3752c99db5ba6d3b
  12:     0x55a363de9d73 - std::sys_common::backtrace::__rust_begin_short_backtrace::h235a2b433be5629b
  13:     0x55a363de9d69 - std::rt::lang_start::{{closure}}::ha1f875eedb56f2d6
  14:     0x55a363e51991 - std::rt::lang_start_internal::hca69a4afefa7c403
  15:     0x55a363def3d2 - main
  16:     0x7f6e005821d7 - __libc_start_call_main
  17:     0x7f6e00582297 - __libc_start_main_impl
  18:     0x55a363de5c81 - _start
  19:                0x0 - <unknown>

fixed in 034a9ca

Thanks, dunno if I should open a new ticket, but with your changes comma doesn't error out but never find any match

solene@t470 ~ [1]> , musikcube
no match
solene@t470 ~ [1]> , openttd
no match
solene@t470 ~ [1]> ,
error: The following required arguments were not provided:
    <cmd>...

USAGE:
    , [OPTIONS] <cmd>...

For more information try --help
solene@t470 ~ [2]> , --help
comma 1.2.3
runs programs without installing them

USAGE:
    , [OPTIONS] <cmd>...

ARGS:
    <cmd>...    command to run

OPTIONS:
    -h, --help               Print help information
    -i, --install            install the derivation containing the executable
        --picker <picker>    [env: COMMA_PICKER=] [default: fzy]
    -V, --version            Print version information

you need to have a index available, either make one yourself with https://github.com/bennofs/nix-index
or download a prebuilt one from https://github.com/Mic92/nix-index-database

I downloaded the prebuilt, it works fine with fish, thanks! 👍 What's surprising is it worked with bash without having to do this ^^