Skip to content

How To Configure

suewonjp edited this page Nov 29, 2017 · 3 revisions

✔️ Overriding command names

You can change command names by setting the following environment variables.

Notice that you should set the variables before you run source lf.sh or . lf.sh shell commands.
e.g)

    _LIST_FILE_CMD=listfile ### Use this instead of `lf`

    ### ... some commands ...

    source /path/to/lf.sh
  • _LIST_FILE_CMD
    • Command name for lf
  • _LIST_FILE_IGNORECASE_CMD
    • Command name for lfi
  • _LIST_FILE_SELECT_CMD
    • Command name for lfs
  • _LIST_FILE_FILTER_CMD
    • Command name for lff
  • _LIST_FILE_GREP_CMD
    • Command name for g
  • _LIST_FILE_GREP_IGNORECASE_CMD
    • Command name for gi
  • _LIST_FILE_RMRF
    • Since Version 0.8
    • Command name for rmrf

✔️ Specifying folder names to ignore by default

Set _LIST_FILE_DIRS_IGNORE variable like so:

    _LIST_FILE_DIRS_IGNORE=.git:.svn:.hg:.vim

Refer to this for more detail about _LIST_FILE_DIRS_IGNORE variable.

✔️ Using your favorite text search command instead of grep when running g or gi command

Set _LIST_FILE_GREP_TOOL variable like so:

    export _LIST_FILE_GREP_TOOL=egrep

Refer to this for more detail about _LIST_FILE_GREP_TOOL variable.

✔️ Configuring grepping behavior when running g or gi command

Set _LIST_FILE_GREP_OPTIONS variable like so:

    $ _LIST_FILE_GREP_OPTIONS="-nE"

Refer to this for more detail about _LIST_FILE_GREP_OPTIONS variable.

✔️ Configuring Names of Behavior Control Variables

Available Since Version 0.8

You can change names of Behavior Control Variables when you would like to do it for some reason.

    $ _LIST_FILE_BCV_NAME_Q=singlequote

    ### Now use 'singlequote' instead of 'q'
    $ singlequote= lf .js

    'foo.js'
    'bar.js'

You can use the following variables to specify each of Behavior Control Variable names

  • _LIST_FILE_BCV_NAME_IGNORE
    • Name for ignore
  • _LIST_FILE_BCV_NAME_PREPEND
    • Name for prepend
  • _LIST_FILE_BCV_NAME_APPEND
    • Name for append
  • _LIST_FILE_BCV_NAME_PRE
    • Name for pre
  • _LIST_FILE_BCV_NAME_POST
    • Name for post
  • _LIST_FILE_BCV_NAME_Q
    • Name for q
  • _LIST_FILE_BCV_NAME_QQ
    • Name for qq
  • _LIST_FILE_BCV_NAME_NUL
    • Name for nul
  • _LIST_FILE_BCV_NAME_DEL
    • Name for del
  • _LIST_FILE_BCV_NAME_SYM
    • Name for SYM