nushell: open command on file in git repo with changes doesn't show them
Describe the bug
The open command uses the bat crate to nicely render text files.
The docs here: https://www.nushell.sh/book/configuration.html#nushell-configuration-with-config-toml
say that setting the [textview] vcs_modification_markers option to true causes it to show modification markers, but it doesn’t currently work. However, running bat on the same file does show modification markers.
To Reproduce Steps to reproduce the behavior:
- Modify the Nushell config file to have a
[textview]section with the following line:
vcs_modification_markers = true
- cd to a directory of a git repository that contains modified files.
- Enter
open some-file-path - Note that no lines contain indicators to show that there were added, deleted, or modified.
- Enter
cargo install bat(requires that Rust is installed) - Enter
bat some-file-path - Note that added, deleted, and modified lines to have indicators.
Expected behavior
The open and bat commands should produce the same output.
Configuration (please complete the following information):
│ 0 │ version │ 0.29.0 │ │ 1 │ build_os │ macos-x86_64 │ │ 2 │ rust_version │ rustc 1.50.0 (cb75ad5db 2021-02-10) │ │ 3 │ rust_channel │ stable-x86_64-apple-darwin (default) │ │ 4 │ cargo_version │ cargo 1.50.0 (f04e7fab7 2021-02-04) │ │ 5 │ pkg_version │ 0.29.0 │ │ 6 │ build_time │ 2021-03-30 20:30:47 │ │ 7 │ build_rust_channel │ release │ │ 8 │ features │ ctrlc, default, directories, dirs, ichwh, ptree, rustyline, term, uuid, which, zip │
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (7 by maintainers)
It works pretty similar to nushell. All the nushell commands aren’t ported to engine-q yet but you’re welcome to try it out. https://github.com/nushell/engine-q. The
opencommand is ported.