1
0
mirror of https://github.com/Morantron/tmux-fingers.git synced 2024-06-20 06:46:44 +02:00

remove health-check from startup

This commit is contained in:
Jorge Morante 2018-11-08 09:27:53 +01:00
parent 8fb8abea7a
commit 1acf8bc005
4 changed files with 14 additions and 22 deletions

View File

@ -225,6 +225,14 @@ Custom format for the highlighted match. See [@fingers-hint-format](#fingers-hin
Same as above, used when `@fingers-compact-hints` is set to `0`.
# Troubleshooting
If you encounter any problems you can run the following command to automatically detect common problems:
` $ /path/to/tmux-fingers/scripts/health-check.sh`
More info in [health-check.md](./docs/health-check.md)
# Acknowledgements and inspiration
This plugin is heavily inspired by

View File

@ -1,9 +1,13 @@
# Health check troubleshooting
*tmux-fingers* performs a health check on startup to ensure that your system has all dependencies needed to run smoothly.
`health-check.sh` performs a checks to ensure that your system has all dependencies needed to run smoothly.
They are not much, and in most GNU/linux environments these are the defaults anyway.
To run the check you need to run the following command.
`$ /path/to/tmux-fingers/scripts/health-check.sh`
## gawk not found
Install `gawk` package.
@ -27,14 +31,6 @@ This probably means you are running OSX, which ships with *bash 3*. In order to
You can install latest *tmux* from source, check https://github.com/tmux/tmux
## How to skip the check
If can't skip this check by adding the following in your .tmux.conf file:
```
set -g @fingers-skip-health-check '1'
```
## Wrong $TERM value
Tmux fingers works better with proper 256 support. Set `@default-terminal` to either `screen-256color` or `xterm-256color`.

View File

@ -118,12 +118,6 @@ function perform_health_check() {
GAWK_VERSION=$(gawk -W version | grep -Eo "[0-9]+\.[0-9]\.[0-9]" | head -n 1)
fi
FINGERS_SKIP_HEALTH_CHECK=$(tmux show-option -gqv @fingers-skip-health-check)
if [[ $FINGERS_SKIP_HEALTH_CHECK -eq 1 ]]; then
return
fi
if [[ $(program_exists "gawk") = 0 ]]; then
log_message " * 'gawk' not found"
healthy=0
@ -191,8 +185,6 @@ function perform_health_check() {
log_message ""
log_message " $HELP_LINK"
log_message ""
log_message "To skip this check add \"set -g @fingers-skip-health-check '1'\" to your tmux conf"
log_message ""
dump_log
@ -200,10 +192,7 @@ function perform_health_check() {
: # waiting for-tmux
done
local health_window_id=$(tmux new-window -P -n "[tmux-fingers health-check]" "tmux wait-for -S health_output && cat $health_tmp | less")
tmux wait-for health_output
tmux split-window -t "$health_window_id" -v -l 15 -c "$TMUX_FINGERS_ROOT"
tmux select-window -t "$health_window_id"
cat $health_tmp
fi
sleep 0.5

View File

@ -2,7 +2,6 @@
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
tmux run -b "$CURRENT_DIR/scripts/health-check.sh"
tmux run -b "bash --norc --noprofile $CURRENT_DIR/scripts/config.sh"
DEFAULT_FINGERS_KEY="F"