GithubHelp home page GithubHelp logo

zsh-select-with-lf's Introduction

Select files or directories with lf

A simple plugin to let you select some files or a directory using lf

recording-20231007-23h11.mp4

๐Ÿ› ๏ธ Installation

Using Antigen

Bundle zsh-vi-mode in your .zshrc

antigen bundle chmouel/zsh-select-with-lf

Using zplug

Load zsh-vi-mode as a plugin in your .zshrc

zplug "chmouel/zsh-select-with-lf"

Using zgen

Include the load command in your .zshrc

zgen load chmouel/zsh-select-with-lf

Using zinit

Include the load command in your .zshrc

zinit ice depth=1
zinit light chmouel/zsh-select-with-lf

Note: the use of depth=1 ice is optional, other types of ice are neither recommended nor officially supported by this plugin.

As an Oh My Zsh! custom plugin

Clone zsh-vi-mode into your custom plugins repo

git clone https://github.com/chmouel/zsh-select-with-lf \
  $ZSH_CUSTOM/plugins/zsh-select-with-lf

Then load as a plugin in your .zshrc

plugins+=(zsh-select-with-lf)

Keep in mind that plugins need to be added before oh-my-zsh.sh is sourced.

Using Antibody

Add zsh-vi-mode to your plugins file (e.g. ~/.zsh_plugins.txt)

chmouel/zsh-select-with-lf

Using Zap

Load zsh-vi-mode as a plugin in your .zshrc

plug "chmouel/zsh-select-with-lf"

Manual

Or any ZSH plugin manager (I use my own simple one vtplug)

You can as well simply git clone this repository and source the zsh-select-with-lf.plugin.zsh file if you want to do this just manually.

Requirements

Only lf is needed.

Usage

Just do C-x C-l to select a directory and C-x l (C-x mean control and x) it will start lf and put the result file or directory on your command line.

For files you need to select the files and press enter, for the directories you need to navigate to the directory and press q to quit lf.

This plugin will try to do the right thing if you have a file or a directory on the current word to have lf initially started on the right directory.

Configuration

You can customize some variables

  • ZSH_SELECT_WITH_LF_FILE_BIND: The keybinding to use to select files default to "^x^f"
  • ZSH_SELECT_WITH_LF_DIR_BIND: The keybinding to use to select directories default to "^x^f"

Copyright

Apache-2.0

Authors

Chmouel Boudjnah

Alternative

The wiki list another method on how to do this: https://github.com/gokcehan/lf/wiki/Integrations#zsh-file-picker--directory-changer

zsh-select-with-lf's People

Contributors

chmouel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zsh-select-with-lf's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.