Better use of constants

This commit is contained in:
Bruno Sutic 2015-10-12 14:25:54 +02:00
parent 2e82b583ff
commit dc9853942b
No known key found for this signature in database
GPG key ID: CAFA7B1B2914ED81
3 changed files with 7 additions and 5 deletions

View file

@ -1,11 +1,12 @@
#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
HELPERS_DIR="$CURRENT_DIR"
TMUX_COPY_MODE=""
REMOTE_SHELL_WAIT_TIME="0.4"
source "$CURRENT_DIR/key_binding_helpers.sh"
source "$HELPERS_DIR/helpers.sh"
# sets a TMUX_COPY_MODE that is used as a global variable
get_tmux_copy_mode() {

View file

@ -1,7 +1,6 @@
#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SCRIPTS_DIR="$CURRENT_DIR"
HELPERS_DIR="$CURRENT_DIR"
source "$HELPERS_DIR/helpers.sh"

View file

@ -1,8 +1,10 @@
#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SCRIPTS_DIR="$CURRENT_DIR/scripts"
HELPERS_DIR="$CURRENT_DIR/scripts"
source "$CURRENT_DIR/scripts/helpers.sh"
source "$HELPERS_DIR/helpers.sh"
clipboard_copy_without_newline_command() {
local copy_command="$1"
@ -43,8 +45,8 @@
}
set_normal_bindings() {
tmux bind-key "$(yank_line_key)" run-shell "$CURRENT_DIR/scripts/copy_line.sh"
tmux bind-key "$(yank_pane_pwd_key)" run-shell "$CURRENT_DIR/scripts/copy_pane_pwd.sh"
tmux bind-key "$(yank_line_key)" run-shell "$SCRIPTS_DIR/copy_line.sh"
tmux bind-key "$(yank_pane_pwd_key)" run-shell "$SCRIPTS_DIR/copy_pane_pwd.sh"
}
main() {