term_font: fix iTerm2 checking 2 more profiles than exists
This commit is contained in:
parent
5756eb97f2
commit
15c2939779
1 changed files with 2 additions and 2 deletions
4
neofetch
4
neofetch
|
@ -2800,9 +2800,9 @@ END
|
||||||
font_file="${HOME}/Library/Preferences/com.googlecode.iterm2.plist"
|
font_file="${HOME}/Library/Preferences/com.googlecode.iterm2.plist"
|
||||||
|
|
||||||
# Count Guids in "New Bookmarks"; they should be unique
|
# Count Guids in "New Bookmarks"; they should be unique
|
||||||
profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" "$font_file" | grep -c "Guid")"
|
profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" "$font_file" | grep -w -c "Guid")"
|
||||||
|
|
||||||
for ((i=0; i<=profiles_count; i++)); do
|
for ((i=0; i<profiles_count; i++)); do
|
||||||
profile_name="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" "$font_file")"
|
profile_name="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" "$font_file")"
|
||||||
|
|
||||||
if [[ "$profile_name" == "$current_profile_name" ]]; then
|
if [[ "$profile_name" == "$current_profile_name" ]]; then
|
||||||
|
|
Loading…
Reference in a new issue