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

17 Posts
Sort by:
Post not yet marked as solved
1 Replies
149 Views
I'm learning to use Vim in Xcode and within Terminal. I've used VimTutor to learn the basics. The issue I've run into when creating a text file is additional, garbage files being created whenever I create or edit a .txt file - vim index.txt produces the following: How do I prevent vim from creating the .index.html.un~ and index.html~ files? It's annoying me and git. Thanks, jake
Posted
by javilan.
Last updated
.
Post not yet marked as solved
4 Replies
982 Views
Hi, not sure if this forum is the right place to ask, but it’s extremely difficult to search the web for answers about shortcuts.app (must be the name…). I’m learning python currently and I’m trying to automate recurring tasks on my Mac easily. I have a python script as a first test-case that works (It basically makes a bunch of named folders). I use Apples Shortcuts.app to execute the python-file with the shell-script action. I start this script in Finder from the Quick Actions menu. The script creates my folders, but not in the selected folder when executing it, but always in my users home folder /Users/markus/. I suspect I have to somehow tell the Shortcut to take the currently selected folder as a variable or something. I tried to read the help but I don’t find anything useful and don’t understand the options of the Shell-Script Action in Shortcuts.app. Any ideas how I can get this to work? Or does anyone have a link to a good forum to ask questions about Shortcuts.app and automation? Thanks! Regards Markus
Posted
by M_Ceh.
Last updated
.
Post not yet marked as solved
1 Replies
405 Views
I've recently updated macOS to Sonoma from Monterey. I noticed that when I used rsync --av, it would keep copying the same files over and over again, even when I just reran the same command. This is occurring when I'm rsyncing files from the M1 Max Macbook Pro to a Samsung external hard drive, which is formatted exFAT. (I don't recall this being an issue on Monterey.) I've had the same problem with rsync version 2.6.9 and with version 3.2.7. If I use --size-only , this resolves the problem.
Posted Last updated
.
Post not yet marked as solved
0 Replies
143 Views
Hey, I am using a command line tool (bwa mem). it's not so important what it does, but that it somehow changed it's behavior in macOS zsh. A command that worked earlier does now not work anymore. The intended usage of this tool is: Usage: bwa mem [options] <idxbase> <in1.fq> [in2.fq] Some time ago (about 1 year) I wrote a workflow that contained this command: bwa mem resources/genome.fasta path/to/read_1.fastq.gz path/to/read_2.fastq.gz -K 100000000 -Y So, I put the options behind the positional arguments, not in front of it. It's not its intended usage, I know, but it always worked. I retried that yesterday and all of a sudden, zsh complains about incorrect usage and I have to change the order of the arguments. I don't use a newer version of bwa (fixed by conda install). The old command still works on centOS bash. I installed bwa 0.7.17 freshly on both OSs and centOS bash runs the command without complaining, whereas macOS zsh does not. Has there been any change in zsh that would explain this?
Posted
by gernophil.
Last updated
.
Post marked as solved
1 Replies
305 Views
I'm setting up my XCode Cloud workflows based on an existing CICD pipeline. One of the things I'd really like the workflow to do is upload an IPA file to BrowserStack, which is the tool we use for our testing. I have a curl command which will do that: curl -u "<username>:<api key>" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@/path/to/app/file/Application-debug.ipa" So I added this to the ci_post_xcodebuild script: if [[ $CI_XCODEBUILD_ACTION = "archive" ]]; then curl -u "$BROWSERSTACK_USERID:$BROWSERSTACK_APIKEY" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@$CI_ARCHIVE_PATH" curl -u "$BROWSERSTACK_USERID:$BROWSERSTACK_APIKEY" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@$CI_ARCHIVE_PATH" fi But I got an "incorrect extension" error. Once I echoed the $CI_ARCHIVE_PATH, it was obvious why - it was leading to a file called build.xcarchive. Is there any way to get access to the IPA file? There's a different curl command that will upload an IPA file from a URL, so I could try getting the URL for the build from App Store Connect? It has to be a public URL, though, so I'm not sure BrowserStack would be able to access our builds.
Posted
by KBartlett.
Last updated
.
Post not yet marked as solved
0 Replies
212 Views
These faint underscores at the beginning of some lines are new since some weeks. Is it a bug or a feature? It doesn't matter what commands I execute they appear quite randomly at the beginning of some lines. They disappear, if I resize the window. I am using JetBrains Mono NL Regular 14 in my zsh for quite some time now, but the underscores started appearing just recently. Besides that, I can't spot any option that should trigger this in my .zshrc. Anyone seens this before?
Posted
by gernophil.
Last updated
.
Post not yet marked as solved
0 Replies
332 Views
Running a Process executableURL path for a Catalyst target using a macOS type bundle returns the following error as output: (/Applications/Xcode-15.1.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Debugger/libViewDebuggerSupport_macCatalyst.dylib), but incompatible platform (have \'MacCatalyst\', need \'macOS\')) Is it possible to set which dylib platform is used by the macOS bundle executable file instead of using the MacCatalyst one?
Posted Last updated
.
Post not yet marked as solved
0 Replies
370 Views
Hi everyone, I would like to change other user account's password from an account with root privilege. I've read https://discussions.apple.com/thread/7334618 and tried the following steps. login to an account (user1) with root privilege and open the terminal execute "dscl . -passwd /Users/user2 oldPw newPw" execute "su - user2" enter user2's password (i.e., newPw) execute "security set-keychain-password -o oldPw -p newPw /Users/user2/Library/Keychain/login.keychain-db" When I logout user1 and login user2, the system popup "This Mac can't connect to iCloud because of a problem with {Apple id}". It seems that the iCloud keychain is broken. Also, we need to enter oldPw to unlock "> System Preferences > Passwords", but not the newPw. (ps: we can login user2 and unlock user2's login.keychain-db with newPw) However, if we change user2's password in user2's terminal as follows. Everything works fine. login to user2 and open the terminal execute "dscl . -passwd /Users/user2 oldPw newPw" execute "security set-keychain-password -o oldPw -p newPw /Users/user2/Library/Keychain/login.keychain-db" I've tested this issue on macOS 12.6.9 and 14.1.2. Both of them have this problem. Is this a bug or how can I fix this? (e.g., change iCloud keychain password?) Thanks.
Posted Last updated
.
Post not yet marked as solved
0 Replies
327 Views
Hello, I got this error message (as title) when I want to ssh to my PC. After I enter the password, I got this message and then the session was closed. I never met this problem before. I totally have no idea where this error comes from. Could anyone give me some advice about how to fix it?
Posted Last updated
.
Post not yet marked as solved
2 Replies
3.6k Views
After updating to macos 13.0.1 on M1. The issue is reproduced on python3.9.15 and python3.10.8 When I run any python test without debug I have the next error in terminal: Logs of the issue
Posted Last updated
.
Post not yet marked as solved
1 Replies
682 Views
I copy a file to my netdisk(using rclone) cp -X /usr/local/bin/xx/a.txt [location/to/netdisk] and get the following error: cp: ./a.txt: fcopyfile failed: Operation not permitted what's the specific change of cp on Sonoma??
Posted Last updated
.
Post not yet marked as solved
0 Replies
438 Views
I have a good installation regarding Intel python3.9 with all modules loading perfectly. However, I have a bad behavior with the conda part of Intel OneAPI : I can't even do a $ conda list or a $ conda env list , I get the following message : $ conda env list __conda_exe:2: no such file or directory: /opt/intel/oneapi/intelpython/latest/bin/conda So I have done the following export : export CONDA_EXE=/opt/intel/oneapi/intelpython/latest/condabin/conda And I redo the previous command, I get : $ conda list Traceback (most recent call last): File "/opt/intel/oneapi/intelpython/latest/condabin/conda", line 12, in <module> from conda.cli import main ModuleNotFoundError: No module named 'conda' I don't know what to do further to fix this Intel Conda installation. If someone have already met this kind of issue of could see what's wrong ... I would like to avoid to remove all the Intel python distribution part. EDIT : I forgot to mention that I have into my ~/.zshrc this part : # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/opt/intel/oneapi/intelpython/latest/condabin/conda' 'shell.zsh' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/opt/intel/oneapi/intelpython/latest/etc/profile.d/conda.sh" ]; then . "/opt/intel/oneapi/intelpython/latest/etc/profile.d/conda.sh" else export PATH="/opt/intel/oneapi/intelpython/latest/bin:$PATH" fi fi unset __conda_setup
Posted
by chris091.
Last updated
.
Post not yet marked as solved
2 Replies
2.8k Views
I'm installing texturepacker in ci_post_clone.sh script using below command in Xcode Cloud workflow. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null brew install --cask texturepacker But I'm getting sudo warning in log. ==> Downloading https://www.codeandweb.com/download/texturepacker/6.0.2/TexturePacker-6.0.2.dmg ==> Installing Cask texturepacker sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper sudo: a password is required sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper sudo: a password is required sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper sudo: a password is required sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper sudo: a password is required ==> Purging files for version 6.0.2 of Cask texturepacker Error: Permission denied @ dir_s_mkdir - /usr/local/Caskroom How can i fix this issue? Any idea or suggestions would be appreciated. Thank You
Posted Last updated
.
Post not yet marked as solved
0 Replies
599 Views
Hello, I am using a 2017 MacBook Pro with an Intel chip, running Ruby version 2.7.8, Rails 5.2.6, and OpenSSL 1.1. I've installed Ruby using rbenv and ruby-build. I am persistently receiving the following error when trying to create a database with Rails: WARNING: /Users/logan/.rbenv/versions/2.7.8/bin/ruby is loading libcrypto in an unsafe way zsh: abort bundle exec bin/rails db:create Steps I have taken to troubleshoot this issue: Installed OpenSSL via Homebrew and ensured that the version is 1.1. Uninstalled and reinstalled Ruby with rbenv, specifying the correct OpenSSL directory. Set the DYLD_LIBRARY_PATH environment variable to the path where Homebrew installed the OpenSSL libraries before running the Ruby process. Unfortunately, none of these steps have resolved the problem. I am seeking assistance in resolving this issue. Any guidance or insight into what might be causing this error and how to fix it would be greatly appreciated. Thank you in advance for your time and help!
Posted
by logan99.
Last updated
.
Post not yet marked as solved
0 Replies
507 Views
import speech_recognition as sr import os def say(text): os.system(f"say{text}") say("hello I'm jarvis") I have got this prob please help sh: -c: line 0: unexpected EOF while looking for matching `'' sh: -c: line 1: syntax error: unexpected end of file here is the script file #!/usr/bin/env bash _tqdm(){ local cur prv cur="${COMP_WORDS[COMP_CWORD]}" prv="${COMP_WORDS[COMP_CWORD - 1]}" case ${prv} in --bar_format|--buf_size|--colour|--comppath|--delay|--delim|--desc|--initial|--lock_args|--manpath|--maxinterval|--mininterval|--miniters|--ncols|--nrows|--position|--postfix|--smoothing|--total|--unit|--unit_divisor) # await user input ;; "--log") COMPREPLY=($(compgen -W 'CRITICAL FATAL ERROR WARN WARNING INFO DEBUG NOTSET' -- ${cur})) ;; *) COMPREPLY=($(compgen -W '--ascii --bar_format --buf_size --bytes --colour --comppath --delay --delim --desc --disable --dynamic_ncols --help --initial --leave --lock_args --log --manpath --maxinterval --mininterval --miniters --ncols --nrows --null --position --postfix --smoothing --tee --total --unit --unit_divisor --unit_scale --update --update_to --version --write_bytes -h -v' -- ${cur})) ;; esac } complete -F _tqdm tqdm
Posted
by Ors_him.
Last updated
.
Post not yet marked as solved
0 Replies
481 Views
When i try to install podfiles after this command $ sudo gem install cocoapods its getting zsh command not found mac OS 13.4 i try some commands but no luck $ sudo gem install -n /usr/local/bin cocoapods $ sudo gem install cocoapods -V $ gem update --system
Posted
by ramaraju.
Last updated
.