/ lsf / INSTALL.md
swadhin biswas feat: major v4.5.0 release with GNU ls compatibility and comprehensive documentation · 10/15/2025
20c1470
153 lines · 2.9 KB
Raw Download

Installation Guide for ls-f

Prerequisites

Before installing ls-f, ensure your system meets these requirements:

  1. Nerd Fonts: You need to have Nerd Fonts installed to see the icons correctly
  2. Shell Compatibility: Bash, Zsh, Fish, or other POSIX-compatible shells
  3. Root Access: For system-wide installation, you'll need sudo access

Checking Prerequisites

To verify Nerd Fonts are installed:

fc-list | grep -i "Nerd Font"

If this command returns results, you have Nerd Fonts installed. If not, visit Nerd Fonts website to install them.

Installation Methods

Method 1: Git Clone (Recommended)

# Clone the repository
git clone https://github.com/your-username/ls-f.git
cd ls-f

# Install using the script
sudo ./install.sh

Method 2: Direct Download

# Download the lsf script directly
sudo curl -L https://github.com/your-username/ls-f/releases/latest/download/lsf -o /usr/local/bin/lsf
sudo chmod +x /usr/local/bin/lsf

Method 3: Using the Raw Install Script

curl -fsSL https://raw.githubusercontent.com/your-username/ls-f/main/install.sh | sudo bash

Post-Installation Setup

After installation, you can use lsf immediately:

lsf
lsf -la
lsf --help

Setting up Aliases

To replace the default ls command with lsf, set up an alias in your shell configuration.

For Bash users

Add to ~/.bashrc:

alias ls='lsf'

Then reload:

source ~/.bashrc

For Zsh users

Add to ~/.zshrc:

alias ls='lsf'

Then reload:

source ~/.zshrc

For Fish users

Add to ~/.config/fish/config.fish:

alias ls='lsf'

Then reload:

source ~/.config/fish/config.fish

For Tcsh/Csh users

Add to ~/.cshrc or ~/.tcshrc:

alias ls 'lsf'

Verifying Installation

After installation and alias setup, verify everything works:

# Test the command exists
which lsf

# Test basic functionality
lsf
lsf -la

# If alias is set, test that ls now uses lsf
ls

Troubleshooting

Icons Not Displaying

If icons appear as question marks or boxes, ensure:

  1. Nerd Fonts are properly installed
  2. Your terminal supports Nerd Fonts
  3. Your terminal font is set to a Nerd Font

Alias Not Working

If the alias doesn't work after adding it:

  1. Make sure to reload your shell configuration (source ~/.bashrc or source ~/.zshrc)
  2. Check for syntax errors in the configuration file
  3. Verify the alias was added correctly by checking the file contents

Permission Errors

If you encounter permission errors during installation, ensure you're using sudo for system-wide installation.

Uninstallation

To uninstall lsf, simply remove the binary:

sudo rm /usr/local/bin/lsf

To also remove the configuration:

rm -rf ~/.config/lsf/

Don't forget to remove the alias from your shell configuration file if you added one.