The Z shell (Zsh) is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting.

Posts under Zsh tag

25 Posts
Sort by:
Post not yet marked as solved
1 Replies
476 Views
We have a problem with curl. Under Big Sur, the command curl 'ftp://ftp.myserver/myPath/my File' -u 'myusername':'mypassword' properly downloads the file. Under Monterey, the same command throws an error: curl: (3) URL using bad/illegal format or missing URL Any advice, workaround etc. is highly appreciated. The behaviour is the same, whether the command is issued in Terminal, or as a shell script in a Applescript application created in XCode.
Posted
by
Post not yet marked as solved
0 Replies
174 Views
I need to create a script for checking a security posture of a machine using OPSWAT MetaAccess. They have a built-in check, however, according to them, they aren't able to check since macOS 10.13+. This seems to coordinate with a change other people have discussed on other forums where the following commands don't work anymore. OPSWAT does support checks via custom shell script and so I'm figuring out how to write that now. The scripts that don't work anymore: defaults read com.apple.screensaver idleTime defaults -currentHost read com.apple.screensaver idleTime defaults -currentHost read com.apple.screensaver askForPassword defaults read com.apple.screensaver askForPassword
Posted
by
Post marked as solved
1 Replies
185 Views
Working with a M1 Macbook Air, macos 12.4. Anytime I open a new terminal window or just a new tab, it takes a really long time till I can type. I have commented out my entire ~/.zshrc and when run for i in $(seq 1 10); do /usr/bin/time $SHELL -i -c exit; done directly in an open terminal window it says it finished in 0.1s. So it must be something macos is doing before zsh is even starting. PS: In the activity monitor I can only see a spike in kernel_task cpu usage when opening a new terminal
Posted
by
Post not yet marked as solved
0 Replies
124 Views
Hello everyone. The project I am working on is shifting from using CocoaPods to SPM and there is one "wrinkle" I'd like some advice on. The project has several framework projects containing code as well as the main app project. All of these make use of code generators (RSwift, Sourcery) at some point and these need to be run before the main build starts. The problem is that SPM builds do not support the concept of adding script phases so there appears to be no easy way to incorporate these shell tools into the builds. Particularly in the framework projects which are pure SPM packages and therefore do not have your typical project files and build phases. My question is - how to deal with shell based build phases in an SPM world? Currently we are adding these phases in the main app's build. However they are not run before the builds of the SPM dependencies so effectively we have to run the build twice to ensure the code is up to date.
Posted
by
Post not yet marked as solved
1 Replies
32 Views
We have been trying to understand why the Mac OS Terminal, when invoked with open, does not pass along the environment variables. How to reproduce? Create a new file /tmp/example.sh #!/bin/sh echo "SAMPLE_ENV='$SAMPLE_ENV'" SAMPLE_ENV=123 open -a Terminal /tmp/example.command Only prints: SAMPLE_ENV='' Even when using SAMPLE_ENV=123 open --env SAMPLE_ENV=1234 -a Terminal /tmp/example.sh    it will only print SAMPLE_ENV='' We know for sure that this was working several years ago. Why was the feature removed or is this a bug? Any workaround? Is there a workaround on how to launch a script in a new Terminal Window while passing the environment variables correctly? Related https://stackoverflow.com/questions/69768133/react-native-envs-are-undefined-in-metro-bundlers-config-file-when-bundling/73036234
Posted
by