1
0
Fork 0
mirror of synced 2024-12-22 06:31:07 -05:00

Permit leading whitespace with new plugin definition syntax

This commit is contained in:
Bruno Sutic 2015-06-03 01:29:09 +02:00
parent 583e447d33
commit e19b7689e0
No known key found for this signature in database
GPG key ID: 66D96E4F2F7EF26C
3 changed files with 4 additions and 3 deletions

View file

@ -6,6 +6,7 @@
- add uninstall/clean procedure and keybinding (prefix+alt+u) (@chilicuil) - add uninstall/clean procedure and keybinding (prefix+alt+u) (@chilicuil)
- add new `set @plugin 'repo'` plugin defintion syntax (@chilicuil) - add new `set @plugin 'repo'` plugin defintion syntax (@chilicuil)
- revert back to using `-g` flag in new plugin definition syntax - revert back to using `-g` flag in new plugin definition syntax
- permit leading whitespace with new plugin definition syntax (thanks @chilicuil)
### v1.2.2, 2015-02-08 ### v1.2.2, 2015-02-08
- set GIT_TERMINAL_PROMPT=0 when doing `git clone`, `pull` or `submodule update` - set GIT_TERMINAL_PROMPT=0 when doing `git clone`, `pull` or `submodule update`

View file

@ -15,9 +15,9 @@ shared_get_tpm_plugins_list() {
local plugins_list local plugins_list
plugins_list="$(tmux show-option -gqv "$tpm_plugins_variable_name")" plugins_list="$(tmux show-option -gqv "$tpm_plugins_variable_name")"
if [ -z "${plugins_list}" ]; then if [ -z "${plugins_list}" ]; then
#read set @plugin "tmux-plugins/tmux-example-plugin" entries #read set -g @plugin "tmux-plugins/tmux-example-plugin" entries
cat /etc/tmux.conf ~/.tmux.conf 2>/dev/null | cat /etc/tmux.conf ~/.tmux.conf 2>/dev/null |
awk '/^set +-g +@plugin/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $4 }' awk '/^ +set +-g +@plugin/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $4 }'
else else
printf "%s\\n" "${plugins_list}" printf "%s\\n" "${plugins_list}"
fi fi

View file

@ -24,7 +24,7 @@ test_plugin_installation() {
test_multiple_plugins_installation() { test_multiple_plugins_installation() {
set_tmux_conf_helper <<- HERE set_tmux_conf_helper <<- HERE
set -g @plugin "tmux-plugins/tmux-example-plugin" set -g @plugin "tmux-plugins/tmux-example-plugin"
set -g @plugin 'tmux-plugins/tmux-copycat' set -g @plugin 'tmux-plugins/tmux-copycat'
run-shell "$PWD/tpm" run-shell "$PWD/tpm"
HERE HERE