Make zsh show working directory in Terminal window title in macOS
While I was working on customizing my zsh configuration files for my zsh article series, I noticed that Terminal would not display the current working directory when using zsh. it worked fine when I switched back to bash.

Note: showing the working directory in the window or tab title is enabled by default in Terminal. You
scriptingosx.com/2019/09/make-

Weekly News Summary for Admins — 2019-09-13
New iPhones! New Apple Watch! Even a new entry level iPad! The Apple iPhone event delivered mostly within expectations. I am not going to link all the detailed posts, you can go to Apple’s Newsroom for the official details.

We got release dates for iOS 13 (Sep 19), iOS 13.1 (Sep 30), iPadOS (Sep 30, unclear if this is iPadOS 13.0 or 13.1, but likely the latter) and
scriptingosx.com/2019/09/weekl

Notarize a Command Line Tool
The upcoming macOS 10.15 Catalina will require more apps and tools to be notarized. Apple has some loosened the requirements at last minute, but these changed limitations are only temporary, to give developers more time to adapt.

Notarizing Mac Application bundles has its pitfalls, but is overall fairly well documented. However, I have been working on some command line tools written in Swift 5 a
scriptingosx.com/2019/09/notar

Weekly News Summary for Admins — 2019-09-06
You can tell from the various articles and support posts that release day is definitely getting closer.

iOS 10.13.1 beta 2 was release and it is questionable if we will see another beta of either iOS, iPadOS or macOS before release. Apple has loosened notarization requirements for macOS Catalina temporarily (until Jan 2020) to help developer handle the transition.

scriptingosx.com/2019/09/weekl

Moving to zsh
Articles

This is a series of articles I wrote in the summer of 2019, right after Apple announced that they were switching the default shell in macOS from bash to zsh.

Part 1: Moving to zshPart 2: Configuration FilesPart 3: Shell OptionsPart 4: Aliases and FunctionsPart 5: CompletionsPart 6: Customizing the zsh PromptPart 7: MiscellaneaPart 8: Scripting zsh

More Articles

Shellcheck and zshGet Current User in Shell Scripts
scriptingosx.com/moving-to-zsh

Moving to zsh
Articles

Part 1: Moving to zshPart 2: Configuration FilesPart 3: Shell OptionsPart 4: Aliases and FunctionsPart 5: CompletionsPart 6: Customizing the zsh PromptPart 7: MiscellaneaPart 8: Scripting zsh

This is a series of articles I wrote in the summer of 2019, right after Apple announced that they were switching the default shell in macOS from bash to zsh.

More Articles

Shellcheck and zshGet Current User in Shell Scripts
scriptingosx.com/moving-to-zsh

Get Current User in Shell Scripts on macOS
…or, how to deal with deprecated bash and python…

There are many solutions to get the current logged in user in macOS to use in a shell script. However, the semi-official, “sanctioned” method has always involved a rather elaborate python one-liner, originally published by Ben Toms:

loggedInUser=$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyC
scriptingosx.com/2019/09/get-c

Weekly News Summary for Admins — 2019-08 -30
Things are heating up for September release season. We got new betas for iOS and iPadOS 13.0 and macOS Catalina beta7. Surprisingly, there also is a beta for iOS 13.1, which includes some features shown at WWDC, which were removed from the 13.0 beta. While I generally approve of this flexibility, it makes testing confusing and more complex.

We also got a second sup
scriptingosx.com/2019/08/weekl

Check Installer Pkgs for deprecated scripts
macOS 10.15 Catalina will deprecate the built-in /bin/bash. I have talked about this at length.

The release notes for Catalina also tell us that other built-in scripting runtimes, namely Python, Perl, and Ruby. Will not be included in future macOS releases (post-Catalina) any more.

This means, that if you want to use bash, Python, Perl, or Ruby on macOS, you will h
scriptingosx.com/2019/08/check

Weekly News Summary for Admins — 2019-08-23
Summer vacation time is coming to an end and the beta season for macOS Catalina and iOS 13 is heating up! Another Catalina beta dropped this week, and third parties are now starting to announce their own betas and/or preliminary support.

If you would rather get the weekly newsletter by email, you can subscribe to the Scripting OS X Weekly Newsletter here!! (Same con
scriptingosx.com/2019/08/weekl

Shellcheck and zsh
The sad news is that the shellcheck binary does not really know how to deal with zsh scripts:

% shellcheck script.zsh

In script.zsh line 1:
#!/bin/zsh
^-- SC1071: ShellCheck only supports sh/bash/dash/ksh scripts. Sorry!

You can force shellcheck to interpret a zsh script with the --shell option:

% shellcheck --shell=bash dirlist.sh

This might show errors, such as Quote to prevent word splitting/globbing which
scriptingosx.com/2019/08/shell

Moving to `zsh`, part 8 – Scripting `zsh`
Apple has announced that in macOS 10.15 Catalina the default shell will be zsh.

I will be giving a half-day ‘Moving to zsh’ class in Amsterdam on September 6. We will cover the ‘why’ and ‘how’ of zsh and show lots of practical examples how using zsh will improve your Terminal productivity. More info and sign-up on the Pro Warehouse webpage.

In this series, I will document m
scriptingosx.com/2019/08/movin

Weekly News Summary for Admins — 2019-08-16
Longer summary this week to catch up on the last three weeks of traveling!

The last post celebrating the 100th email resulted in quite a few new subscribers. Welcome!

I posted my speaking and training class schedule for the next few months. It’d be great to meet you somewhere!

If you would rather get the weekly newsletter by email, you can subscribe to the Scripti
scriptingosx.com/2019/08/weekl

Autumn 2019 Schedule
As I am emerging from vacation, I made an overview of my agenda for the next few months and realized there are quite a few public events. It might be useful to share my public agenda. If you are coming to any of these events, I’d be really happy to meet you!

Sep 6: Moving to zsh Class

Half-day class covering zsh on macOS. We will cover:

why Apple is switching the default shell
how this affects you an
scriptingosx.com/2019/08/autum

Weekly News Summary for Admins — 2019-07-26
Another Update Week. Apple released iOS 12.4 and macOS 10.14.6. There were also security updates (2019–004) for Sierra and High Sierra, which were then removed because apparently they coould cause kernel panics on wake.

Also interesting: Apple has provided updates for some older iOS hardware. iOS 9.3.6 and iOS 10.3.4 will make sure the “GPS”GPS, date, and time conti
scriptingosx.com/2019/07/weekl

Weekly News Summary for Admins — 2019-07-19
Still a lot of fallout from the Zoom invulnerability. It took Apple three updates to MRT (so far) to eradicate all the differently branded varieties of the Zoom client web server. Makes me wonder how many Macs there were or are with multiple of these clients installed.

We also got new betas for 10.14.5 and 10.15 and the respective iOS versions. Some of the worst dat
scriptingosx.com/2019/07/weekl

Weekly News Summary for Admins — 2019-07-19
Still a lot of fallout from the Zoom invulnerability. It took Apple three updates to MRT (so far) to eradicate all the differently branded varieties of the Zoom client web server. Makes me wonder how many Macs there were or are with multiple of these clients installed.

We also got new betas for 10.14.5 and 10.15 and the respective iOS versions. Some of the worst dat
scriptingosx.com/2019/07/weekl

Weekly News Summary for Admins — 2019-07-12
Apple released an unexpected update to the entry-level MacBook Air and MacBook Pro 13“ this week. What the new release replaces is interesting, as well: the non-retina entry level MacBook Air, the no-Touchbar 13” MacBook Pro, and the 12" MacBook are all discontinued.

The iMac and the (cylinder) Mac Pro are the only remaining Mac models without a T2 chip. All current
scriptingosx.com/2019/07/weekl

Build a shellcheck installer for macOS
Shellcheck is an invaluable tool for anyone who writes, well, shell scripts. The tool will point out common and less common errors, such as forgetting to quote a variable substitution, not putting that space before the closing ]], or not testing if a variable substitution used with rm -Rf might be empty.

You can use the tool’s website to check your code, but it is unwieldy, n
scriptingosx.com/2019/07/build

Moving to zsh, part 5: Completions
Apple has announced that in macOS 10.15 Catalina the default shell will be zsh.

I will be giving a half-day ‘Moving to zsh’ class in Amsterdam on Sep 6! Visit our website for details!

In this series, I will document my experiences moving bash settings, configurations, and scripts over to zsh.

Part 1: Moving to zsh
Part 2: Configuration Files
Part 3: Shell Options
Par
scriptingosx.com/2019/07/movin

Show more
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!