1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-08-13 01:29:41 +01:00
Files
.github
assets
build
diagnostics
doc
examples
scripts
test-completions.bash
test-completions.fish
test-completions.zsh
src
tests
.gitignore
.gitmodules
CHANGELOG.md
CONTRIBUTING.md
Cargo.lock
Cargo.toml
LICENSE-APACHE
LICENSE-MIT
NOTICE
README.md
rustfmt.toml
bat/scripts/test-completions.bash
2024-08-18 18:56:06 +02:00

12 lines
486 B
Bash
Executable File

#!/usr/bin/env bash
# Spawns a new bash shell that's set up with a PATH that points
# the `bat` executable and completions from the `target/` dir.
# Requires https://github.com/scop/bash-completion
target_dir="$(dirname "$(realpath "$0")")/../target/debug"
completion_file=$target_dir/build/bat-*/out/assets/completions/bat.bash
export PATH="$target_dir:$PATH"
bash --noprofile --rcfile <(echo "source /usr/share/bash-completion/bash_completion; source $completion_file") +o history