Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fish & zsh plugin open finder windows from your terminal

License

iamrajjoshi/finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Finder Shell Extension

A simple, elegant shell extension that adds a finder command to open Finder windows on macOS. Supports both Fish shell and Zsh.

✨ Features

  • πŸš€ Easy to use: Simple finder command to open Finder windows
  • πŸ”„ Multiple shells: Support for both Fish and Zsh
  • πŸ“ Smart path handling: Works with files, directories, relative paths, and tilde expansion
  • 🎯 File revealing: Automatically reveals files in Finder or opens directories
  • πŸ” Multiple paths: Open multiple locations at once
  • πŸ›‘οΈ Error handling: Comprehensive validation and helpful error messages
  • 🍎 macOS native: Built specifically for macOS using native open command
  • πŸ“– Tab completion: Built-in shell completion support

πŸš€ Quick Start

Installation

Fish Shell (Fisher)

# Install using Fisher
fisher install iamrajjoshi/finder

Zsh Shell (Oh My Zsh)

# Clone to Oh My Zsh custom plugins directory
git clone https://github.com/iamrajjoshi/finder.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/finder

# Add to your ~/.zshrc plugins list
plugins=(... finder)

# Reload your shell
source ~/.zshrc

Basic Usage

# Open current directory in Finder
finder

# Open specific directory
finder ~/Desktop

# Open multiple directories
finder ~/Documents ~/Downloads

# Reveal a file in Finder
finder /path/to/file.txt

# Open parent directory
finder ..

# Get help
finder --help

πŸ“– Usage Examples

Opening Directories

# Current directory
finder

# Home directory
finder ~

# Specific paths
finder /Applications
finder ~/Desktop ~/Documents

# Relative paths
finder .
finder ..
finder ./subfolder

Revealing Files

# Reveal any file type in Finder
finder ~/Documents/report.pdf
finder /path/to/image.jpg
finder ./README.md

Advanced Usage

# Multiple mixed paths
finder ~/Desktop file.txt ../parent-dir

# With wildcards (shell expands them)
finder ~/Pictures/*.jpg

# Complex paths with spaces (automatically handled)
finder "~/My Documents/Project Files"

πŸ”§ Installation

Recommended Installation Methods

Fish Shell with Fisher

Fisher is the recommended package manager for Fish shell:

  1. Install Fisher

  2. Install Finder:

    fisher install iamrajjoshi/finder
  3. Uninstall (if needed):

    fisher remove iamrajjoshi/finder

Zsh Shell with Oh My Zsh

Oh My Zsh is the recommended framework for Zsh:

  1. Install Oh My Zsh:

  2. Install Finder as a custom plugin:

    git clone https://github.com/iamrajjoshi/finder.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/finder
  3. Add to plugins in ~/.zshrc:

    plugins=(git ... finder)
  4. Reload your shell:

    source ~/.zshrc

πŸ—‘οΈ Uninstallation

Using Package Managers

Fisher (Fish)

fisher remove iamrajjoshi/finder

Oh My Zsh (Zsh)

# Remove plugin directory
rm -rf ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/finder

# Remove 'finder' from plugins list in ~/.zshrc
# Then reload: source ~/.zshrc

πŸ› οΈ Requirements

  • Operating System: macOS (any version with open command)
  • Shell: Fish shell 3.0+ or Zsh 5.0+
  • Dependencies: None (uses built-in macOS tools)

πŸ“š Command Reference

Options

Flag Description
-h, --help Show help message and usage examples
--version Display version information

Arguments

Argument Description
PATH File or directory path to open (optional, defaults to current directory)

Exit Codes

Code Meaning
0 Success
1 Error (invalid path, not macOS, etc.)

Shell Completion

Both Fish and Zsh versions include built-in tab completion:

  • Fish: Completes directories and shows descriptions
  • Zsh: Completes files and directories with Zsh's powerful completion system

Debug Mode

For troubleshooting, you can manually inspect the shell functions:

# Fish: View the function
functions finder

# Zsh: Check if function is loaded
which finder

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

fish & zsh plugin open finder windows from your terminal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •  

Languages