Giter VIP home page Giter VIP logo

fzf-csh's Introduction

fzf-csh

C shell (csh) history support for fzf command line fuzzy finder.
Works with tcsh.

how to use

  • clone the repository:
git clone https://github.com/graahnul-grom/fzf-csh.git
  • source fzf-csh.csh in your .cshrc configuration file:
if ( -r "/path/to/fzf-csh.csh" ) then
    source /path/to/fzf-csh.csh
endif
  • copy fzf-csh-impl.csh and fzf-csh-find.sh somewhere in the $PATH and make them executable (chmod +x).

After logging out and then in, pressing Ctrl + R will open the fzf list with command history. Press Enter to put selected history item on the command line.

Note that you have to press Ctrl + R first and then start typing something to filter the history. Doing the other way around - typing and then pressing Ctrl + R - will not take into account what have already been typed.

fzf-csh requires some temporary writable directory to work, and by default it uses $HOME. If $HOME is not writable or you want to use another directory, set its path in the $FZF_CSH_TMP_DIR environment variable before including fzf-csh.csh, e.g.:

if ( -r "/path/to/fzf-csh.csh" ) then
    setenv FZF_CSH_TMP_DIR /tmp
    source /path/to/fzf-csh.csh
endif

file name completion

In addition to history, file name completion support has been added recently. Press Ctrl + T to open a list with (regular) files/dirs names found under the current directory. Paths like .git/, .svn/, and those located on other file systems are excluded by default. See fzf-csh-find.sh for the find(1) command used.

compatibility

Tested with fzf 0.33 - 0.38 on FreeBSD 13, so at the moment fzf-csh should work with tcsh shell (6.22.04 - echo $tcsh) from the FreeBSD base system.

Also tested on Ubuntu Linux 20.04 LTS ("Focal Fossa"). Note that there are two csh packages: csh (installs /bin/bsd-csh) and tcsh (installs /bin/tcsh). The former will not work, make sure to install the tcsh one or, if both are installed, run update-alternatives --config csh command and select tcsh when prompted.

license

BSD2CLAUSE
copyright (c) 2022-2023 dmn

fzf-csh's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

luotee fgs76100

fzf-csh's Issues

vim support in fzf-csh

Hi @graahnul-grom,
Will you consider adding the support for vim in fzf-csh?
It would be useful if I can use gvim to open the file found by fzf, like vim $(fzf) in bash or zsh
Thank you very much!

fzf-file-widget support

Hi,
May I ask if you have any plans to add support for the fzf-file-widget function?
Thank you.

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.