The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘zsh’ Category

command line – Why does a cURL request return a percent sign (%) with every request in ZSH? – Stack Overflow

Posted by jpluimers on 2025/07/31

I try to stay on the default shells of environments as much as possible, especially as that makes life easier when needing to work on an non-customised system.

Apple switched back from an ancient latest GPLv2 version 3.2 of bash (they regard newer GPLv3 as toxic to their revenue stream¹), introduced MIT-license based zsh and introduced a bash nag screen a few years ago forcing users to switch. Suppressing that message reliably is trickier than you might think².

After so many years of bash, I still stumble over things that zsh does differently: [Wayback/Archive] command line – Why does a cURL request return a percent sign (%) with every request in ZSH? – Stack Overflow (thanks [Wayback/Archive] Travis and [Wayback/Archive] zaTricky) is a “feature” with a simple workaround for cURL:

This is a zsh feature that prints a percent-and-newline after a command completes if that command does not already include a newline at the end of its output. If zsh did not do this, you would either not ever notice the fact that the command didn’t print a newline – or you’d see zsh’s command prompt not start on the margin and think it was a bug in zsh.

$ curl http://api.macvendors.com/0015c7   
Cisco Systems, Inc%     
$ curl -w '\n' http://api.macvendors.com/0015c7
Cisco Systems, Inc

Since the above example now writes a redirect messages (good bye HTTP, welcome HTTPS), and I very much dislike short command-line parameters, here is version with the long form of the [Wayback/Archive] curl -w or --write-out parameter :

Read the rest of this entry »

Posted in *nix, *nix-tools, Apple, bash, bash, Development, Mac OS X / OS X / MacOS, macOS 14 Sonoma, macOS 15 Sequoia, Power User, Scripting, Software Development, zsh | Leave a Comment »