mirror of
https://github.com/powerline/powerline.git
synced 2025-04-08 19:25:04 +02:00
tmux configuration has become very fragmented between versions due to a combination of new features and deprecation of older options. As such, version checking for tmux became a requirement to allow maximum functionality along with version-appropriate configuration. However, wrapping nearly every line with `if-shell` is tedious and becomes virtually unreadable. This enhancement to tmux version-checking creates a logical configuration file structure that reflects the development of tmux. As additional configurations are added and tmux development continues, this structure can be leveraged appropriately and extended as needed. Rather than having multiple `if-shell` checks for the same version, each version or version group with specific requirements can be checked only once. This leads to simpler and fewer `if-shell` version checks. It also reduces the ambiguity introduced by complex `if-shell` commands that include an 'else' conditional. A caveat to adding this enhancement is the additional requirement of the end user to add a tmux variable definition (`POWERLINE_BINDINGS_DIR`) to his/her `~/.tmux.conf` file. For existing tmux users leveraging powerline, this may prove to be a slight one-time nuisance immediately after upgrading. Without this definition, there is no way to determine the location of the additional tmux powerline config files that have been added with this enhancement. The docs have also been updated in this commit to reflect this initial configuration requirement change. Also added are some additional troubleshooting notes that point to definition of this variable as a potential issue. Powerline will continue to work without the definition of `POWERLINE_BINDINGS_DIR`, but some of the functionality will be reduced and the appearance incomplete (i.e. colors). Ultimately, the caveat above is a small price to pay in exchange for a framework that can be leveraged for proper version-appropriate configuration of tmux going forward.