diff options
author | Canop <cano.petrole@gmail.com> | 2024-08-03 19:04:03 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2024-08-03 19:04:03 +0200 |
commit | a8b662fa215615d4b7cd79acd1aa4ce365eb8f01 (patch) | |
tree | 0360ee866555a3739e46c568141fa179e0dce45d | |
parent | c9ef7606a13b76d3efe3cbde86dcecfece38a530 (diff) | |
parent | a086f5fa5468f5840a9d89e9c9e84eb0ac05d644 (diff) |
Merge branch 'main' into write_to_stdoutwrite_to_stdout
53 files changed, 1202 insertions, 311 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e44fb2c..9a36e00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +### next +#### Major Feature: :search_again +ctrl-s now triggers `:search_again` which either +- brings back the last used search pattern, when no filtering pattern is active +- does a "total search" if a filtering pattern is active and the search wasn't complete +#### Major Feature: internals changing panel widths +* `set_panel_width`, taking as parameter the index of the panel and the desired width +* `move_panel_divider`, taking as parameter the index of the divider and the desired change +`ctrl-<` is bound by default to `:move_panel_divider 0 -1` +`ctrl->` is bound by default to `:move_panel_divider 0 1` +See http://dystroy.org/broot/panels/#resize-panels +#### Minor Changes: +- when git file infos are shown, and git ignored files aren't hidden, those files are flagged with a 'I' - Fix #916 +- Remove .bak extension from content search exclusion list - Fix #915 +- Update nerdfont and vscode icons - Thanks @jpaju + +### v1.40.0 - 2024-07-16 +<a name="v1.40.0"></a> +#### Major Feature: preview transformers +You can now define preview transformers to be applied before preview. +They allow for example previewing PDF or Office files, or beautifying JSON files. +Edit the `preview_transformers` array in your conf.hjson file. +See https://dystroy.org/broot/conf_file/#preview +#### Fixes +- fix search on root - Fix #904 +- fix some verb cycling problems - Fix #902 + ### v1.39.2 - 2024-07-08 <a name="v1.39.2"></a> - fix UNC paths being displayed on Windows (regression at 1.39.1) - Fix #812 (again) @@ -210,7 +210,7 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "broot" -version = "1.39.2" +version = "1.40.1-dev" dependencies = [ "ansi_colours", "base64 0.21.7", @@ -2018,9 +2018,9 @@ dependencies = [ [[package]] name = "splitty" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dae68aa5bd5dc2d3a2137b0f6bcdd8255dce1983dc155fe0246572e179c9c3a" +checksum = "2db70a1e6827e4d71c655b606caf1346862c38ae52ab4f58c32635e7c7aedd67" [[package]] name = "str-buf" @@ -1,6 +1,6 @@ [package] name = "broot" -version = "1.39.2" +version = "1.40.1-dev" authors = ["dystroy <denys.seguret@gmail.com>"] repository = "https://github.com/Canop/broot" homepage = "https://dystroy.org/broot" @@ -36,7 +36,7 @@ custom_error = "1.6" deser-hjson = "2.2.3" directories = "4.0" file-size = "1.0.3" -git2 = { version = "0.14", default-features = false } +git2 = { version = "0.14", default-features = false } # waiting for a good pure-rust alternative glob = "0.3" id-arena = "2.2.1" image = "0.24" @@ -54,7 +54,7 @@ rustc-hash = "1" secular = { version = "1.0", features = ["normalization", "bmp"] } serde = { version = "1.0", features = ["derive"] } smallvec = "1.11" # version 2 is still alpha -splitty = "1.0" +splitty = "1.0.2" strict = "0.1.4" syntect = { package = "syntect-no-panic", version = "4.6.1" } # see issue #485 tempfile = "3.2" diff --git a/compile-all-targets.sh b/build-all-targets.sh index 07bce63..07bce63 100755 --- a/compile-all-targets.sh +++ b/build-all-targets.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..670841f --- /dev/null +++ b/build.sh @@ -0,0 +1,16 @@ +# This script compiles broot for the local system +# +# After compilation, broot can be found in target/release +# +# If you're not a developer but just want to install broot to use it, +# you'll probably prefer one of the options listed at +# https://dystroy.org/broot/install +# +# Depending on your system, it's possible one of the 'features' +# won't compile for you. You may remove them (see features.md) +# +# The line below can be safely executed on systems which don't +# support sh scripts. + +cargo build --release --features "trash clipboard" + @@ -1,12 +1,12 @@ # build a new release of broot # This isn't used for normal compilation (see https://dystroy.org/broot for instruction) -# but for the building of the official releases +# but for building the official releases version=$(./version.sh) echo "Building release $version" # make the build directory and compile for all targets -./compile-all-targets.sh +./build-all-targets.sh # add the readme and changelog in the build directory echo "This is broot. More info and installation instructions on https://dystroy.org/broot" > build/README.md diff --git a/resources/default-conf/conf.hjson b/resources/default-conf/conf.hjson index 29f8909..1a632dd 100644 --- a/resources/default-conf/conf.hjson +++ b/resources/default-conf/conf.hjson @@ -217,6 +217,48 @@ lines_before_match_in_preview: 1 lines_after_match_in_preview: 1 ############################################################### +# transformations before preview +# +# It's possible to define transformations to apply to some files +# before calling one of the default preview renderers in broot. +# Below are two examples that you may uncomment and adapt: +# +preview_transformers: [ + // # Use mutool to render any PDF file as an image + // # In this example we use placeholders for the input and output files + // { + // input_extensions: [ "pdf" ] // case doesn't matter + // output_extension: png + // mode: image + // command: [ "mutool", "draw", "-w", "1000", "-o", "{output-path}", "{input-path}" ] + // } + + // # Use LibreOffice to render Office files as images + // # In this example, {output-dir} is used to specify where LibreOffice must write the result + // { + // input_extensions: [ "xls", "xlsx", "doc", "docx", "ppt", "pptx", "ods", "odt", "odp" ] + // output_extension: png + // mode: image + // command: [ + // "libreoffice", "--headless", + // "--convert-to", "png", + // "--outdir", "{output-dir}", + // "{input-path}" + // ] + // } + + // # Use jq to beautify JSON + // # In this example, the command refers to neither the input nor the output, + // # so broot pipes them to the stdin and stdout of the jq process + // { + // input_extensions: [ "json" ] + // output_extension: json + // mode: text + // command: [ "jq" ] + // } +] + +############################################################### # Imports # # While it's possible to have all configuration in one file, diff --git a/resources/icons/nerdfont/data/double_extension_to_icon_name_map.rs b/resources/icons/nerdfont/data/double_extension_to_icon_name_map.rs index ca5bce3..98bb22a 100644 --- a/resources/icons/nerdfont/data/double_extension_to_icon_name_map.rs +++ b/resources/icons/nerdfont/data/double_extension_to_icon_name_map.rs @@ -22,6 +22,7 @@ ( "filter.ts" , "file_type_nest_filter_ts" ), ( "gateway.js" , "file_type_nest_gateway_js" ), ( "gateway.ts" , "file_type_nest_gateway_ts" ), + ( "gradle.kts" , "file_type_gradle" ), ( "guard.js" , "file_type_nest_guard_js" ), ( "guard.ts" , "file_type_nest_guard_ts" ), ( "interceptor.dart" , "file_type_ng_interceptor_dart" ), diff --git a/resources/icons/nerdfont/data/extension_to_icon_name_map.rs b/resources/icons/nerdfont/data/extension_to_icon_name_map.rs index 8664d90..d70e03c 100644 --- a/resources/icons/nerdfont/data/extension_to_icon_name_map.rs +++ b/resources/icons/nerdfont/data/extension_to_icon_name_map.rs @@ -108,6 +108,7 @@ ( "ejs" , "file_type_ejs" ), ( "el" , "file_type_emacs" ), ( "elc" , "file_type_emacs" ), +( "elm" , "file_type_elm" ), ( "ember-cli" , "file_type_ember" ), ( "enc" , "file_type_license" ), ( "ensime" , "file_type_ensime" ), @@ -136,6 +137,7 @@ ( "flv" , "file_type_video" ), ( "fods" , "file_type_excel2" ), ( "fossaignore" , "file_type_fossa" ), +( "fs" , "file_type_fsharp" ), ( "fsproj" , "file_type_fsproj" ), ( "gemfile" , "file_type_bundler" ), ( "gif" , "file_type_image" ), @@ -156,6 +158,7 @@ ( "hgignore" , "file_type_mercurial" ), ( "hl" , "file_type_binary" ), ( "hpp" , "file_type_cppheader" ), +( "hs" , "file_type_haskell" ), ( "html" , "file_type_html" ), ( "htmlhintrc" , "file_type_htmlhint" ), ( "huskyrc" , "file_type_husky" ), @@ -176,6 +179,7 @@ ( "iuml" , "file_type_plantuml" ), ( "ivs" , "file_type_audio" ), ( "jade-lintrc" , "file_type_pug" ), +( "jar" , "file_type_jar" ), ( "java" , "file_type_java" ), ( "jestrc" , "file_type_jest" ), ( "jpeg" , "file_type_image" ), @@ -192,6 +196,7 @@ ( "jsonld" , "file_type_jsonld" ), ( "jsp" , "file_type_jsp" ), ( "jss" , "file_type_jss" ), +( "kdl" , "file_type_config" ), ( "key" , "file_type_key" ), ( "kit" , "file_type_codekit" ), ( "kiteignore" , "file_type_kite" ), @@ -351,6 +356,7 @@ ( "pptx" , "file_type_powerpoint2" ), ( "prettierignore" , "file_type_prettier" ), ( "prettierrc" , "file_type_prettier" ), +( "prisma" , "file_type_prisma" ), ( "pro" , "file_type_prolog" ), ( "procfile" , "file_type_procfile" ), ( "psd" , "file_type_photoshop2" ), @@ -381,6 +387,7 @@ ( "rar" , "file_type_zip2" ), ( "raw" , "file_type_audio" ), ( "rb" , "file_type_ruby" ), +( "re" , "file_type_reason" ), ( "reg" , "file_type_registry" ), ( "rego" , "file_type_rego" ), ( "rehypeignore" , "file_type_rehype" ), @@ -400,6 +407,8 @@ ( "rwd" , "file_type_matlab" ), ( "sailsrc" , "file_type_sails" ), ( "sass" , "file_type_sass" ), +( "sbt" , "file_type_sbt" ), +( "scala" , "file_type_scala" ), ( "scpt" , "file_type_binary" ), ( "scptd" , "file_type_binary" ), ( "scssm" , "file_type_scss" ), @@ -440,6 +449,7 @@ ( "tar" , "file_type_zip2" ), ( "tcl" , "file_type_tcl" ), ( "texi" , "file_type_tex" ), +( "tf" , "file_type_terraform" ), ( "tfignore" , "file_type_tfs" ), ( "tfstate" , "file_type_terraform" ), ( "tgz" , "file_type_zip2" ), diff --git a/resources/icons/nerdfont/data/file_name_to_icon_name_map.rs b/resources/icons/nerdfont/data/file_name_to_icon_name_map.rs index 6155904..31a166f 100644 --- a/resources/icons/nerdfont/data/file_name_to_icon_name_map.rs +++ b/resources/icons/nerdfont/data/file_name_to_icon_name_map.rs @@ -1,12 +1,14 @@ [ - ( "LICENCE" , "file_type_license" ), - ( "LICENSE" , "file_type_license" ), - ( "VERSION" , "file_type_version" ), - ( "licence" , "file_type_license" ), - ( "license" , "file_type_license" ), - ( "readme" , "file_type_text" ), - ( "todo" , "file_type_todo" ), - ( "version" , "file_type_version" ), + ( ".scalafix.conf" , "file_type_config" ), + ( ".scalafmt.conf" , "file_type_config" ), + ( "LICENCE" , "file_type_license" ), + ( "LICENSE" , "file_type_license" ), + ( "VERSION" , "file_type_version" ), + ( "licence" , "file_type_license" ), + ( "license" , "file_type_license" ), + ( "readme" , "file_type_text" ), + ( "todo" , "file_type_todo" ), + ( "version" , "file_type_version" ), ( "angular-cli.json" , "file_type_angular" ), ( "angular.json" , "file_type_angular" ), ( "api-extractor-base.json" , "file_type_api_extractor" ), @@ -28,6 +30,7 @@ ( "bower.json" , "file_type_bower" ), ( "browserslist" , "file_type_browserslist" ), ( "build.ninja" , "file_type_ninja" ), + ( "build.properties" , "file_type_config" ), ( "cargo.lock" , "file_type_cargo" ), ( "cargo.toml" , "file_type_cargo" ), ( "checkstyle.json" , "file_type_haxecheckstyle" ), @@ -59,6 +62,9 @@ ( "elm-package.json" , "file_type_elm2" ), ( "emakefile" , "file_type_erlang2" ), ( "emakerfile" , "file_type_erlang2" ), + ( "eslint.config.js" , "file_type_eslint" ), + ( "eslint.config.cjs" , "file_type_eslint" ), + ( "eslint.config.mjs" , "file_type_eslint" ), ( "favicon.ico" , "file_type_favicon" ), ( "firebase.json" , "file_type_firebasehosting" ), ( "firestore.indexes.json" , "file_type_firestore" ), diff --git a/resources/icons/nerdfont/data/icon_name_to_icon_code_point_map.rs b/resources/icons/nerdfont/data/icon_name_to_icon_code_point_map.rs index 0cf6bcb..43e3493 100644 --- a/resources/icons/nerdfont/data/icon_name_to_icon_code_point_map.rs +++ b/resources/icons/nerdfont/data/icon_name_to_icon_code_point_map.rs @@ -228,8 +228,8 @@ ( "file_type_go_white", 0xe626 ), // ( "file_type_go_yellow", 0xe626 ), // ( "file_type_godot", 0xe65f ), // -( "file_type_gradle", 0xe738 ), // -( "file_type_gradle2", 0xe738 ), // +( "file_type_gradle", 0xe660 ), // +( "file_type_gradle2", 0xe660 ), // ( "file_type_graphql", 0xf0877 ), // ( "file_type_graphql_config", 0xf0877 ), // ( "file_type_graphviz", 0xeb03 ), // @@ -612,9 +612,9 @@ ( "file_type_razor", 0xf1997 ), // ( "file_type_razzle", 0xf15b ), ( "file_type_reactjs", 0xe7ba ), // -( "file_type_reacttemplate", 0xe7ba), // -( "file_type_reactts", 0xe7ba ), -( "file_type_reason", 0xf15b ), +( "file_type_reacttemplate", 0xe7ba), // +( "file_type_reactts", 0xe7ba ), // +( "file_type_reason", 0xe687 ), // ( "file_type_red", 0xf15b ), ( "file_type_registry", 0xf15b ), ( "file_type_rego", 0xf15b ), @@ -641,7 +641,7 @@ ( "file_type_san", 0xf15b ), ( "file_type_sas", 0xe74b ), ( "file_type_sass", 0xe74b ), // -( "file_type_sbt", 0xf15b ), +( "file_type_sbt", 0xe68d ), // ( "file_type_scala", 0xe737 ), // ( "file_type_scilab", 0xf15b ), ( "file_type_script", 0xf06e6 ), @@ -712,7 +712,7 @@ ( "file_type_tox", 0xf15b ), ( "file_type_travis", 0xe77e ), // ( "file_type_tsconfig", 0xe628 ), // -( "file_type_tslint", 0xe628 ), +( "file_type_tslint", 0xe628 ), // ( "file_type_tt", 0xf15b ), ( "file_type_ttcn", 0xf15b ), ( "file_type_twig", 0xe61c ), // @@ -741,13 +741,13 @@ ( "file_type_vlang", 0xe6ac ), // ( "file_type_volt", 0xf15b ), ( "file_type_vscode", 0xe70c ), // -( "file_type_vscode-insiders", 0xe70c ), -( "file_type_vscode2", 0xe70c ), -( "file_type_vscode3", 0xe70c ), +( "file_type_vscode-insiders", 0xe70c ), // +( "file_type_vscode2", 0xe70c ), // +( "file_type_vscode3", 0xe70c ), // ( "file_type_vsix", 0xf15b ), ( "file_type_vsixmanifest", 0xf15b ), ( "file_type_vue", 0xe6a0), // -( "file_type_vueconfig", 0xe6a0 ), +( "file_type_vueconfig", 0xe6a0 ), // ( "file_type_wallaby", 0xf15b ), ( "file_type_wasm", 0xe6a1 ), // ( "file_type_watchmanconfig", 0xf15b ), @@ -772,7 +772,7 @@ ( "file_type_xsl", 0xf15b ), ( "file_type_yacc", 0xf15b ), ( "file_type_yaml", 0xf0626 ), // -( "file_type_yamllint", 0xf0626 ), +( "file_type_yamllint", 0xf0626 ), // ( "file_type_yandex", 0xf15b ), ( "file_type_yang", 0xf15b ), ( "file_type_yarn", 0xe6a7 ), // @@ -780,5 +780,5 @@ ( "file_type_zeit", 0xf15b ), ( "file_type_zig", 0xe6a9 ), // ( "file_type_zip", 0xf1c6 ), // -( "file_type_zip2", 0xf1c6 ), +( "file_type_zip2", 0xf1c6 ),// ] diff --git a/resources/icons/vscode/data/double_extension_to_icon_name_map.rs b/resources/icons/vscode/data/double_extension_to_icon_name_map.rs index 3d2657c..c94a248 100644 --- a/resources/icons/vscode/data/double_extension_to_icon_name_map.rs +++ b/resources/icons/vscode/data/double_extension_to_icon_name_map.rs @@ -1,6 +1,7 @@ // SEE ./README on how to edit this file [ - ( "tar.gz" , "file_type_zip" ) , - ( "tar.xz" , "file_type_zip" ) , - ( "tar.zst" , "file_type_zip" ) , + ( "gradle.kts" , "file_type_gradle" ), + ( "tar.gz" , "file_type_zip" ), + ( "tar.xz" , "file_type_zip" ), + ( "tar.zst" , "file_type_zip" ), ] diff --git a/resources/icons/vscode/data/extension_to_icon_name_map.rs b/resources/icons/vscode/data/extension_to_icon_name_map.rs index 84ec455..8023a0f 100644 --- a/resources/icons/vscode/data/extension_to_icon_name_map.rs +++ b/resources/icons/vscode/data/extension_to_icon_name_map.rs @@ -169,6 +169,7 @@ ( "ejs" , "file_type_ejs" ) , ( "ejs.t" , "file_type_hygen" ) , ( "elc" , "file_type_emacs" ) , +( "elm" , "file_type_elm" ) , ( "el" , "file_type_emacs" ) , ( "elm-package.json" , "file_type_elm2" ) , ( "emakefile" , "file_type_erlang2" ) , @@ -207,6 +208,7 @@ ( "fods" , "file_type_excel2" ) , ( "format.ps1xml" , "file_type_powershell_format" ) , ( "fossaignore" , "file_type_fossa" ) , +( "fs" , "file_type_fsharp" ) , ( "fsproj" , "file_type_fsproj" ) , ( "fuse.js" , "file_type_fusebox" ) , ( "gateway.js" , "file_type_nest_gateway_js" ) , @@ -239,6 +241,7 @@ ( "hgignore" , "file_type_mercurial" ) , ( "hl" , "file_type_binary" ) , ( "hpp" , "file_type_cppheader" ) , +( "hs" , "file_type_haskell" ) , ( "htmlhintrc" , "file_type_htmlhint" ) , ( "husky.config.js" , "file_type_husky" ) , ( "huskyrc" , "file_type_husky" ) , @@ -269,7 +272,9 @@ ( "jade-lintrc" , "file_type_pug" ) , ( "jakefile" , "file_type_jake" ) , ( "jakefile.js" , "file_type_jake" ) , +( "jar" , "file_type_jar" ) , ( "jasmine.json" , "file_type_jasmine" ) , +( "java" , "file_type_java" ) , ( "jbuilder" , "file_type_jbuilder" ) , ( "jest.config.json" , "file_type_jest" ) , ( "jest.json" , "file_type_jest" ) , @@ -295,6 +300,7 @@ ( "jss" , "file_type_jss" ) , ( "js.snap" , "file_type_jest_snapshot" ) , ( "jsx.snap" , "file_type_jest_snapshot" ) , +( "kdl" , "file_type_config" ) , ( "key" , "file_type_key" ) , ( "kitchen.yml" , "file_type_kitchenci" ) , ( "kiteignore" , "file_type_kite" ) , @@ -304,6 +310,7 @@ ( "layout.html" , "file_type_layout" ) , ( "ldb" , "file_type_access2" ) , ( "lerna.json" , "file_type_lerna" ) , +( "lhs" , "file_type_haskell" ) , ( "lib" , "file_type_binary" ) , ( "licence" , "file_type_license" ) , ( "license" , "file_type_license" ) , @@ -501,17 +508,18 @@ ( "pre-commit-config.yaml" , "file_type_precommit" ) , ( "prettierignore" , "file_type_prettier" ) , ( "prettierrc" , "file_type_prettier" ) , -( "procfile" , "file_type_procfile" ) , +( "prisma" , "file_type_prisma" ) , ( "pro" , "file_type_prolog" ) , -( "psd1" , "file_type_powershell_psd2" ) , +( "procfile" , "file_type_procfile" ) , ( "psd" , "file_type_photoshop2" ) , +( "psd1" , "file_type_powershell_psd2" ) , ( "psm1" , "file_type_powershell_psm2" ) , ( "psmdcp" , "file_type_nuget" ) , ( "pst" , "file_type_outlook" ) , +( "pu" , "file_type_plantuml" ) , ( "pub" , "file_type_publisher" ) , ( "pubspec.lock" , "file_type_flutter_package" ) , ( "pubspec.yaml" , "file_type_flutter_package" ) , -( "pu" , "file_type_plantuml" ) , ( "pug-lintrc" , "file_type_pug" ) , ( "pug-lintrc.js" , "file_type_pug" ) , ( "pug-lintrc.json" , "file_type_pug" ) , @@ -535,6 +543,7 @@ ( "rake" , "file_type_rake" ) , ( "rar" , "file_type_zip2" ) , ( "raw" , "file_type_audio" ) , +( "re" , "file_type_reason" ) , ( "reg" , "file_type_registry" ) , ( "rego" , "file_type_rego" ) , ( "rehypeignore" , "file_type_rehype" |