Comments (6)
Thank you for reporting this.
I have never seen this. Could you please provide a little bit more information?
What kind of files does this fail on? Could you provide one of those files for further debugging?
Also, could this be related to rust-lang/rust#44863 ? Could you try to call cargo clean
and build bat
again?
Also, to make the backtrace more helpful, it would be great if you could build in debug mode (cargo install -f --debug
) and run RUST_BACKTRACE=1 bat ..
again.
from bat.
Ok, I know what has been causing this - you probably did not install a syntax highlighting theme?
Please follow the instructions here.
The panic should not appear again. I have turned it into a normal error message.
from bat.
Syntax highlighting theme is installed.
Can you please provide detailed instructions how clean
and install
are supposed to be done? I tried
git clone https://github.com/sharkdp/bat.git
cd bat
cargo clean
cargo install -f --debug bat
RUST_BACKTRACE=1 bat README.md
thread 'main' panicked at 'no entry found for key', libcore/option.rs:917:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at libstd/sys_common/backtrace.rs:59
at libstd/panicking.rs:380
3: std::panicking::default_hook
at libstd/panicking.rs:396
4: std::panicking::rust_panic_with_hook
at libstd/panicking.rs:576
5: std::panicking::begin_panic
at libstd/panicking.rs:537
6: std::panicking::begin_panic_fmt
at libstd/panicking.rs:521
7: rust_begin_unwind
at libstd/panicking.rs:497
8: core::panicking::panic_fmt
at libcore/panicking.rs:71
9: core::option::expect_failed
at libcore/option.rs:917
10: <core::option::Option<T>>::expect
at /checkout/src/libcore/option.rs:302
11: <alloc::btree::map::BTreeMap<K, V> as core::ops::index::Index<&'a Q>>::index
at /checkout/src/liballoc/btree/map.rs:1758
12: bat::run
at src/main.rs:175
13: bat::main
at src/main.rs:215
14: std::rt::lang_start::{{closure}}
at /checkout/src/libstd/rt.rs:74
15: std::panicking::try::do_call
at libstd/rt.rs:59
at libstd/panicking.rs:479
16: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:102
17: std::rt::lang_start_internal
at libstd/panicking.rs:458
at libstd/panic.rs:358
at libstd/rt.rs:58
18: std::rt::lang_start
at /checkout/src/libstd/rt.rs:74
19: main
20: __libc_start_main
21: _start
Test file is this repositories' README.md
from bat.
I'm pretty sure this is not the latest version of bat
(the line numbers don't match). Could you please make sure to git pull
again?
Also, please post the output of
ls -alh ~/.config/bat/themes/Default.tmTheme
It should be a valid Sublime Theme or a symlink to one.
from bat.
Latest commit is f43409f
$ ls -alh ~/.config/bat/themes/Default.tmTheme
lrwxrwxrwx 1 kbite kbite 49 Apr 26 18:53 /home/kbite/.config/bat/themes/Default.tmTheme -> sublime-monokai-extended/Monokai Extended.tmTheme
from bat.
Oh, damn - this took me a while to figure out 😄
You are calling cargo install -f bat
instead of cargo install -f
which installs bat
from crates.io (instead of from the current directory). The version on crates.io is outdated, I will update it soon.
from bat.
Related Issues (20)
- Set file name as terminal title HOT 1
- Add a --head option that is equivalent to piping the output to head but works with device files HOT 1
- Integrating with google/oss-fuzz for continuous fuzz testing? HOT 1
- Bat failed to work in Powershell or CMD properly HOT 5
- Uninstalling BAT HOT 1
- bat aliased as cat HOT 3
- Bat syntax highlighting doesn't play nicely with backslashes HOT 6
- The system cannot find the path specified. (os error 3) - When attempting to bat a file with Tilde in the path HOT 4
- Highlighting for bioinformatics HOT 4
- support coloresque for css language HOT 7
- Not have syntax highlight from stdin after pipe in nushell HOT 1
- Add optional git blame to file output
- bat says some txt files are BINARY, and not display the content. HOT 4
- Long file paths break header HOT 1
- Beancount HOT 1
- `Controller::run_with_error_handler` does not allow the handler closure to modify variables outside
- bat Incorrectly using pager on small files HOT 2
- printing reverse order like tac command HOT 1
- Log4j Support HOT 1
- Add a way to pass arguments to the pager via a command line flag HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bat.