on master help sign in
Merge remote-tracking branch 'origin/master' into fix-1063
da10166Martin Nordholts
.github/workflows/CICD.yml+27−67
@@ -83,18 +83,18 @@ jobs:
83 fail-fast: false
83 fail-fast: false
84 matrix:
84 matrix:
85 job:
85 job:
86− # { os, target, cargo-options, features, use-cross, toolchain }
86+ # { os, target, cargo-options, features, use-cross }
87− - { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , use-cross: use-cross }
87+ - { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , use-cross: true }
88− - { os: ubuntu-18.04 , target: aarch64-unknown-linux-gnu , use-cross: use-cross }
88+ - { os: ubuntu-18.04 , target: aarch64-unknown-linux-gnu , use-cross: true }
89− - { os: ubuntu-18.04 , target: i686-unknown-linux-gnu , use-cross: use-cross }
89+ - { os: ubuntu-18.04 , target: i686-unknown-linux-gnu , use-cross: true }
90− - { os: ubuntu-18.04 , target: i686-unknown-linux-musl , use-cross: use-cross }
90+ - { os: ubuntu-18.04 , target: i686-unknown-linux-musl , use-cross: true }
91− - { os: ubuntu-18.04 , target: x86_64-unknown-linux-gnu , use-cross: use-cross }
91+ - { os: ubuntu-18.04 , target: x86_64-unknown-linux-gnu }
92− - { os: ubuntu-18.04 , target: x86_64-unknown-linux-musl , use-cross: use-cross }
92+ - { os: ubuntu-18.04 , target: x86_64-unknown-linux-musl , use-cross: true }
93− - { os: ubuntu-16.04 , target: x86_64-unknown-linux-gnu , use-cross: use-cross }
93+ - { os: ubuntu-16.04 , target: x86_64-unknown-linux-gnu }
94 - { os: macos-latest , target: x86_64-apple-darwin }
94 - { os: macos-latest , target: x86_64-apple-darwin }
95− # - { os: windows-latest , target: i686-pc-windows-gnu } ## disabled; linker errors (missing '_imp____acrt_iob_func')
95+ # - { os: windows-latest , target: i686-pc-windows-gnu } ## disabled; error: linker `i686-w64-mingw32-gcc` not found
96 - { os: windows-latest , target: i686-pc-windows-msvc }
96 - { os: windows-latest , target: i686-pc-windows-msvc }
97− # - { os: windows-latest , target: x86_64-pc-windows-gnu } ## disabled; linker errors (missing '_imp____acrt_iob_func')
97+ - { os: windows-latest , target: x86_64-pc-windows-gnu }
98 - { os: windows-latest , target: x86_64-pc-windows-msvc }
98 - { os: windows-latest , target: x86_64-pc-windows-msvc }
99 steps:
99 steps:
100 - name: Git checkout
100 - name: Git checkout
@@ -110,49 +110,24 @@ jobs:
110 id: vars
110 id: vars
111 shell: bash
111 shell: bash
112 run: |
112 run: |
113− # toolchain
114− TOOLCHAIN="stable" ## default to "stable" toolchain
115− # * specify alternate TOOLCHAIN for *-pc-windows-gnu targets; gnu targets on Windows are broken for the standard *-pc-windows-msvc toolchain (refs: <https://github.com/rust-lang/rust/issues/47048>, <https://github.com/rust-lang/rust/issues/53454>, <https://github.com/rust-lang/cargo/issues/6754>)
116− case ${{ matrix.job.target }} in *-pc-windows-gnu) TOOLCHAIN="stable-${{ matrix.job.target }}" ;; esac;
117− # * use requested TOOLCHAIN if specified
118− if [ -n "${{ matrix.job.toolchain }}" ]; then TOOLCHAIN="${{ matrix.job.toolchain }}" ; fi
119− echo set-output name=TOOLCHAIN::${TOOLCHAIN}
120− echo ::set-output name=TOOLCHAIN::${TOOLCHAIN}
121 # staging directory
113 # staging directory
122 STAGING='_staging'
114 STAGING='_staging'
123− echo set-output name=STAGING::${STAGING}
124 echo ::set-output name=STAGING::${STAGING}
115 echo ::set-output name=STAGING::${STAGING}
125 # determine EXE suffix
116 # determine EXE suffix
126 EXE_suffix="" ; case ${{ matrix.job.target }} in *-pc-windows-*) EXE_suffix=".exe" ;; esac;
117 EXE_suffix="" ; case ${{ matrix.job.target }} in *-pc-windows-*) EXE_suffix=".exe" ;; esac;
127− echo set-output name=EXE_suffix::${EXE_suffix}
128 echo ::set-output name=EXE_suffix::${EXE_suffix}
118 echo ::set-output name=EXE_suffix::${EXE_suffix}
129 # parse commit reference info
119 # parse commit reference info
130− REF_NAME=${GITHUB_REF#refs/*/}
131− unset REF_BRANCH ; case ${GITHUB_REF} in refs/heads/*) REF_BRANCH=${GITHUB_REF#refs/heads/} ;; esac;
132 unset REF_TAG ; case ${GITHUB_REF} in refs/tags/*) REF_TAG=${GITHUB_REF#refs/tags/} ;; esac;
120 unset REF_TAG ; case ${GITHUB_REF} in refs/tags/*) REF_TAG=${GITHUB_REF#refs/tags/} ;; esac;
133 REF_SHAS=${GITHUB_SHA:0:8}
121 REF_SHAS=${GITHUB_SHA:0:8}
134− echo set-output name=REF_NAME::${REF_NAME}
135− echo set-output name=REF_BRANCH::${REF_BRANCH}
136− echo set-output name=REF_TAG::${REF_TAG}
137− echo set-output name=REF_SHAS::${REF_SHAS}
138− echo ::set-output name=REF_NAME::${REF_NAME}
139− echo ::set-output name=REF_BRANCH::${REF_BRANCH}
140− echo ::set-output name=REF_TAG::${REF_TAG}
141− echo ::set-output name=REF_SHAS::${REF_SHAS}
142 # parse target
122 # parse target
143 unset TARGET_ARCH ; case ${{ matrix.job.target }} in arm-unknown-linux-gnueabihf) TARGET_ARCH=arm ;; i686-*) TARGET_ARCH=i686 ;; x86_64-*) TARGET_ARCH=x86_64 ;; esac;
123 unset TARGET_ARCH ; case ${{ matrix.job.target }} in arm-unknown-linux-gnueabihf) TARGET_ARCH=arm ;; i686-*) TARGET_ARCH=i686 ;; x86_64-*) TARGET_ARCH=x86_64 ;; esac;
144− echo set-output name=TARGET_ARCH::${TARGET_ARCH}
145 echo ::set-output name=TARGET_ARCH::${TARGET_ARCH}
124 echo ::set-output name=TARGET_ARCH::${TARGET_ARCH}
146 unset TARGET_OS ; case ${{ matrix.job.target }} in *-linux-*) TARGET_OS=linux ;; *-apple-*) TARGET_OS=macos ;; *-windows-*) TARGET_OS=windows ;; esac;
125 unset TARGET_OS ; case ${{ matrix.job.target }} in *-linux-*) TARGET_OS=linux ;; *-apple-*) TARGET_OS=macos ;; *-windows-*) TARGET_OS=windows ;; esac;
147− echo set-output name=TARGET_OS::${TARGET_OS}
148 echo ::set-output name=TARGET_OS::${TARGET_OS}
126 echo ::set-output name=TARGET_OS::${TARGET_OS}
149 # package name
127 # package name
150 PKG_suffix=".tar.gz" ; case ${{ matrix.job.target }} in *-pc-windows-*) PKG_suffix=".zip" ;; esac;
128 PKG_suffix=".tar.gz" ; case ${{ matrix.job.target }} in *-pc-windows-*) PKG_suffix=".zip" ;; esac;
151 PKG_BASENAME=${PROJECT_NAME}-${REF_TAG:-$REF_SHAS}-${{ matrix.job.target }}
129 PKG_BASENAME=${PROJECT_NAME}-${REF_TAG:-$REF_SHAS}-${{ matrix.job.target }}
152 PKG_NAME=${PKG_BASENAME}${PKG_suffix}
130 PKG_NAME=${PKG_BASENAME}${PKG_suffix}
153− echo set-output name=PKG_suffix::${PKG_suffix}
154− echo set-output name=PKG_BASENAME::${PKG_BASENAME}
155− echo set-output name=PKG_NAME::${PKG_NAME}
156 echo ::set-output name=PKG_suffix::${PKG_suffix}
131 echo ::set-output name=PKG_suffix::${PKG_suffix}
157 echo ::set-output name=PKG_BASENAME::${PKG_BASENAME}
132 echo ::set-output name=PKG_BASENAME::${PKG_BASENAME}
158 echo ::set-output name=PKG_NAME::${PKG_NAME}
133 echo ::set-output name=PKG_NAME::${PKG_NAME}
@@ -160,7 +135,6 @@ jobs:
160 unset DEPLOY ; if [[ $REF_TAG =~ ^[vV]?[0-9].* ]]; then DEPLOY='true' ; fi
135 unset DEPLOY ; if [[ $REF_TAG =~ ^[vV]?[0-9].* ]]; then DEPLOY='true' ; fi
161 # unset deploy on ubuntu-18.04 x64 - we will deploy the tarball/deb built on ubuntu-16.04 x64
136 # unset deploy on ubuntu-18.04 x64 - we will deploy the tarball/deb built on ubuntu-16.04 x64
162 if [ "${{ matrix.job.os }}" = "ubuntu-18.04" ] && [ "${{ matrix.job.target }}" = "x86_64-unknown-linux-gnu" ]; then unset DEPLOY; fi
137 if [ "${{ matrix.job.os }}" = "ubuntu-18.04" ] && [ "${{ matrix.job.target }}" = "x86_64-unknown-linux-gnu" ]; then unset DEPLOY; fi
163− echo set-output name=DEPLOY::${DEPLOY:-<empty>/false}
164 echo ::set-output name=DEPLOY::${DEPLOY}
138 echo ::set-output name=DEPLOY::${DEPLOY}
165 # DPKG architecture?
139 # DPKG architecture?
166 unset DPKG_ARCH
140 unset DPKG_ARCH
@@ -170,43 +144,31 @@ jobs:
170 i686-*-linux-*) DPKG_ARCH=i686 ;;
144 i686-*-linux-*) DPKG_ARCH=i686 ;;
171 x86_64-*-linux-*) DPKG_ARCH=amd64 ;;
145 x86_64-*-linux-*) DPKG_ARCH=amd64 ;;
172 esac;
146 esac;
173− echo set-output name=DPKG_ARCH::${DPKG_ARCH}
174 echo ::set-output name=DPKG_ARCH::${DPKG_ARCH}
147 echo ::set-output name=DPKG_ARCH::${DPKG_ARCH}
175 # DPKG version?
148 # DPKG version?
176 unset DPKG_VERSION ; if [[ $REF_TAG =~ ^[vV]?[0-9].* ]]; then DPKG_VERSION=${REF_TAG/#[vV]/} ; fi
149 unset DPKG_VERSION ; if [[ $REF_TAG =~ ^[vV]?[0-9].* ]]; then DPKG_VERSION=${REF_TAG/#[vV]/} ; fi
177− echo set-output name=DPKG_VERSION::${DPKG_VERSION}
178 echo ::set-output name=DPKG_VERSION::${DPKG_VERSION}
150 echo ::set-output name=DPKG_VERSION::${DPKG_VERSION}
179 # DPKG base name/conflicts?
151 # DPKG base name/conflicts?
180 DPKG_BASENAME=${PROJECT_NAME}
152 DPKG_BASENAME=${PROJECT_NAME}
181 DPKG_CONFLICTS=${PROJECT_NAME}-musl
153 DPKG_CONFLICTS=${PROJECT_NAME}-musl
182 case ${{ matrix.job.target }} in *-musl) DPKG_BASENAME=${PROJECT_NAME}-musl ; DPKG_CONFLICTS=${PROJECT_NAME} ;; esac;
154 case ${{ matrix.job.target }} in *-musl) DPKG_BASENAME=${PROJECT_NAME}-musl ; DPKG_CONFLICTS=${PROJECT_NAME} ;; esac;
183− echo set-output name=DPKG_BASENAME::${DPKG_BASENAME}
184− echo set-output name=DPKG_CONFLICTS::${DPKG_CONFLICTS}
185 echo ::set-output name=DPKG_BASENAME::${DPKG_BASENAME}
155 echo ::set-output name=DPKG_BASENAME::${DPKG_BASENAME}
186 echo ::set-output name=DPKG_CONFLICTS::${DPKG_CONFLICTS}
156 echo ::set-output name=DPKG_CONFLICTS::${DPKG_CONFLICTS}
187 # DPKG name
157 # DPKG name
188 unset DPKG_NAME;
158 unset DPKG_NAME;
189 if [[ -n $DPKG_ARCH && -n $DPKG_VERSION ]]; then DPKG_NAME="${DPKG_BASENAME}_${DPKG_VERSION}_${DPKG_ARCH}.deb" ; fi
159 if [[ -n $DPKG_ARCH && -n $DPKG_VERSION ]]; then DPKG_NAME="${DPKG_BASENAME}_${DPKG_VERSION}_${DPKG_ARCH}.deb" ; fi
190− echo set-output name=DPKG_NAME::${DPKG_NAME}
191 echo ::set-output name=DPKG_NAME::${DPKG_NAME}
160 echo ::set-output name=DPKG_NAME::${DPKG_NAME}
192 # target-specific options
161 # target-specific options
193− # * CARGO_USE_CROSS (truthy)
194− CARGO_USE_CROSS='true' ; case '${{ matrix.job.use-cross }}' in ''|0|f|false|n|no) unset CARGO_USE_CROSS ;; esac;
195− echo set-output name=CARGO_USE_CROSS::${CARGO_USE_CROSS:-<empty>/false}
196− echo ::set-output name=CARGO_USE_CROSS::${CARGO_USE_CROSS}
197 # # * `arm` cannot be tested on ubuntu-* hosts (b/c testing is currently primarily done via comparison of target outputs with built-in outputs and the `arm` target is not executable on the host)
162 # # * `arm` cannot be tested on ubuntu-* hosts (b/c testing is currently primarily done via comparison of target outputs with built-in outputs and the `arm` target is not executable on the host)
198 JOB_DO_TESTING="true"
163 JOB_DO_TESTING="true"
199 case ${{ matrix.job.target }} in arm-*) unset JOB_DO_TESTING ;; esac;
164 case ${{ matrix.job.target }} in arm-*) unset JOB_DO_TESTING ;; esac;
200− echo set-output name=JOB_DO_TESTING::${JOB_DO_TESTING:-<empty>/false}
201 echo ::set-output name=JOB_DO_TESTING::${JOB_DO_TESTING}
165 echo ::set-output name=JOB_DO_TESTING::${JOB_DO_TESTING}
202 # # * test only library unit tests and binary for arm-type targets
166 # # * test only library unit tests and binary for arm-type targets
203 unset CARGO_TEST_OPTIONS
167 unset CARGO_TEST_OPTIONS
204 unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--lib --bin ${PROJECT_NAME}" ;; esac;
168 unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--lib --bin ${PROJECT_NAME}" ;; esac;
205− echo set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
206 echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
169 echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
207 # * executable for `strip`?
170 # * executable for `strip`?
208 STRIP="strip" ; case ${{ matrix.job.target }} in arm-unknown-linux-gnueabihf) STRIP="arm-linux-gnueabihf-strip" ;; aarch64-unknown-linux-gnu) STRIP="aarch64-linux-gnu-strip" ;; *-pc-windows-msvc) STRIP="" ;; esac;
171 STRIP="strip" ; case ${{ matrix.job.target }} in arm-unknown-linux-gnueabihf) STRIP="arm-linux-gnueabihf-strip" ;; aarch64-unknown-linux-gnu) STRIP="aarch64-linux-gnu-strip" ;; *-pc-windows-msvc) STRIP="" ;; esac;
209− echo set-output name=STRIP::${STRIP}
210 echo ::set-output name=STRIP::${STRIP}
172 echo ::set-output name=STRIP::${STRIP}
211 - name: Create all needed build/work directories
173 - name: Create all needed build/work directories
212 shell: bash
174 shell: bash
@@ -218,7 +180,7 @@ jobs:
218 - name: Install Rust toolchain
180 - name: Install Rust toolchain
219 uses: actions-rs/toolchain@v1
181 uses: actions-rs/toolchain@v1
220 with:
182 with:
221− toolchain: ${{ steps.vars.outputs.TOOLCHAIN }}
183+ toolchain: stable
222 target: ${{ matrix.job.target }}
184 target: ${{ matrix.job.target }}
223 override: true
185 override: true
224 profile: minimal # minimal component installation (ie, no documentation)
186 profile: minimal # minimal component installation (ie, no documentation)
@@ -234,43 +196,49 @@ jobs:
234 - name: Build
196 - name: Build
235 uses: actions-rs/cargo@v1
197 uses: actions-rs/cargo@v1
236 with:
198 with:
237− use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }}
199+ use-cross: ${{ matrix.job.use-cross }}
238 command: build
200 command: build
239 args: --release --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }}
201 args: --release --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }}
240 - name: Test
202 - name: Test
241 uses: actions-rs/cargo@v1
203 uses: actions-rs/cargo@v1
242 with:
204 with:
243− use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }}
205+ use-cross: ${{ matrix.job.use-cross }}
244 command: test
206 command: test
245 args: --target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }}
207 args: --target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }}
246 - name: bat test run
208 - name: bat test run
247 uses: actions-rs/cargo@v1
209 uses: actions-rs/cargo@v1
248 with:
210 with:
249− use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }}
211+ use-cross: ${{ matrix.job.use-cross }}
212+ command: run
213+ args: --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs
214+ - name: bat diagnostics output
215+ uses: actions-rs/cargo@v1
216+ with:
217+ use-cross: ${{ matrix.job.use-cross }}
250 command: run
218 command: run
251− args: --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} -- --paging=never --color=always --theme=ansi-dark Cargo.toml src/config.rs
219+ args: --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs --diagnostic
252 - name: Check features regex-onig
220 - name: Check features regex-onig
253 uses: actions-rs/cargo@v1
221 uses: actions-rs/cargo@v1
254 with:
222 with:
255− use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }}
223+ use-cross: ${{ matrix.job.use-cross }}
256 command: check
224 command: check
257 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig
225 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig
258 - name: Check features regex-onig,git
226 - name: Check features regex-onig,git
259 uses: actions-rs/cargo@v1
227 uses: actions-rs/cargo@v1
260 with:
228 with:
261− use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }}
229+ use-cross: ${{ matrix.job.use-cross }}
262 command: check
230 command: check
263 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git
231 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git
264 - name: Check features regex-onig,paging
232 - name: Check features regex-onig,paging
265 uses: actions-rs/cargo@v1
233 uses: actions-rs/cargo@v1
266 with:
234 with:
267− use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }}
235+ use-cross: ${{ matrix.job.use-cross }}
268 command: check
236 command: check
269 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,paging
237 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,paging
270 - name: Check features regex-onig,git,paging
238 - name: Check features regex-onig,git,paging
271 uses: actions-rs/cargo@v1
239 uses: actions-rs/cargo@v1
272 with:
240 with:
273− use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }}
241+ use-cross: ${{ matrix.job.use-cross }}
274 command: check
242 command: check
275 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git,paging
243 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git,paging
276 - name: Upload build artifacts
244 - name: Upload build artifacts
@@ -402,6 +370,7 @@ jobs:
402
370
403 coverage:
371 coverage:
404 name: Code Coverage
372 name: Code Coverage
373+ if: "false" # Temporarily disabled until made functional again, see https://github.com/sharkdp/bat/pull/1484
405 runs-on: ${{ matrix.job.os }}
374 runs-on: ${{ matrix.job.os }}
406 strategy:
375 strategy:
407 fail-fast: true
376 fail-fast: true
@@ -417,23 +386,14 @@ jobs:
417 id: vars
386 id: vars
418 shell: bash
387 shell: bash
419 run: |
388 run: |
420− # toolchain
421− TOOLCHAIN="nightly" ## default to "nightly" toolchain
422− # * use requested TOOLCHAIN if specified
423− if [ -n "${{ matrix.job.toolchain }}" ]; then TOOLCHAIN="${{ matrix.job.toolchain }}" ; fi
424− # * use requested TOOLCHAIN if specified
425− if [ -n "${{ matrix.job.toolchain }}" ]; then TOOLCHAIN="${{ matrix.job.toolchain }}" ; fi
426− echo set-output name=TOOLCHAIN::${TOOLCHAIN}
427− echo ::set-output name=TOOLCHAIN::${TOOLCHAIN}
428 # target-specific options
389 # target-specific options
429 # * CODECOV_FLAGS
390 # * CODECOV_FLAGS
430 CODECOV_FLAGS=$( echo "${{ matrix.job.os }}" | sed 's/[^[:alnum:]]/_/g' )
391 CODECOV_FLAGS=$( echo "${{ matrix.job.os }}" | sed 's/[^[:alnum:]]/_/g' )
431− echo set-output name=CODECOV_FLAGS::${CODECOV_FLAGS}
432 echo ::set-output name=CODECOV_FLAGS::${CODECOV_FLAGS}
392 echo ::set-output name=CODECOV_FLAGS::${CODECOV_FLAGS}
433 - name: rust toolchain ~ install
393 - name: rust toolchain ~ install
434 uses: actions-rs/toolchain@v1
394 uses: actions-rs/toolchain@v1
435 with:
395 with:
436− toolchain: ${{ steps.vars.outputs.TOOLCHAIN }}
396+ toolchain: ${{ matrix.job.toolchain }}
437 override: true
397 override: true
438 profile: minimal # minimal component installation (ie, no documentation)
398 profile: minimal # minimal component installation (ie, no documentation)
439 - name: Test
399 - name: Test
CHANGELOG.md+2
@@ -2,6 +2,7 @@
2
2
3
3
4## Features
4## Features
5+
5- Use a pager when `bat --list-languages` is called, see #1394 (@stku1985)
6- Use a pager when `bat --list-languages` is called, see #1394 (@stku1985)
6
7
7## Bugfixes
8## Bugfixes
@@ -16,6 +17,7 @@
16## Other
17## Other
17
18
18- Performance improvements, see #1421 (@LovecraftianHorror)
19- Performance improvements, see #1421 (@LovecraftianHorror)
20+- Added a new `--diagnostic` option to collect information for bug reports, see #1459 (@sharkdp)
19
21
20## Syntaxes
22## Syntaxes
21
23
Cargo.lock+156−192
@@ -8,9 +8,9 @@ checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
8
8
9[[package]]
9[[package]]
10name = "aho-corasick"
10name = "aho-corasick"
11−version = "0.7.13"
11+version = "0.7.15"
12source = "registry+https://github.com/rust-lang/crates.io-index"
12source = "registry+https://github.com/rust-lang/crates.io-index"
13−checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86"
13+checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5"
14dependencies = [
14dependencies = [
15 "memchr",
15 "memchr",
16]
16]
@@ -50,9 +50,9 @@ checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
50
50
51[[package]]
51[[package]]
52name = "arrayvec"
52name = "arrayvec"
53−version = "0.5.1"
53+version = "0.5.2"
54source = "registry+https://github.com/rust-lang/crates.io-index"
54source = "registry+https://github.com/rust-lang/crates.io-index"
55−checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8"
55+checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
56
56
57[[package]]
57[[package]]
58name = "assert_cmd"
58name = "assert_cmd"
@@ -86,9 +86,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
86
86
87[[package]]
87[[package]]
88name = "base64"
88name = "base64"
89−version = "0.12.3"
89+version = "0.13.0"
90source = "registry+https://github.com/rust-lang/crates.io-index"
90source = "registry+https://github.com/rust-lang/crates.io-index"
91−checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
91+checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
92
92
93[[package]]
93[[package]]
94name = "bat"
94name = "bat"
@@ -98,6 +98,7 @@ dependencies = [
98 "ansi_term 0.12.1",
98 "ansi_term 0.12.1",
99 "assert_cmd",
99 "assert_cmd",
100 "atty",
100 "atty",
101+ "bugreport",
101 "clap",
102 "clap",
102 "clircle",
103 "clircle",
103 "console",
104 "console",
@@ -143,9 +144,9 @@ dependencies = [
143
144
144[[package]]
145[[package]]
145name = "bit-vec"
146name = "bit-vec"
146−version = "0.6.2"
147+version = "0.6.3"
147source = "registry+https://github.com/rust-lang/crates.io-index"
148source = "registry+https://github.com/rust-lang/crates.io-index"
148−checksum = "5f0dc55f2d8a1a85650ac47858bb001b4c0dd73d79e3c455a842925e68d29cd3"
149+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
149
150
150[[package]]
151[[package]]
151name = "bitflags"
152name = "bitflags"
@@ -155,50 +156,33 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
155
156
156[[package]]
157[[package]]
157name = "blake2b_simd"
158name = "blake2b_simd"
158−version = "0.5.10"
159+version = "0.5.11"
159source = "registry+https://github.com/rust-lang/crates.io-index"
160source = "registry+https://github.com/rust-lang/crates.io-index"
160−checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a"
161+checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587"
161dependencies = [
162dependencies = [
162 "arrayref",
163 "arrayref",
163 "arrayvec",
164 "arrayvec",
164 "constant_time_eq",
165 "constant_time_eq",
165]
166]
166
167
167−[[package]]
168−name = "block-buffer"
169−version = "0.7.3"
170−source = "registry+https://github.com/rust-lang/crates.io-index"
171−checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
172−dependencies = [
173− "block-padding",
174− "byte-tools",
175− "byteorder",
176− "generic-array",
177−]
178−
179−[[package]]
180−name = "block-padding"
181−version = "0.1.5"
182−source = "registry+https://github.com/rust-lang/crates.io-index"
183−checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
184−dependencies = [
185− "byte-tools",
186−]
187−
188[[package]]
168[[package]]
189name = "bstr"
169name = "bstr"
190−version = "0.2.13"
170+version = "0.2.14"
191source = "registry+https://github.com/rust-lang/crates.io-index"
171source = "registry+https://github.com/rust-lang/crates.io-index"
192−checksum = "31accafdb70df7871592c058eca3985b71104e15ac32f64706022c58867da931"
172+checksum = "473fc6b38233f9af7baa94fb5852dca389e3d95b8e21c8e3719301462c5d9faf"
193dependencies = [
173dependencies = [
194 "memchr",
174 "memchr",
195]
175]
196
176
197[[package]]
177[[package]]
198−name = "byte-tools"
178+name = "bugreport"
199−version = "0.3.1"
179+version = "0.3.0"
200source = "registry+https://github.com/rust-lang/crates.io-index"
180source = "registry+https://github.com/rust-lang/crates.io-index"
201−checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
181+checksum = "116762017f173ea5d8103e75533f6bdb62cb6f2257c9c95672beb085a70daed8"
182+dependencies = [
183+ "snailquote",
184+ "sys-info",
185+]
202
186
203[[package]]
187[[package]]
204name = "byteorder"
188name = "byteorder"
@@ -208,9 +192,9 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
208
192
209[[package]]
193[[package]]
210name = "cc"
194name = "cc"
211−version = "1.0.60"
195+version = "1.0.66"
212source = "registry+https://github.com/rust-lang/crates.io-index"
196source = "registry+https://github.com/rust-lang/crates.io-index"
213−checksum = "ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c"
197+checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"
214dependencies = [
198dependencies = [
215 "jobserver",
199 "jobserver",
216]
200]
@@ -297,21 +281,21 @@ dependencies = [
297
281
298[[package]]
282[[package]]
299name = "crc32fast"
283name = "crc32fast"
300−version = "1.2.0"
284+version = "1.2.1"
301source = "registry+https://github.com/rust-lang/crates.io-index"
285source = "registry+https://github.com/rust-lang/crates.io-index"
302−checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
286+checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
303dependencies = [
287dependencies = [
304− "cfg-if 0.1.10",
288+ "cfg-if 1.0.0",
305]
289]
306
290
307[[package]]
291[[package]]
308name = "crossbeam-utils"
292name = "crossbeam-utils"
309−version = "0.7.2"
293+version = "0.8.1"
310source = "registry+https://github.com/rust-lang/crates.io-index"
294source = "registry+https://github.com/rust-lang/crates.io-index"
311−checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
295+checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d"
312dependencies = [
296dependencies = [
313 "autocfg",
297 "autocfg",
314− "cfg-if 0.1.10",
298+ "cfg-if 1.0.0",
315 "lazy_static",
299 "lazy_static",
316]
300]
317
301
@@ -321,15 +305,6 @@ version = "2.0.0"
321source = "registry+https://github.com/rust-lang/crates.io-index"
305source = "registry+https://github.com/rust-lang/crates.io-index"
322checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
306checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
323
307
324−[[package]]
325−name = "digest"
326−version = "0.8.1"
327−source = "registry+https://github.com/rust-lang/crates.io-index"
328−checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
329−dependencies = [
330− "generic-array",
331−]
332−
333[[package]]
308[[package]]
334name = "dirs"
309name = "dirs"
335version = "3.0.1"
310version = "3.0.1"
@@ -358,9 +333,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
358
333
359[[package]]
334[[package]]
360name = "dtoa"
335name = "dtoa"
361−version = "0.4.6"
336+version = "0.4.7"
362source = "registry+https://github.com/rust-lang/crates.io-index"
337source = "registry+https://github.com/rust-lang/crates.io-index"
363−checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b"
338+checksum = "88d7ed2934d741c6b37e33e3832298e8850b53fd2d2bea03873375596c7cea4e"
364
339
365[[package]]
340[[package]]
366name = "encode_unicode"
341name = "encode_unicode"
@@ -441,12 +416,6 @@ dependencies = [
441 "version_check",
416 "version_check",
442]
417]
443
418
444−[[package]]
445−name = "fake-simd"
446−version = "0.1.2"
447−source = "registry+https://github.com/rust-lang/crates.io-index"
448−checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
449−
450[[package]]
419[[package]]
451name = "fancy-regex"
420name = "fancy-regex"
452version = "0.3.5"
421version = "0.3.5"
@@ -459,11 +428,11 @@ dependencies = [
459
428
460[[package]]
429[[package]]
461name = "flate2"
430name = "flate2"
462−version = "1.0.18"
431+version = "1.0.19"
463source = "registry+https://github.com/rust-lang/crates.io-index"
432source = "registry+https://github.com/rust-lang/crates.io-index"
464−checksum = "da80be589a72651dcda34d8b35bcdc9b7254ad06325611074d9cc0fbb19f60ee"
433+checksum = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129"
465dependencies = [
434dependencies = [
466− "cfg-if 0.1.10",
435+ "cfg-if 1.0.0",
467 "crc32fast",
436 "crc32fast",
468 "libc",
437 "libc",
469 "miniz_oxide",
438 "miniz_oxide",
@@ -485,27 +454,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
485checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
454checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
486
455
487[[package]]
456[[package]]
488−name = "fuchsia-cprng"
457+name = "form_urlencoded"
489−version = "0.1.1"
458+version = "1.0.0"
490source = "registry+https://github.com/rust-lang/crates.io-index"
459source = "registry+https://github.com/rust-lang/crates.io-index"
491−checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
460+checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00"
461+dependencies = [
462+ "matches",
463+ "percent-encoding",
464+]
492
465
493[[package]]
466[[package]]
494−name = "generic-array"
467+name = "fuchsia-cprng"
495−version = "0.12.3"
468+version = "0.1.1"
496source = "registry+https://github.com/rust-lang/crates.io-index"
469source = "registry+https://github.com/rust-lang/crates.io-index"
497−checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
470+checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
498−dependencies = [
499− "typenum",
500−]
501
471
502[[package]]
472[[package]]
503name = "getrandom"
473name = "getrandom"
504−version = "0.1.15"
474+version = "0.1.16"
505source = "registry+https://github.com/rust-lang/crates.io-index"
475source = "registry+https://github.com/rust-lang/crates.io-index"
506−checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
476+checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
507dependencies = [
477dependencies = [
508− "cfg-if 0.1.10",
478+ "cfg-if 1.0.0",
509 "libc",
479 "libc",
510 "wasi",
480 "wasi",
511]
481]
@@ -544,15 +514,18 @@ dependencies = [
544
514
545[[package]]
515[[package]]
546name = "hashbrown"
516name = "hashbrown"
547−version = "0.9.1"
517+version = "0.8.2"
548source = "registry+https://github.com/rust-lang/crates.io-index"
518source = "registry+https://github.com/rust-lang/crates.io-index"
549−checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
519+checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25"
520+dependencies = [
521+ "autocfg",
522+]
550
523
551[[package]]
524[[package]]
552name = "hermit-abi"
525name = "hermit-abi"
553−version = "0.1.16"
526+version = "0.1.17"
554source = "registry+https://github.com/rust-lang/crates.io-index"
527source = "registry+https://github.com/rust-lang/crates.io-index"
555−checksum = "4c30f6d0bc6b00693347368a67d41b58f2fb851215ff1da49e90fe2c5c667151"
528+checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8"
556dependencies = [
529dependencies = [
557 "libc",
530 "libc",
558]
531]
@@ -570,9 +543,9 @@ dependencies = [
570
543
571[[package]]
544[[package]]
572name = "indexmap"
545name = "indexmap"
573−version = "1.6.0"
546+version = "1.5.2"
574source = "registry+https://github.com/rust-lang/crates.io-index"
547source = "registry+https://github.com/rust-lang/crates.io-index"
575−checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2"
548+checksum = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c"
576dependencies = [
549dependencies = [
577 "autocfg",
550 "autocfg",
578 "hashbrown",
551 "hashbrown",
@@ -589,9 +562,9 @@ dependencies = [
589
562
590[[package]]
563[[package]]
591name = "itoa"
564name = "itoa"
592−version = "0.4.6"
565+version = "0.4.7"
593source = "registry+https://github.com/rust-lang/crates.io-index"
566source = "registry+https://github.com/rust-lang/crates.io-index"
594−checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"
567+checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
595
568
596[[package]]
569[[package]]
597name = "jobserver"
570name = "jobserver"
@@ -616,9 +589,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
616
589
617[[package]]
590[[package]]
618name = "libc"
591name = "libc"
619−version = "0.2.78"
592+version = "0.2.81"
620source = "registry+https://github.com/rust-lang/crates.io-index"
593source = "registry+https://github.com/rust-lang/crates.io-index"
621−checksum = "aa7087f49d294270db4e1928fc110c976cd4b9e5a16348e0a1df09afa99e6c98"
594+checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb"
622
595
623[[package]]
596[[package]]
624name = "libgit2-sys"
597name = "libgit2-sys"
@@ -677,12 +650,6 @@ dependencies = [
677 "cfg-if 0.1.10",
650 "cfg-if 0.1.10",
678]
651]
679
652
680−[[package]]
681−name = "maplit"
682−version = "1.0.2"
683−source = "registry+https://github.com/rust-lang/crates.io-index"
684−checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
685−
686[[package]]
653[[package]]
687name = "matches"
654name = "matches"
688version = "0.1.8"
655version = "0.1.8"
@@ -691,15 +658,15 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
691
658
692[[package]]
659[[package]]
693name = "memchr"
660name = "memchr"
694−version = "2.3.3"
661+version = "2.3.4"
695source = "registry+https://github.com/rust-lang/crates.io-index"
662source = "registry+https://github.com/rust-lang/crates.io-index"
696−checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
663+checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
697
664
698[[package]]
665[[package]]
699name = "miniz_oxide"
666name = "miniz_oxide"
700−version = "0.4.2"
667+version = "0.4.3"
701source = "registry+https://github.com/rust-lang/crates.io-index"
668source = "registry+https://github.com/rust-lang/crates.io-index"
702−checksum = "c60c0dfe32c10b43a144bad8fc83538c52f58302c92300ea7ec7bf7b38d5a7b9"
669+checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d"
703dependencies = [
670dependencies = [
704 "adler",
671 "adler",
705 "autocfg",
672 "autocfg",
@@ -725,9 +692,9 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
725
692
726[[package]]
693[[package]]
727name = "num-integer"
694name = "num-integer"
728−version = "0.1.43"
695+version = "0.1.44"
729source = "registry+https://github.com/rust-lang/crates.io-index"
696source = "registry+https://github.com/rust-lang/crates.io-index"
730−checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b"
697+checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
731dependencies = [
698dependencies = [
732 "autocfg",
699 "autocfg",
733 "num-traits",
700 "num-traits",
@@ -735,18 +702,18 @@ dependencies = [
735
702
736[[package]]
703[[package]]
737name = "num-traits"
704name = "num-traits"
738−version = "0.2.12"
705+version = "0.2.14"
739source = "registry+https://github.com/rust-lang/crates.io-index"
706source = "registry+https://github.com/rust-lang/crates.io-index"
740−checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611"
707+checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
741dependencies = [
708dependencies = [
742 "autocfg",
709 "autocfg",
743]
710]
744
711
745[[package]]
712[[package]]
746name = "onig"
713name = "onig"
747−version = "6.1.0"
714+version = "6.1.1"
748source = "registry+https://github.com/rust-lang/crates.io-index"
715source = "registry+https://github.com/rust-lang/crates.io-index"
749−checksum = "8a155d13862da85473665694f4c05d77fb96598bdceeaf696433c84ea9567e20"
716+checksum = "30b46fd9edbc018f0be4e366c24c46db44fac49cd01c039ae85308088b089dd5"
750dependencies = [
717dependencies = [
751 "bitflags",
718 "bitflags",
752 "lazy_static",
719 "lazy_static",
@@ -756,20 +723,14 @@ dependencies = [
756
723
757[[package]]
724[[package]]
758name = "onig_sys"
725name = "onig_sys"
759−version = "69.5.1"
726+version = "69.6.0"
760source = "registry+https://github.com/rust-lang/crates.io-index"
727source = "registry+https://github.com/rust-lang/crates.io-index"
761−checksum = "9bff06597a6b17855040955cae613af000fc0bfc8ad49ea68b9479a74e59292d"
728+checksum = "ed063c96cf4c0f2e5d09324409d158b38a0a85a7b90fbd68c8cad75c495d5775"
762dependencies = [
729dependencies = [
763 "cc",
730 "cc",
764 "pkg-config",
731 "pkg-config",
765]
732]
766
733
767−[[package]]
768−name = "opaque-debug"
769−version = "0.2.3"
770−source = "registry+https://github.com/rust-lang/crates.io-index"
771−checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
772−
773[[package]]
734[[package]]
774name = "parking_lot"
735name = "parking_lot"
775version = "0.11.1"
736version = "0.11.1"
@@ -819,51 +780,17 @@ dependencies = [
819 "ucd-trie",
780 "ucd-trie",
820]
781]
821
782
822−[[package]]
823−name = "pest_derive"
824−version = "2.1.0"
825−source = "registry+https://github.com/rust-lang/crates.io-index"
826−checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0"
827−dependencies = [
828− "pest",
829− "pest_generator",
830−]
831−
832−[[package]]
833−name = "pest_generator"
834−version = "2.1.3"
835−source = "registry+https://github.com/rust-lang/crates.io-index"
836−checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55"
837−dependencies = [
838− "pest",
839− "pest_meta",
840− "proc-macro2",
841− "quote",
842− "syn",
843−]
844−
845−[[package]]
846−name = "pest_meta"
847−version = "2.1.3"
848−source = "registry+https://github.com/rust-lang/crates.io-index"
849−checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d"
850−dependencies = [
851− "maplit",
852− "pest",
853− "sha-1",
854−]
855−
856[[package]]
783[[package]]
857name = "pkg-config"
784name = "pkg-config"
858−version = "0.3.18"
785+version = "0.3.19"
859source = "registry+https://github.com/rust-lang/crates.io-index"
786source = "registry+https://github.com/rust-lang/crates.io-index"
860−checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33"
787+checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
861
788
862[[package]]
789[[package]]
863name = "plist"
790name = "plist"
864−version = "1.0.0"
791+version = "1.0.1"
865source = "registry+https://github.com/rust-lang/crates.io-index"
792source = "registry+https://github.com/rust-lang/crates.io-index"
866−checksum = "7b336d94e8e4ce29bf15bba393164629764744c567e8ad306cc1fdd0119967fd"
793+checksum = "4dc57ccf442c7414b790e8e7b72fb4d776a66c7680129360946d9aaa6f5311e9"
867dependencies = [
794dependencies = [
868 "base64",
795 "base64",
869 "chrono",
796 "chrono",
@@ -888,15 +815,15 @@ dependencies = [
888
815
889[[package]]
816[[package]]
890name = "predicates-core"
817name = "predicates-core"
891−version = "1.0.0"
818+version = "1.0.1"
892source = "registry+https://github.com/rust-lang/crates.io-index"
819source = "registry+https://github.com/rust-lang/crates.io-index"
893−checksum = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178"
820+checksum = "fb3dbeaaf793584e29c58c7e3a82bbb3c7c06b63cea68d13b0e3cddc124104dc"
894
821
895[[package]]
822[[package]]
896name = "predicates-tree"
823name = "predicates-tree"
897−version = "1.0.0"
824+version = "1.0.1"
898source = "registry+https://github.com/rust-lang/crates.io-index"
825source = "registry+https://github.com/rust-lang/crates.io-index"
899−checksum = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124"
826+checksum = "aee95d988ee893cb35c06b148c80ed2cd52c8eea927f50ba7a0be1a786aeab73"
900dependencies = [
827dependencies = [
901 "predicates-core",
828 "predicates-core",
902 "treeline",
829 "treeline",
@@ -913,9 +840,9 @@ dependencies = [
913
840
914[[package]]
841[[package]]
915name = "quote"
842name = "quote"
916−version = "1.0.7"
843+version = "1.0.8"
917source = "registry+https://github.com/rust-lang/crates.io-index"
844source = "registry+https://github.com/rust-lang/crates.io-index"
918−checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
845+checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df"
919dependencies = [
846dependencies = [
920 "proc-macro2",
847 "proc-macro2",
921]
848]
@@ -1003,9 +930,9 @@ dependencies = [
1003
930
1004[[package]]
931[[package]]
1005name = "rust-argon2"
932name = "rust-argon2"
1006−version = "0.8.2"
933+version = "0.8.3"
1007source = "registry+https://github.com/rust-lang/crates.io-index"
934source = "registry+https://github.com/rust-lang/crates.io-index"
1008−checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19"
935+checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb"
1009dependencies = [
936dependencies = [
1010 "base64",
937 "base64",
1011 "blake2b_simd",
938 "blake2b_simd",
@@ -1051,12 +978,11 @@ dependencies = [
1051
978
1052[[package]]
979[[package]]
1053name = "semver-parser"
980name = "semver-parser"
1054−version = "0.10.0"
981+version = "0.10.2"
1055source = "registry+https://github.com/rust-lang/crates.io-index"
982source = "registry+https://github.com/rust-lang/crates.io-index"
1056−checksum = "0e012c6c5380fb91897ba7b9261a0f565e624e869d42fe1a1d03fa0d68a083d5"
983+checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7"
1057dependencies = [
984dependencies = [
1058 "pest",
985 "pest",
1059− "pest_derive",
1060]
986]
1061
987
1062[[package]]
988[[package]]
@@ -1081,9 +1007,9 @@ dependencies = [
1081
1007
1082[[package]]
1008[[package]]
1083name = "serde_json"
1009name = "serde_json"
1084−version = "1.0.58"
1010+version = "1.0.61"
1085source = "registry+https://github.com/rust-lang/crates.io-index"
1011source = "registry+https://github.com/rust-lang/crates.io-index"
1086−checksum = "a230ea9107ca2220eea9d46de97eddcb04cd00e92d13dda78e478dd33fa82bd4"
1012+checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a"
1087dependencies = [
1013dependencies = [
1088 "itoa",
1014 "itoa",
1089 "ryu",
1015 "ryu",
@@ -1092,9 +1018,9 @@ dependencies = [
1092
1018
1093[[package]]
1019[[package]]
1094name = "serde_yaml"
1020name = "serde_yaml"
1095−version = "0.8.14"
1021+version = "0.8.15"
1096source = "registry+https://github.com/rust-lang/crates.io-index"
1022source = "registry+https://github.com/rust-lang/crates.io-index"
1097−checksum = "f7baae0a99f1a324984bcdc5f0718384c1f69775f1c7eec8b859b71b443e3fd7"
1023+checksum = "971be8f6e4d4a47163b405a3df70d14359186f9ab0f3a3ec37df144ca1ce089f"
1098dependencies = [
1024dependencies = [
1099 "dtoa",
1025 "dtoa",
1100 "linked-hash-map",
1026 "linked-hash-map",
@@ -1124,18 +1050,6 @@ dependencies = [
1124 "syn",
1050 "syn",
1125]
1051]
1126
1052
1127−[[package]]
1128−name = "sha-1"
1129−version = "0.8.2"
1130−source = "registry+https://github.com/rust-lang/crates.io-index"
1131−checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df"
1132−dependencies = [
1133− "block-buffer",
1134− "digest",
1135− "fake-simd",
1136− "opaque-debug",
1137−]
1138−
1139[[package]]
1053[[package]]
1140name = "shell-words"
1054name = "shell-words"
1141version = "1.0.0"
1055version = "1.0.0"
@@ -1148,6 +1062,16 @@ version = "1.6.0"
1148source = "registry+https://github.com/rust-lang/crates.io-index"
1062source = "registry+https://github.com/rust-lang/crates.io-index"
1149checksum = "1a55ca5f3b68e41c979bf8c46a6f1da892ca4db8f94023ce0bd32407573b1ac0"
1063checksum = "1a55ca5f3b68e41c979bf8c46a6f1da892ca4db8f94023ce0bd32407573b1ac0"
1150
1064
1065+[[package]]
1066+name = "snailquote"
1067+version = "0.3.0"
1068+source = "registry+https://github.com/rust-lang/crates.io-index"
1069+checksum = "f34b729d802f52194598858ac852c3fb3b33f6e026cd03195072ccb7bf3fc810"
1070+dependencies = [
1071+ "thiserror",
1072+ "unicode_categories",
1073+]
1074+
1151[[package]]
1075[[package]]
1152name = "std_prelude"
1076name = "std_prelude"
1153version = "0.2.12"
1077version = "0.2.12"
@@ -1162,9 +1086,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
1162
1086
1163[[package]]
1087[[package]]
1164name = "syn"
1088name = "syn"
1165−version = "1.0.42"
1089+version = "1.0.58"
1166source = "registry+https://github.com/rust-lang/crates.io-index"
1090source = "registry+https://github.com/rust-lang/crates.io-index"
1167−checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228"
1091+checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5"
1168dependencies = [
1092dependencies = [
1169 "proc-macro2",
1093 "proc-macro2",
1170 "quote",
1094 "quote",
@@ -1194,6 +1118,16 @@ dependencies = [
1194 "yaml-rust",
1118 "yaml-rust",
1195]
1119]
1196
1120
1121+[[package]]
1122+name = "sys-info"
1123+version = "0.7.0"
1124+source = "registry+https://github.com/rust-lang/crates.io-index"
1125+checksum = "e5cfbd84f86389198ade41b439f72a5b1b3a8ba728e61cd589e1720d0df44c39"
1126+dependencies = [
1127+ "cc",
1128+ "libc",
1129+]
1130+
1197[[package]]
1131[[package]]
1198name = "tempdir"
1132name = "tempdir"
1199version = "0.3.7"
1133version = "0.3.7"
@@ -1234,6 +1168,26 @@ dependencies = [
1234 "unicode-width",
1168 "unicode-width",
1235]
1169]
1236
1170
1171+[[package]]
1172+name = "thiserror"
1173+version = "1.0.23"
1174+source = "registry+https://github.com/rust-lang/crates.io-index"
1175+checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146"
1176+dependencies = [
1177+ "thiserror-impl",
1178+]
1179+
1180+[[package]]
1181+name = "thiserror-impl"
1182+version = "1.0.23"
1183+source = "registry+https://github.com/rust-lang/crates.io-index"
1184+checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1"
1185+dependencies = [
1186+ "proc-macro2",
1187+ "quote",
1188+ "syn",
1189+]
1190+
1237[[package]]
1191[[package]]
1238name = "thread_local"
1192name = "thread_local"
1239version = "1.0.1"
1193version = "1.0.1"
@@ -1245,21 +1199,24 @@ dependencies = [
1245
1199
1246[[package]]
1200[[package]]
1247name = "tinyvec"
1201name = "tinyvec"
1248−version = "0.3.4"
1202+version = "1.1.0"
1249source = "registry+https://github.com/rust-lang/crates.io-index"
1203source = "registry+https://github.com/rust-lang/crates.io-index"
1250−checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117"
1204+checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f"
1205+dependencies = [
1206+ "tinyvec_macros",
1207+]
1251
1208
1252[[package]]
1209[[package]]
1253−name = "treeline"
1210+name = "tinyvec_macros"
1254version = "0.1.0"
1211version = "0.1.0"
1255source = "registry+https://github.com/rust-lang/crates.io-index"
1212source = "registry+https://github.com/rust-lang/crates.io-index"
1256−checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41"
1213+checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
1257
1214
1258[[package]]
1215[[package]]
1259−name = "typenum"
1216+name = "treeline"
1260−version = "1.12.0"
1217+version = "0.1.0"
1261source = "registry+https://github.com/rust-lang/crates.io-index"
1218source = "registry+https://github.com/rust-lang/crates.io-index"
1262−checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
1219+checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41"
1263
1220
1264[[package]]
1221[[package]]
1265name = "ucd-trie"
1222name = "ucd-trie"
@@ -1278,9 +1235,9 @@ dependencies = [
1278
1235
1279[[package]]
1236[[package]]
1280name = "unicode-normalization"
1237name = "unicode-normalization"
1281−version = "0.1.13"
1238+version = "0.1.16"
1282source = "registry+https://github.com/rust-lang/crates.io-index"
1239source = "registry+https://github.com/rust-lang/crates.io-index"
1283−checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977"
1240+checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606"
1284dependencies = [
1241dependencies = [
1285 "tinyvec",
1242 "tinyvec",
1286]
1243]
@@ -1297,12 +1254,19 @@ version = "0.2.1"
1297source = "registry+https://github.com/rust-lang/crates.io-index"
1254source = "registry+https://github.com/rust-lang/crates.io-index"
1298checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
1255checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
1299
1256
1257+[[package]]
1258+name = "unicode_categories"
1259+version = "0.1.1"
1260+source = "registry+https://github.com/rust-lang/crates.io-index"
1261+checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
1262+
1300[[package]]
1263[[package]]
1301name = "url"
1264name = "url"
1302−version = "2.1.1"
1265+version = "2.2.0"
1303source = "registry+https://github.com/rust-lang/crates.io-index"
1266source = "registry+https://github.com/rust-lang/crates.io-index"
1304−checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb"
1267+checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e"
1305dependencies = [
1268dependencies = [
1269+ "form_urlencoded",
1306 "idna",
1270 "idna",
1307 "matches",
1271 "matches",
1308 "percent-encoding",
1272 "percent-encoding",
@@ -1310,9 +1274,9 @@ dependencies = [
1310
1274
1311[[package]]
1275[[package]]
1312name = "vcpkg"
1276name = "vcpkg"
1313−version = "0.2.10"
1277+version = "0.2.11"
1314source = "registry+https://github.com/rust-lang/crates.io-index"
1278source = "registry+https://github.com/rust-lang/crates.io-index"
1315−checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c"
1279+checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb"
1316
1280
1317[[package]]
1281[[package]]
1318name = "vec_map"
1282name = "vec_map"
@@ -1400,9 +1364,9 @@ checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a"
1400
1364
1401[[package]]
1365[[package]]
1402name = "yaml-rust"
1366name = "yaml-rust"
1403−version = "0.4.4"
1367+version = "0.4.5"
1404source = "registry+https://github.com/rust-lang/crates.io-index"
1368source = "registry+https://github.com/rust-lang/crates.io-index"
1405−checksum = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d"
1369+checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
1406dependencies = [
1370dependencies = [
1407 "linked-hash-map",
1371 "linked-hash-map",
1408]
1372]
Cargo.toml+1
@@ -51,6 +51,7 @@ serde_yaml = "0.8"
51semver = "0.11"
51semver = "0.11"
52path_abs = { version = "0.5", default-features = false }
52path_abs = { version = "0.5", default-features = false }
53clircle = "0.2.0"
53clircle = "0.2.0"
54+bugreport = "0.3"
54
55
55[dependencies.git2]
56[dependencies.git2]
56version = "0.13"
57version = "0.13"
assets/syntaxes/02_Extra/VimL.sublime-syntaxdeleted−91
@@ -1,91 +0,0 @@
1−%YAML 1.2
2−---
3−# http://www.sublimetext.com/docs/3/syntax.html
4−name: VimL
5−file_extensions:
6− - vim
7− - .vimrc
8−scope: source.viml
9−contexts:
10− main:
11− - include: comment
12− - include: string_quoted_double
13− - include: string_quoted_single
14− - include: string_regex
15− - include: inline_comment
16− - include: number_int
17− - include: number_hex
18− - include: keyword
19− - include: support_function
20− - include: support_variable
21− - include: support_type
22− - include: function_params
23− - include: function_definition
24− - include: function_call
25− - include: function
26− - include: variable
27− - include: expr
28− comment:
29− - match: ^\s*".*$
30− scope: comment.line.quotes.viml
31− captures:
32− 1: punctuation.definition.comment.vim
33− expr:
34− - match: (\|\||&&|==(\?|#)?|(!|>|<)=(#|\?)?|(=|!)~(#|\?)?|(>|<)(#|\?)is|isnot|\.|\*|\\|%)
35− scope: storage.function.viml
36− function:
37− - match: \b(fu(n|nction)?|end(f|fu|fun|function)?)\b
38− scope: storage.function.viml
39− function_call:
40− - match: '(([sgbwtl]|)?:?[0-9a-zA-Z_#]+)(?=\()'
41− scope: support.function.any-method
42− function_definition:
43− - match: '^\s*(function)\s*!?\s+(?=(s:)?[0-9a-zA-Z_#]+\s*\()'
44− captures:
45− 1: storage.function.viml
46− push:
47− - meta_scope: meta.function.viml
48− - match: (\()
49− captures:
50− 1: punctuation.definition.parameters.begin.viml
51− pop: true
52− - match: "(s:)?[0-9a-zA-Z_#]+"
53− scope: entity.name.function.viml
54− function_params:
55− - match: '-\w+='
56− scope: support.type.viml
57− inline_comment:
58− - match: '(?!\$)(")(?!\{).*$\n?'
59− scope: comment.line.quotes.viml
60− captures:
61− 1: punctuation.definition.comment.vim
62− keyword:
63− - match: \b(if|while|for|try|return|throw|end(if|for|while|try)?|au(g|group)|else(if|)?|do|in|catch|finally|:)\b
64− scope: keyword.control.viml
65− number_hex:
66− - match: "0x[0-9a-f]+"
67− scope: constant.numeric.hex
68− number_int:
69− - match: '-?\d+'
70− scope: constant.numeric.integer
71− string_quoted_double:
72− - match: '"(\\\\|\\"|\n[^\S\n]*\\|[^\n"])*"'
73− scope: string.quoted.double.viml
74− string_quoted_single:
75− - match: '''(''''|\n[^\S\n]*\\|[^\n''])*'''
76− scope: string.quoted.single.viml
77− string_regex:
78− - match: '[gvs]{1}/(\\\\|\\/|\n[^\S\n]*\\|[^\n/])*/'
79− scope: string.regexp.viml
80− support_function:
81− - match: \b(set(local|global)?|let|command|filetype|syntax|colorscheme|\w*map|\w*a(b|brev)?|syn|exe(c|cute)?|ec(ho|)?|au(tocmd|)?)\b
82− scope: support.function.viml
83− support_type:
84− - match: <.*?>
85− scope: support.type.viml
86− support_variable:
87− - match: '\b(am(enu|)?|(hl|inc)?search|[Bb]uf([Nn]ew[Ff]ile|[Rr]ead)?|[Ff]ile[Tt]ype)\b'
88− scope: support.variable.viml
89− variable:
90− - match: '([sSgGbBwWlLaAvV]:|@|$|&(?!&))\w*'
91− scope: variable.other.viml
src/bin/bat/clap_app.rs+7
@@ -477,6 +477,13 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
477 .hidden(true)
477 .hidden(true)
478 .help("Show bat's cache directory."),
478 .help("Show bat's cache directory."),
479 )
479 )
480+ .arg(
481+ Arg::with_name("diagnostic")
482+ .long("diagnostic")
483+ .alias("diagnostics")
484+ .hidden_short_help(true)
485+ .help("Show diagnostic information for bug reports.")
486+ )
480 .help_message("Print this help message.")
487 .help_message("Print this help message.")
481 .version_message("Show version information.");
488 .version_message("Show version information.");
482
489
src/bin/bat/main.rs+31−2
@@ -35,8 +35,7 @@ use bat::{
35 error::*,
35 error::*,
36 input::Input,
36 input::Input,
37 style::{StyleComponent, StyleComponents},
37 style::{StyleComponent, StyleComponents},
38− MappingTarget,
38+ MappingTarget, PagingMode,
39− PagingMode,
40};
39};
41
40
42const THEME_PREVIEW_DATA: &[u8] = include_bytes!("../../../assets/theme_preview.rs");
41const THEME_PREVIEW_DATA: &[u8] = include_bytes!("../../../assets/theme_preview.rs");
@@ -228,6 +227,36 @@ fn run_controller(inputs: Vec<Input>, config: &Config) -> Result<bool> {
228fn run() -> Result<bool> {
227fn run() -> Result<bool> {
229 let app = App::new()?;
228 let app = App::new()?;
230
229
230+ if app.matches.is_present("diagnostic") {
231+ use bugreport::{bugreport, collector::*, format::Markdown};
232+
233+ bugreport!()
234+ .info(SoftwareVersion::default())
235+ .info(OperatingSystem::default())
236+ .info(CommandLine::default())
237+ .info(EnvironmentVariables::list(&[
238+ "SHELL",
239+ "PAGER",
240+ "BAT_CACHE_PATH",
241+ "BAT_CONFIG_PATH",
242+ "BAT_OPTS",
243+ "BAT_PAGER",
244+ "BAT_STYLE",
245+ "BAT_TABS",
246+ "BAT_THEME",
247+ "XDG_CONFIG_HOME",
248+ "XDG_CACHE_HOME",
249+ "COLORTERM",
250+ "NO_COLOR",
251+ ]))
252+ .info(FileContent::new("Config file", config_file()))
253+ .info(CompileTimeInformation::default())
254+ .info(CommandOutput::new("Less version", "less", &["--version"]))
255+ .print::<Markdown>();
256+
257+ return Ok(true);
258+ }
259+
231 match app.matches.subcommand() {
260 match app.matches.subcommand() {
232 ("cache", Some(cache_matches)) => {
261 ("cache", Some(cache_matches)) => {
233 // If there is a file named 'cache' in the current working directory,
262 // If there is a file named 'cache' in the current working directory,
tests/integration_tests.rs+17
@@ -7,10 +7,16 @@ use std::fs::File;
7use std::path::{Path, PathBuf};
7use std::path::{Path, PathBuf};
8use std::process::{Command, Stdio};
8use std::process::{Command, Stdio};
9use std::str::from_utf8;
9use std::str::from_utf8;
10+
11+#[cfg(unix)]
10use std::time::Duration;
12use std::time::Duration;
11
13
12const EXAMPLES_DIR: &str = "tests/examples";
14const EXAMPLES_DIR: &str = "tests/examples";
15+
16+#[cfg(unix)]
13const SAFE_CHILD_PROCESS_CREATION_TIME: Duration = Duration::from_millis(100);
17const SAFE_CHILD_PROCESS_CREATION_TIME: Duration = Duration::from_millis(100);
18+
19+#[cfg(unix)]
14const CHILD_WAIT_TIMEOUT: Duration = Duration::from_secs(15);
20const CHILD_WAIT_TIMEOUT: Duration = Duration::from_secs(15);
15
21
16fn bat_raw_command() -> Command {
22fn bat_raw_command() -> Command {
@@ -669,6 +675,17 @@ fn alias_pager_disable_long_overrides_short() {
669 .stdout(predicate::eq("pager-output\n").normalize());
675 .stdout(predicate::eq("pager-output\n").normalize());
670}
676}
671
677
678+#[test]
679+fn pager_failed_to_parse() {
680+ bat()
681+ .env("BAT_PAGER", "mismatched-quotes 'a")
682+ .arg("--paging=always")
683+ .arg("test.txt")
684+ .assert()
685+ .failure()
686+ .stderr(predicate::str::contains("Could not parse pager command"));
687+}
688+
672#[test]
689#[test]
673fn config_location_test() {
690fn config_location_test() {
674 bat_with_config()
691 bat_with_config()