Ensure tmux-256color exists on macOS
As outlined in [this
gist](https://gist.github.com/bbqtd/a4ac060d6f6b9ea6fe3aabe735aa9d95)
the version of `ncurses` shipped with macOS is too old to be aware of
the `tmux-256color` terminal info database which is the default in
`tmux`. This patch downloads the latest `ncurses` terminal info database
and uses that to install the `tmux-256color` entry for the current user
in `~/.terminfo`. This ensures that bold, italic, etc, are working
correctly and `git` does not throw warnings as noted
[here](1e2c00aa32
)
This commit is contained in:
parent
7e9166cb48
commit
5cba48f632
@ -7,3 +7,38 @@
|
|||||||
- reattach-to-user-namespace
|
- reattach-to-user-namespace
|
||||||
- urlview
|
- urlview
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
|
- name: check terminal info description exists
|
||||||
|
command: /usr/bin/infocmp -x tmux-256color
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: terminfo_exists
|
||||||
|
|
||||||
|
- name: download latest terminal info descriptions
|
||||||
|
when: terminfo_exists.rc == 1
|
||||||
|
get_url:
|
||||||
|
url: https://invisible-island.net/datafiles/current/terminfo.src.gz
|
||||||
|
dest: ~/terminfo.src.gz
|
||||||
|
|
||||||
|
- name: extract latest terminfo info descriptions
|
||||||
|
when: terminfo_exists.rc == 1
|
||||||
|
command: /usr/bin/gunzip ~/terminfo.src.gz
|
||||||
|
|
||||||
|
- name: compile terminal info
|
||||||
|
when: terminfo_exists.rc == 1
|
||||||
|
command: /usr/bin/tic -xe tmux-256color ~/terminfo.src
|
||||||
|
|
||||||
|
- name: cleanup downloaded terminal info descriptions
|
||||||
|
when: terminfo_exists.rc == 1
|
||||||
|
file:
|
||||||
|
path: '{{item}}'
|
||||||
|
state: absent
|
||||||
|
with_items:
|
||||||
|
- ~/temrinfo.src.gz
|
||||||
|
- ~/terminfo.src
|
||||||
|
|
||||||
|
- name: check terminal info description exists
|
||||||
|
when: terminfo_exists.rc == 1
|
||||||
|
command: /usr/bin/infocmp -x tmux-256color
|
||||||
|
changed_when: false
|
||||||
|
register: terminfo_exists
|
||||||
|
Loading…
x
Reference in New Issue
Block a user