1
0
Fork 0
mirror of synced 2024-12-14 03:15:47 -05:00

Merge pull request #171 from gpakosz/support-source-q

Add support for 'source-file -q'
This commit is contained in:
Bruno Sutic 2020-09-04 09:14:23 +02:00 committed by GitHub
commit 60a36d6f7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,7 @@ _tmux_conf_contents() {
# return files sourced from tmux config files # return files sourced from tmux config files
_sourced_files() { _sourced_files() {
_tmux_conf_contents | _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 # Want to be able to abort in certain cases