mirror of
https://github.com/tmux-plugins/tpm.git
synced 2025-09-14 00:46:56 +00:00
Move all helpers to 'helpers/' dir
This commit is contained in:
@ -5,7 +5,8 @@
|
||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
HELPERS_DIR="$CURRENT_DIR/helpers"
|
||||
|
||||
source "$CURRENT_DIR/shared_functions.sh"
|
||||
source "$HELPERS_DIR/plugin_functions.sh"
|
||||
source "$HELPERS_DIR/utility.sh"
|
||||
|
||||
if [ "$1" == "--tmux-echo" ]; then # tmux-specific echo functions
|
||||
source "$HELPERS_DIR/tmux_echo_functions.sh"
|
||||
@ -18,7 +19,7 @@ shift
|
||||
|
||||
pull_changes() {
|
||||
local plugin="$1"
|
||||
local plugin_path="$(shared_plugin_path "$plugin")"
|
||||
local plugin_path="$(plugin_path_helper "$plugin")"
|
||||
cd "$plugin_path" &&
|
||||
GIT_TERMINAL_PROMPT=0 git pull &&
|
||||
GIT_TERMINAL_PROMPT=0 git submodule update --init --recursive
|
||||
@ -35,9 +36,9 @@ update() {
|
||||
update_all() {
|
||||
echo_ok "Updating all plugins!"
|
||||
echo_ok ""
|
||||
local plugins="$(shared_get_tpm_plugins_list)"
|
||||
local plugins="$(tpm_plugins_list_helper)"
|
||||
for plugin in $plugins; do
|
||||
local plugin_name="$(shared_plugin_name "$plugin")"
|
||||
local plugin_name="$(plugin_name_helper "$plugin")"
|
||||
# updating only installed plugins
|
||||
if plugin_already_installed "$plugin_name"; then
|
||||
update "$plugin_name"
|
||||
@ -48,7 +49,7 @@ update_all() {
|
||||
update_plugins() {
|
||||
local plugins="$*"
|
||||
for plugin in $plugins; do
|
||||
local plugin_name="$(shared_plugin_name "$plugin")"
|
||||
local plugin_name="$(plugin_name_helper "$plugin")"
|
||||
if plugin_already_installed "$plugin_name"; then
|
||||
update "$plugin_name"
|
||||
else
|
||||
|
Reference in New Issue
Block a user