mirror of https://github.com/tmux-plugins/tpm
Add support for 'source-file -q', fixes #135
Starting from tmux 2.3, 'source-file' understands '-q' to suppress errors for nonexistent files.pull/171/head
parent
06d41226af
commit
788f5d68af
|
@ -46,7 +46,7 @@ _tmux_conf_contents() {
|
|||
# return files sourced from tmux config files
|
||||
_sourced_files() {
|
||||
_tmux_conf_contents |
|
||||
awk '/^[ \t]*source(-file)? +/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $2 }'
|
||||
sed -E -n -e "s/^[[:space:]]*source(-file)?[[:space:]]+(-q+[[:space:]]+)?['\"]?([^'\"]+)['\"]?/\3/p"
|
||||
}
|
||||
|
||||
# Want to be able to abort in certain cases
|
||||
|
|
Loading…
Reference in New Issue