We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fa164e9 + fd5a8fd commit 962573aCopy full SHA for 962573a
segments/air_color.sh
@@ -1,10 +1,8 @@
1
TMUX_POWERLINE_DIR_TEMPORARY="/tmp/tmux-powerline_${USER}"
2
air_temp_file="${TMUX_POWERLINE_DIR_TEMPORARY}/temp_air_file.txt"
3
4
-if [ -n $air_temp_file ]; then
5
- TMUX_POWERLINE_SEG_AIR_COLOR=$(awk '{print $NF}' $air_temp_file)
+if [ -n "$air_temp_file" ] && [ -f "$air_temp_file" ]; then
+ TMUX_POWERLINE_SEG_AIR_COLOR=$(awk '{print $NF}' "$air_temp_file")
6
fi
7
8
TMUX_POWERLINE_SEG_AIR_COLOR="${TMUX_POWERLINE_SEG_AIR_COLOR:-'37'}"
9
-
10
-echo "$TMUX_POWERLINE_SEG_AIR_COLOR"
0 commit comments