Skip to content

Commit c45bf81

Browse files
committed
Modified: README.md
1 parent 9010684 commit c45bf81

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ Requirements for some segments. You only need to fulfill the requirements for th
9595

9696
The `grep` tool is outdated on OS X 10.8 Mountain Lion so you might have to upgrade it.
9797

98-
```console
99-
$ brew install grep
98+
```shell
99+
brew install grep
100100
```
101101

102102
## FreeBSD specific requirements
@@ -107,9 +107,9 @@ Preinstalled `grep` in FreeBSD doesn't support Perl regexp. Solution is rather s
107107
# Installation
108108
Start with checking out the repository with:
109109

110-
```console
111-
$ cd ~/some/path/
112-
$ git clone https://github.com/erikw/tmux-powerline.git
110+
```shell
111+
cd ~/some/path/
112+
git clone https://github.com/erikw/tmux-powerline.git
113113
```
114114

115115
Now edit your `~/.tmux.conf` to use the scripts:
@@ -141,7 +141,7 @@ bind C-] run '~/path/to/tmux-powerline/mute_powerline.sh right' # Mute right st
141141

142142
Some segments e.g. cwd and cvs_branch needs to find the current working directory of the active pane. To achieve this we let tmux save the path each time the shell prompt is displayed. Put the line below in your `~/.bashrc` or where you define you PS1 variable. zsh users can put it in e.g. `~/.zshrc` and may change `PS1` to `PROMPT` (but that's not necessary).
143143

144-
```console
144+
```bash
145145
PS1="$PS1"'$([ -n "$TMUX" ] && tmux setenv TMUXPWD_$(tmux display -p "#D" | tr -d %) "$PWD")'
146146
```
147147

@@ -158,30 +158,30 @@ If you have a recent version of tmux (≥ 2.1), there is no need to redefine th
158158

159159
The default segments that are shown are defined in `themes/default.sh`. You will probably want to change those to fit your needs. To do so you can edit that file directly but preferable, for easier updating of the repo, you can make a copy and edit that one (or see how to use custom themes directory below). A palette of colors that can be used can be obtained by running the script `color_palette.sh`.
160160

161-
```console
162-
$ cp themes/default.sh themes/mytheme.sh
163-
$ $EDITOR themes/mytheme.sh
161+
```shell
162+
cp themes/default.sh themes/mytheme.sh
163+
$EDITOR themes/mytheme.sh
164164
```
165165
Now generate a default configuration file by doing
166166

167-
```console
168-
$ ./generate_rc.sh
169-
$ mv ~/.tmux-powerlinerc.default ~/.tmux-powerlinerc # or to $XDG_CONFIG_HOME/tmux-powerline/config.sh
170-
$ $EDITOR ~/.tmux-powerlinerc
167+
```shell
168+
./generate_rc.sh
169+
mv ~/.tmux-powerlinerc.default ~/.tmux-powerlinerc # or to $XDG_CONFIG_HOME/tmux-powerline/config.sh
170+
$EDITOR ~/.tmux-powerlinerc
171171
```
172172
and change theme to use and values for segments you want to use. If you want to keep the repo checkout clean you can set custom segment and theme paths in the general section and then store your files outside the repo.
173173

174174
# Debugging
175175

176176
Some segments might not work on your system for various reasons such as missing programs or different versions not having the same options. To find out which segment is not working it may help to enable the debug setting in `~/.tmux-powerlinerc`. However this may not be enough to determine the error so you can inspect all executed bash commands (will be a long output) by doing
177177

178-
```console
179-
$ bash -x powerline.sh (left|right)
178+
```shell
179+
bash -x powerline.sh (left|right)
180180
```
181181

182182
To debug smaller portions of code, say if you think the problem lies in a specific segment, insert these lines at the top and bottom of the relevant code portions e.g. inside a function:
183183

184-
```console
184+
```bash
185185
set -x
186186
exec 2>/tmp/tmux-powerline.log
187187
<code to debug>
@@ -190,7 +190,7 @@ set +x
190190

191191
and then inspect the outputs like
192192

193-
```console
193+
```shell
194194
less /tmp/tmux-powerline.log
195195
tail -f /tmp/tmux-powerline.log # or follow output like this.
196196
```
@@ -206,8 +206,8 @@ The issue is probably that the update of the current directory in the active pan
206206
### Nothing is displayed
207207
You have edited `~/.tmux.conf` but no powerline is displayed. This might be because tmux is not aware of the changes so you have to restart your tmux session or reloaded that file by typing this on the command line (or in tmux command mode with `prefix :`)
208208

209-
```console
210-
$ tmux source-file ~/.tmux.conf
209+
```shell
210+
tmux source-file ~/.tmux.conf
211211
```
212212
### Multiple lines in bash or no powerline in zsh using iTerm (OS X)
213213
If your tmux looks like [this](https://github.com/erikw/tmux-powerline/issues/125) then you may have to in iTerm uncheck [Unicode East Asian Ambiguous characters are wide] in Preferences -> Settings -> Advanced.

0 commit comments

Comments
 (0)