Skip to content

Commit de0d342

Browse files
committed
Revert "Revert "term_font: fix iTerm2 checking 2 more profiles than exists""
This reverts commit f49919e.
1 parent f49919e commit de0d342

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

neofetch

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2800,9 +2800,10 @@ END
28002800
font_file="${HOME}/Library/Preferences/com.googlecode.iterm2.plist"
28012801

28022802
# Count Guids in "New Bookmarks"; they should be unique
2803-
profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" "$font_file" | grep -c "Guid")"
2803+
profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" "$font_file" | \
2804+
grep -w -c "Guid")"
28042805

2805-
for ((i=0; i<=profiles_count; i++)); do
2806+
for ((i=0; i<profiles_count; i++)); do
28062807
profile_name="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" "$font_file")"
28072808

28082809
if [[ "$profile_name" == "$current_profile_name" ]]; then

0 commit comments

Comments
 (0)