aboutsummaryrefslogtreecommitdiff
path: root/debug/font-issues.zsh
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-12-04 10:32:04 +0300
committerDominik Ritter <dritter03@googlemail.com>2019-02-03 10:51:03 +0300
commit2fbdb8c982db7af4bec91ed6569351b18d5325b4 (patch)
treed13a08448e74f99336dbc06bbe937c4a05e21a80 /debug/font-issues.zsh
parentcdf3fa51f21d3ec39cc9a54a9e6271dab11c8741 (diff)
Mute errors when detecting font
Diffstat (limited to 'debug/font-issues.zsh')
-rwxr-xr-xdebug/font-issues.zsh10
1 files changed, 5 insertions, 5 deletions
diff --git a/debug/font-issues.zsh b/debug/font-issues.zsh
index 7435e9fe..dfd1f90e 100755
--- a/debug/font-issues.zsh
+++ b/debug/font-issues.zsh
@@ -163,26 +163,26 @@ END
font_file="${HOME}/Library/Preferences/com.googlecode.iterm2.plist"
# Count Guids in "New Bookmarks"; they should be unique
- profiles_count="$(/usr/libexec/PlistBuddy -c "Print ':New Bookmarks:'" "$font_file" | \
+ profiles_count="$(/usr/libexec/PlistBuddy -c "Print ':New Bookmarks:'" "$font_file" 2>/dev/null | \
grep -w -c "Guid")"
for ((i=0; i<profiles_count; i++)); do
- profile_name="$(/usr/libexec/PlistBuddy -c "Print ':New Bookmarks:${i}:Name:'" "$font_file")"
+ profile_name="$(/usr/libexec/PlistBuddy -c "Print ':New Bookmarks:${i}:Name:'" "$font_file" 2>/dev/null)"
if [[ "$profile_name" == "$current_profile_name" ]]; then
# "Normal Font"
term_font="$(/usr/libexec/PlistBuddy -c "Print ':New Bookmarks:${i}:Normal Font:'" \
- "$font_file")"
+ "$font_file" 2>/dev/null)"
# Font for non-ascii characters
# Only check for a different non-ascii font, if the user checked
# the "use a different font for non-ascii text" switch.
diff_font="$(/usr/libexec/PlistBuddy -c "Print ':New Bookmarks:${i}:Use Non-ASCII Font:'" \
- "$font_file")"
+ "$font_file" 2>/dev/null)"
if [[ "$diff_font" == "true" ]]; then
non_ascii="$(/usr/libexec/PlistBuddy -c "Print ':New Bookmarks:${i}:Non Ascii Font:'" \
- "$font_file")"
+ "$font_file" 2>/dev/null)"
[[ "$term_font" != "$non_ascii" ]] && \
term_font="$term_font (normal) / $non_ascii (non-ascii)"