Created
August 19, 2017 05:17
-
-
Save TAKAyukiatkwsk/629bcdd3e27954afadc1eabda3b208d9 to your computer and use it in GitHub Desktop.
tmux-plugin-list-sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# fetching the directory where plugins are installed | |
plugin_path="$(tmux show-env -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)" | |
# listing installed plugins | |
plugins=$(ls -1 "$plugin_path") | |
for plugin in $plugins; do | |
head=$(cd "$plugin_path/$plugin"; git log --oneline | head -n 1) | |
printf "%- 30s%s\n" "$plugin" "$head" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
実際は以下のような構成になります。