GithubHelp home page GithubHelp logo

hunter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hunter's Issues

Incremental search

While searching using S it is useful to have incremental search to see partial match and correct search faster. Similar to incsearch in vim.

How to exit Hunter?

I pressed something (wanted to type ls, forgot htat hunter is open)
and now it shows it's log and I can't exit
image

Mouse events causes weird behavior

When I move the mouse over the terminal window and touch scroll, or click mouse buttons, program start behaving strangely.
image

  1. 3 weird blue vertical bars are rendered between main panels. On each event, bar grows!
  2. On left bar some random symbols appears, U,D,),
  3. Above the right bar, several \ are rendered

Also, annoying event shows up on the bottom, that says me to not use the mouse, but this I could ignore.

I'd suggest just disable terminal mouse events, so users could use mouse for simply selecting the text, to be copied elsewhere.

Check rust compiler version

A lot of people had problems compiling hunter, because they weren't using a recent enough nightly compiler.

Solution:
A check in build.rs and bail with a warning when they're not on rust-nightly.

Thread "Main" panicked at Index out of bounds

thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', /rustc/d628c2e642c6f8f85f24dd5d7f49de89b95bf682/src/libcore/slice/mod.rs:2689:10
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Ubuntu 18.04 Stable with Zsh, oh my zsh & Tmux. Let me know if there's anything else I can do to help.

I was using the "filter" function.

README

PREVIEWERS

hunter comes with definitions to enable previewing certain file typse. To use this you need to install some programs first. You can also define your own. See below. Defaults are:

bat / highlight for syntax highlighting
7z for archives
w3m / links / elinks / lynx for html
pdftotext / mutool for pdf

Debian/Ubuntu

**apt install gcc libmagic-dev gstreamer1.0-devel gst-plugins-base gst-plugins-good**

Fix typo: typse ==> types

The installation dependencies are not for Debian/Ubuntu.

This works for me (Ubuntu 18.04):

apt-get gcc libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good

libmagic.so is provided by libmagic1 package, but I have the feeling it is not required anymore by hunter as tree_magic is now used instead of mime_detective.

Compilation error: #![feature] may not be used on the stable release channel

I'm trying to compile hunter in evil mode - release 1.0.2 and I'm getting this error:

error[E0554]: #![feature] may not be used on the stable release channel
 --> src/main.rs:1:1
  |
1 | #![feature(vec_remove_item)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
 --> src/main.rs:2:1
  |
2 | #![feature(trivial_bounds)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
 --> src/main.rs:3:1
  |
3 | #![feature(try_trait)]
  | ^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
 --> src/main.rs:4:1
  |
4 | #![feature(fnbox)]
  | ^^^^^^^^^^^^^^^^^^

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0554`.

I understand why this error occurs and how I might be able to fix - by using the nightly version of rustc but I was wondering whether you have any plans in not using non-stable features of rustc such as this. I'm using Arch Linux and rust version 1.33.0.

Help key binding

It would be helpful to look up the help without leaving hunter.

panicking with AsyncError("Not ready yet!")

I can get the program to crash on my machine doing the following:

1/ go to my home folder (either from within hunter, or start hunter from ~)
2/ press 's'

I get the following stack trace.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: AsyncError("Not ready yet!")', src/libcore/result.rs:997:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   6: rust_begin_unwind
             at src/libstd/panicking.rs:312
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::result::unwrap_failed
   9: alloc::slice::<impl [T]>::sort_by::{{closure}}
  10: alloc::slice::merge_sort
  11: hunter::files::Files::sort
  12: <hunter::listview::ListView<hunter::files::Files> as hunter::listview::Listable>::on_key
  13: <hunter::file_browser::FileBrowser as hunter::widget::Widget>::on_key
  14: hunter::widget::Widget::handle_input
  15: hunter::main
  16: std::rt::lang_start::{{closure}}
  17: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  18: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:92
  19: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  20: main
  21: __libc_start_main
  22: _start

sorting by size in other folders works for me though

Terminal left in bad state after running hunter

OS: Arch Linux
Terminal: Alacritty 0.2.9
Hunter Version: 1.0.1 (evil branch) (also happens in master branch)

Steps to Reproduce

  1. Run hunter
  2. Quit hunter q

Expected Results

After exiting the terminal is restored to its previous state.

Actual Results

After exiting it's no longer possible to scroll or click in the Alacritty window. Doing so outputs what appears to be raw escape sequences that look like this:

65;52;47M65;52;46M65;52;46M65;52;46M65;52;46M64;52;46M64;52;46M64;52;46M0;52;46M0;52;46m0;52;46m0;52;46m0;33;64M32;34;64M32;34;65M32;35;65M0;35;65m

[Perf] Laggy when scrolling quickly through a list

If you scroll fast (e.g. continually depress the down-arrow to move the cursor down a list), input becomes "laggy" and doesn't stop as soon as input stops.

Expected: cursor should stop immediately when the key is released

Actual: when you release the key the cursor continues for a few extra lines. The longer the key was held, the further "extra distance" the cursor goes, thus giving it an "inertial" effect.

Hunter output breaks if the terminal is too wide.

Hunter output breaks if the terminal is too wide. It seems to happen when there are more than 197 columns in the terminal.

It only show a line on the first row and on the bottom row.

It happens both in gnome-terminal and alacritty.

# Terminal width
$ tput cols
197

Quoted list values

Use the same approach than Kakoune.

Example – Print selected files:

eval "set -- $s"

# Using a for-loop
for file do
  echo "$file"
done

# Using printf
printf '%s\n' "$@"

Will Not Compile(gstreamer error)

Using the latest version of Rustup and a freshly installed Pop! OS I keep running into an error every single time I run
cargo install hunter
the error I get is

https://pastebin.com/t2W0Hd3s

I already double checked and all my gstreamer things were installed correctly. Not sure why I am getting this error. Oh and your preinstalls for Ubuntu/Debian give me this error

Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package gstreamer1.0-devel E: Couldn't find any package by glob 'gstreamer1.0-devel' E: Couldn't find any package by regex 'gstreamer1.0-devel' E: Unable to locate package gst-plugins-base E: Unable to locate package gst-plugins-good

Publish release?

This looks like a really well built tool. I'd love to create and AUR package for hunter. It's best to build these against published releases instead of straight from git master though. I would be great if you could tag a release.

Unable to compile

I am unable to compile it on my device with the latest from master branch.

   Compiling hunter v1.0.1 (/Users/meain/Documents/Projects/projects/hunter)
error[E0432]: unresolved import `notify::INotifyWatcher`
 --> src/fscache.rs:1:14
  |
1 | use notify::{INotifyWatcher, Watcher, DebouncedEvent, RecursiveMode};
  |              ^^^^^^^^^^^^^^ no `INotifyWatcher` in the root

warning: unused import: `Watcher`
 --> src/fscache.rs:1:30
  |
1 | use notify::{INotifyWatcher, Watcher, DebouncedEvent, RecursiveMode};
  |                              ^^^^^^^
  |
  = note: #[warn(unused_imports)] on by default

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: Could not compile `hunter`.

To learn more, run the command again with --verbose.

Cross-platfrom file watching support

On macOS, compilation currently fails with the following error message:

  Compiling hunter v1.0.1 (/Users/mendler/Code/upstream/hunter)
error[E0432]: unresolved import `notify::INotifyWatcher`
 --> src/fscache.rs:1:14
  |
1 | use notify::{INotifyWatcher, Watcher, DebouncedEvent, RecursiveMode};
  |              ^^^^^^^^^^^^^^ no `INotifyWatcher` in the root

That's because inotifywatch is Linux-specific.
I recommend https://github.com/passcod/notify for cross-platform filesystem notifications.

#![feature] may not be used on the stable release channel

Hey,

Thank for the project! You are doing well. :)

On compiling phase via AUR on Arch Linux, I am getting this:

error[E0554]: #![feature] may not be used on the stable release channel
 --> /home/dentrax/.cargo/registry/src/github.com-1ecc6299db9ec823/hunter-1.1.0/src/main.rs:1:1
  |
1 | #![feature(vec_remove_item)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
 --> /home/dentrax/.cargo/registry/src/github.com-1ecc6299db9ec823/hunter-1.1.0/src/main.rs:2:1
  |
2 | #![feature(trivial_bounds)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
 --> /home/dentrax/.cargo/registry/src/github.com-1ecc6299db9ec823/hunter-1.1.0/src/main.rs:3:1
  |
3 | #![feature(try_trait)]
  | ^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
 --> /home/dentrax/.cargo/registry/src/github.com-1ecc6299db9ec823/hunter-1.1.0/src/main.rs:4:1
  |
4 | #![feature(fnbox)]
  | ^^^^^^^^^^^^^^^^^^

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0554`.
error: failed to compile `hunter v1.1.0`, intermediate artifacts can be found at `/tmp/cargo-installTlPHje`

Similar to: #15

But, I am new to Rust; So, I don't exactly understand the Rust specific terms. How could we solve the this bug (with box-of-the-box way)?

cargo: cargo 1.34.0
rustc: rustc 1.34.0

Thanks!

How to select a file or change a directory using fuzzy finders?

What is the equivalent to the following lf commands, which use fzf and fd?

Example – Select a file:

cmd select-fuzzy ${{
  lf -remote "send $id select $(fd --type file | fzf)"
}}

map s select-fuzzy

Example – Change to a directory:

cmd cd-fuzzy ${{
  lf -remote "send $id cd $(fd --type directory | fzf)"
}}

map g cd-fuzzy

Add batch_cmd option

How about adding a batch_cmd option to batch rename / delete – and more generally, for batch processing – a set of selections?

Example – Batch processing with Batch:

~/.config/hunter/config

batch_cmd=batch

Issues with show_hidden and hidden folders

There are a few issues with the show_hidden implementation from what I can tell.

  • I don't think that the config flag is doing anything. I was unable to use to use to show hidden files. ( I did sone testing, I feel like the config file is not being read )
  • h which should be toggling the hidden files actually is overridden by the vim h mapping. I am guessing l has the same problem too.
  • If in a folder in a hidden dir (I am guessing without show_hidden enabled) if you try to go back since there is no listed files, it errors out.

Backtrace

thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /rustc/bc44841ad2a2ad5f6c5e67b9e35ed8e7e71d4dc7/src/libcore/slice/mod.rs:2539:10
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: hunter::die_gracefully::{{closure}}
   5: std::panicking::rust_panic_with_hook
   6: std::panicking::continue_panic_fmt
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic_bounds_check
  10: hunter::file_browser::FileBrowser::cache_files
  11: <hunter::file_browser::FileBrowser as hunter::widget::Widget>::refresh
  12: <hunter::file_browser::FileBrowser as hunter::widget::Widget>::on_key
  13: hunter::widget::Widget::handle_input
  14: hunter::main
  15: std::rt::lang_start::{{closure}}
  16: std::panicking::try::do_call
  17: __rust_maybe_catch_panic
  18: std::rt::lang_start_internal
  19: main


The error triggers if I go back one more step. I started hunter in the folder ~/.config/hunter

Quitting from log results in panic

Reproduce:
While in hunter in any state, even just after starting the program:

  1. press l for log view
  2. press q to quit

Expected: hunter should quit cleanly

Actual: hunter panics, ^C required to exit

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libcore/result.rs:999:5
stack backtrace:
   0:        0x10067a7f3 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h42ef8f910989f2a5
   1:        0x100676792 - std::sys_common::backtrace::_print::h57563d504eb2a535
   2:        0x100679716 - std::panicking::default_hook::{{closure}}::hd122b1df844d64a4
   3:        0x1006794bf - std::panicking::default_hook::h95cc52151fdfa338
   4:        0x100533d60 - hunter::die_gracefully::{{closure}}::h4943948830babf57
   5:        0x100679f70 - std::panicking::rust_panic_with_hook::h14fcc8bcee6073e2
   6:        0x1006799bc - std::panicking::continue_panic_fmt::ha9475004e44b6b49
   7:        0x1006798a8 - rust_begin_unwind
   8:        0x1006917c1 - core::panicking::panic_fmt::h6b286a6a4688064c
   9:        0x1004d1e92 - core::result::unwrap_failed::h4a6b49db654acb5f
  10:        0x1004e6715 - std::sys_common::backtrace::__rust_begin_short_backtrace::h3b996df650fb3134
  11:        0x1004e81e1 - std::panicking::try::do_call::haf5b9d3e62f44c81
  12:        0x1006820ae - __rust_maybe_catch_panic
  13:        0x1004ff1a1 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h8de97fa96955d774
  14:        0x10066c2cd - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h981e060567c31168
  15:        0x10068175d - std::sys::unix::thread::Thread::new::thread_start::h565ff451d36149b1
  16:     0x7fff666c32ea - _pthread_body
  17:     0x7fff666c6248 - _pthread_start
^C

Note that ^C in the above output is not an interrupt of the output, the full backtrace is shown.


macOS 10.14.4 (18E226)
rustc 1.36.0-nightly (3991285f5 2019-04-25)

(FEATURE REQUEST)Devicons Built-In

Would be really cool if Hunter had devicons built in. Here is an example of what I mean, [https://github.com/alexanderjeurissen/ranger_devicons](Ranger Devicons) .

State dependency on libmagic

Compilation on Xubuntu 18.04 failed due to a missing library:

= note: /usr/bin/ld: cannot find -lmagic
       collect2: error: ld returned 1 exit status

Installing the libmagic-dev package allowed compilation to succeed. I suggest putting all the non-Rust dependencies in the readme.

Change keybindings

Is it possible to change the keybindings? Or would I have to change the source for that?

Compilation error: missing feature uniform_paths

Compiling the version 1.0.1 in Manjaro I got 5 compiling errors like this:

error[E0658]: imports can only refer to extern crate names passed with `--extern` on stable channel (see issue #53130)
  --> src/main.rs:62:5
   |
41 | mod tabview;
   | ------------ not an extern crate passed with `--extern`
...
62 | use tabview::TabView;
   |     ^^^^^^^
   |
   = help: add #![feature(uniform_paths)] to the crate attributes to enable

Command used: cargo build --release
Workaround: adding #![feature(uniform_paths)] at the start of main.rs makes the project compile.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.