Skip to content
gokcehan edited this page May 19, 2021 · 34 revisions

Packaging status

Packaging Guideline

Simply moving lf binary to an executable path should be enough in most cases (e.g. /usr/bin/lf). Optionally, you may also want to consider the followings:

  • Documentation is already bundled in the binary and it can be viewed either using lf -doc from the command line or using doc command (default <f-1>) inside lf. If you like to also make it available with man command (i.e. man lf), you can move lf.1 file to an appropriate man folder (e.g. /usr/share/man/man1/lf.1).

  • The example configuration etc/lfrc.example contains useful settings which can be used as defaults. You can either move this file to /etc/lf/lfrc to make it directly available or to an alternative path to copy from (e.g. /etc/lf/lfrc.example or /usr/share/doc/lf/lfrc.example). You may also make changes appropriate for the system (e.g. sed -i '/^cmd trash/ s/mv/mv --backup=numbered/' lfrc.example).

  • The function lfcd is provided for common shells that is used to change the working directory on quit. For fish shell, you can copy etc/lfcd.fish file to a vendor function directory to make this function directly available without configuration (e.g. /usr/share/fish/vendor_functions.d/lfcd.fish). For zsh shell, you can copy etc/lfcd.sh file similarly, though files in site functions directory are not automatically loaded (e.g. /usr/share/zsh/site-functions/lfcd.sh). For bash shell, you can copy etc/lfcd.sh to the profile directory if it exists, though files in profile directory are usually only sourced in login shells (e.g. /etc/profile.d/lfcd.sh).

  • The function LF is provided in etc/lf.vim to use lf as a file opener in vim. You can copy this file to a runtime path to make this function directly available without configuration (e.g. /usr/share/vim/vimfiles/plugin/lf.vim).

  • A desktop file is provided as lf.desktop to add a desktop entry for lf. You can copy this file to an appropriate folder to make it available (e.g. /usr/share/applications/lf.desktop).

Alpine Linux

Package is available in repository.

Install with

# apk add lf

Arch Linux

The following packages are available in the AUR.

Chocolatey

Package is available in Chocolatey.

# choco install lf

Fedora

The following copr repositories are available

Mageia

For Cauldron only:

Solus

Available in official repository:

Install with:

sudo eopkg install lf

Or graphical use Software Center

pkgsrc

Void Linux

Package is available in repository.

Install with

# xbps-install lf

Homebrew

Package is available in Homebrew.

Install with

brew install lf

OpenBSD

Package is available in repo.

Install with

# pkg_add lf
Clone this wiki locally