if !exists('g:tmux_complete_location') || g:tmux_complete_location == ''
    let g:tmux_complete_location =
        \ "$HOME/.vim/bundle/tmux-complete.vim"
endif

function! CompleteScript(findstart, base)
    if a:findstart
        " locate the start of the word
        let line = getline('.')
        let start = col('.') - 1
        while start > 0 && line[start - 1] =~ '\a'
            let start -= 1
        endwhile
        return start
    endif

    " find months matching with "a:base"
    let command = 'sh ' . shellescape(expand(s:script)) . ' ' . shellescape(a:base)
    let words = system(command)
    for word in split(words)
        call complete_add(word)
    endfor
    return []
endfun

let s:script = g:tmux_complete_location . "/sh/tmuxwords.sh"
set completefunc=CompleteScript

function! CompleteScript(findstart, base)
    if a:findstart
        " locate the start of the word
        let line = getline('.')
        let start = col('.') - 1
        while start > 0 && line[start - 1] =~ '\a'
            let start -= 1
        endwhile
        return start
    endif

    " find months matching with "a:base"
    let command = 'sh ' . shellescape(expand(s:script)) . ' ' . shellescape(a:base)
    let words = system(command)
    for word in split(words)
        call complete_add(word)
    endfor
    return []
endfun

let s:script = expand('<sfile>:h:h') . "/sh/tmuxwords.sh"
set completefunc=CompleteScript

Use expand <sfile> instead of g:tmux_complete_location
Use expand <sfile> instead of g:tmux_complete_location

wellle/tmux-complete.vim,wilywampa/tmux-complete.vim,wilywampa/tmux-complete.vim,wellle/tmux-complete.vim