tmux-plugins / tpm

Tmux Plugin Manager
MIT License
11.95k stars 420 forks source link

Launch script on new plugin do nothing #154

Open RoXuS opened 5 years ago

RoXuS commented 5 years ago

Hi,

Thx for your big work on this project.

I have tried to do a plugin to list and open my projects quickly.

my .tmux file

#!/usr/bin/env bash

CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
tmux bind-key T run-shell "$CURRENT_DIR/scripts/tmux_list_plugins.sh"

my tmux_list_plugins.sh

#!/usr/bin/env bash

option_value=$(tmux show-option -gqv "@project-manager-root")
val=$(node ./scripts/tmux_list_plugins.js "${option_value}")
tmux new-window -c "$val"

When I launch the script manually it is ok but with the bind-key T, the new window is created but the script is not launched so $val is equal to empty (the window is created on the ~).

What I have missed?