# friendly interactive shell

fish is a smart, user-friendly command-line shell for Linux, macOS, and other platforms, with scripting, command suggestions, tab completion, and syntax highlighting.

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

## 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>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Scripting, bash](<https://devfeed.tech/topics/scripting-bash.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

## Simplifying a Personal Developer Toolset by Consolidating Apps and Switching Editors

DevFeed: [Simplifying a Personal Developer Toolset by Consolidating Apps and Switching Editors](<https://devfeed.tech/articles/this-year-i-shall-simplify-25329.md>)

Original publisher: [Read original article](<https://kau.sh/blog/simplify/>)

Author: Kaushik Gopal

Published: 2023-04-22T22:53:13Z

Content type: opinion

Language: en

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

Topics: [Obsidian](<https://devfeed.tech/topics/obsidian-md.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>), [Vim](<https://devfeed.tech/topics/vim.md>), [friendly interactive shell](<https://devfeed.tech/topics/fish.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>), [Visual Studio Code](<https://devfeed.tech/topics/visual-studio-code.md>), [Ansible](<https://devfeed.tech/topics/ansible.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [jetbrains](<https://devfeed.tech/topics/jetbrains.md>)

Tags: [android-studio](<https://devfeed.tech/tags/android-studio.md>), [automation](<https://devfeed.tech/tags/automation.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [jetbrains](<https://devfeed.tech/tags/jetbrains.md>), [plugins](<https://devfeed.tech/tags/plugins.md>), [productivity](<https://devfeed.tech/tags/productivity.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [tools](<https://devfeed.tech/tags/tools.md>), [vim](<https://devfeed.tech/tags/vim.md>), [vscode](<https://devfeed.tech/tags/vscode.md>)

### AI overview

The author describes simplifying a personal developer toolset by consolidating Things 3 and note-taking in Obsidian, switching from iTerm to Terminal and fish to zsh, using Raycast alongside limited Keyboard Maestro automation, and moving from VSCode toward Vim and JetBrains editors.

### Source excerpt

I'm always trying out new tools to make my life easier. In a cruel twist of irony however, I've found myself customizing and maintaining multiple tools leading to unnecessary complexity and a hit in productivity. So this year, I've made a resolution to simplify and eliminate redundant tools. Nothing is safe from the chopping block! Here are some of the major transitions I've made or plan to make, and I'll be sharing more about each of them in upcoming posts. Things 3 -> Obsidian Notes ## This one surprised me the most. I switched from Things 3 as my Todo app and Obsidian for my notes to using Obsidian for both. While Things 3 has a beautiful UI, I discovered that I could use Obsidian as effectively (if not more) to get things done with the addition of one plugin. Stay tuned for a detail write up on this one. iTerm -> Terminal ## Next, I switched from iTerm to Terminal. This transition was easy since I wasn't relying too heavily on iTerm customizations anyway. The big reason I used iTerm was mostly just for horizaontal split tabs. I dusted off my tmux skills and now am back to just using Terminal.app. fish -> zsh ## Moving from fish to zsh -- on the other hand -- was the most challenging transition since I had years of accumulated scripts and functions that I had to painstakingly port over to zsh. However, I'm happy I made the change since zsh is the default on a new Mac, making it easier to use across different devices. Alfred + Keyboard Maestro (+ Pastebot) -> Raycast ## As an avid user of Alfred and Keyboard Maestro, I was hesitant to switch to Raycast. But after watching a video on its capabilities, I realized that Raycast could replace several of the tools I was using. I was particularly impressed by how easy it was to expand its functionality and add new snippets or quick URL searches. Keyboard Maestro is going to be around for those quick automation macros but I'm going to try and not have it running constantly. More for one-off automation jobs. VSCode -> (Neo)Vim (&

## 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>), [Git](<https://devfeed.tech/topics/git.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [command-line](<https://devfeed.tech/tags/command-line.md>), [commands](<https://devfeed.tech/tags/commands.md>), [git](<https://devfeed.tech/tags/git.md>), [issue](<https://devfeed.tech/tags/issue.md>), [submodules](<https://devfeed.tech/tags/submodules.md>)

### AI overview

A tutorial for fish and zsh users that binds the Enter key to run git-number in Git repositories with changes, or ls -lh elsewhere when the command line is empty.

### 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

## Why I migrated to the Fish Shell

DevFeed: [Why I migrated to the Fish Shell](<https://devfeed.tech/articles/why-i-migrated-to-the-fish-shell-37715.md>)

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

Author: Carlos Alexandro Becker

Published: 2020-12-07T00:00:00Z

Content type: opinion

Language: en

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

Topics: [friendly interactive shell](<https://devfeed.tech/topics/fish.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [dotfiles](<https://devfeed.tech/topics/dotfiles.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Environment Variables](<https://devfeed.tech/topics/environment-variables.md>), [lazy loading](<https://devfeed.tech/topics/lazy-loading.md>), [Scripting](<https://devfeed.tech/topics/scripting.md>)

Tags: [aliases](<https://devfeed.tech/tags/aliases.md>), [bash](<https://devfeed.tech/tags/bash.md>), [environment-variables](<https://devfeed.tech/tags/environment-variables.md>), [lazy-loading](<https://devfeed.tech/tags/lazy-loading.md>), [plugins](<https://devfeed.tech/tags/plugins.md>), [porting](<https://devfeed.tech/tags/porting.md>), [prompt](<https://devfeed.tech/tags/prompt.md>), [scripting](<https://devfeed.tech/tags/scripting.md>), [shell](<https://devfeed.tech/tags/shell.md>), [zsh](<https://devfeed.tech/tags/zsh.md>)

### AI overview

The author explains migrating dotfiles from Zsh to Fish, emphasizing Fish's startup performance, universal variables, lazy loading, and built-in features such as syntax highlighting, autosuggestions, and man-page completions. The article also notes differences from POSIX shells and describes the author's plugin setup.

### Source excerpt

Back in June, I started porting my dotfiles from ZSH to Fish. Here's why.