mirror of
https://github.com/tmux-plugins/tmux-yank.git
synced 2026-09-10 07:36:17 -04:00
Better use of constants
This commit is contained in:
parent
2e82b583ff
commit
dc9853942b
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue