if string match -q "$ghqroot/*" $PWD
- set -l repopath (string replace "$ghqroot/" "" $PWD)
- set -l parts (string split "/" $repopath)
- # parts: 1=github.com 2=owner 3=repo 4...=subdir
- if test (count $parts) -ge 3
- tmux rename-window $parts3
- end
- end
end