What is Nostr?
Guillaume-Jean Herbiet /
npub1rc4…d6l7
2024-05-24 14:09:23

Guillaume-Jean Herbiet on Nostr: Moving away from #iTerm2 back to #macOS #terminal and would like the app to close ...

Moving away from #iTerm2 back to #macOS #terminal and would like the app to close when you quit your last shell? Add the following to ~/.zlogout :

```
if [ "$(ps | wc -l)" -eq 4 ]
then
osascript -e "do shell script \"osascript -e \\\"tell application \\\\\\\"Terminal\\\\\\\" to quit\\\" &> /dev/null &\""
exit
fi
```

Yes, that’s a lot of backslashes but we are doing #AppleScript inside #ZSH, inside #AppleScript inside #ZSH…
Author Public Key
npub1rc4t4fx4w6354k6u4wcwda3nltz3eg3ykzskkz7qchfejaa8gz2q4td6l7