<commit_before>//go:generate gen/docstring.sh

/*
lf is a terminal file manager.

Source code can be found in the repository at https://github.com/gokcehan/lf.

This documentation can either be read from terminal using "lf -doc" or online
at https://godoc.org/github.com/gokcehan/lf.

Reference

The following commands and default keybindings are provided by lf.

    up                (default "k" and "<up>")
    half-up           (default "<c-u>")
    page-up           (default "<c-b>")
    down              (default "j" and "<down>")
    half-down         (default "<c-d>")
    page-down         (default "<c-f>")
    updir             (default "h" and "<left>")
    open              (default "l" and "<right>")
    quit              (default "q")
    bot               (default "G")
    top               (default "gg")
    read              (default ":")
    read-shell        (default "$")
    read-shell-wait   (default "!")
    read-shell-async  (default "&")
    search            (default "/")
    search-back       (default "?")
    toggle            (default "<space>")
    yank              (default "y")
    delete            (default "d")
    paste             (default "p")
    renew             (default "<c-l>")

The following options can be used to customize the behavior of lf.

    hidden     bool    (default off)
    preview    bool    (default on)
    scrolloff  int     (default 0)
    tabstop    int     (default 8)
    ifs        string  (default "") (not exported if empty)
    shell      string  (default "$SHELL")
    showinfo   string  (default "none")
    sortby     string  (default "name")
    ratios     string  (default "1:2:3")

The following variables are exported for shell commands.

    $f   current file
    $fs  marked file(s) separated with ':'
    $fx  current file or marked file(s) if any

The configuration file should either be located in "$XDG_CONFIG_HOME/lf/lfrc"
or "~/.config/lf/lfrc". A sample configuration file can be found at
https://github.com/gokcehan/lf/blob/master/etc/lfrc.example.

Prefixes

The following command prefixes are used by lf:

    :  read (default)
    $  read-shell
    !  read-shell-wait
    &  read-shell-async
    /  search
    ?  search-back

The same evaluator is used for the command line and the configuration file. The
difference is that prefixes are not necessary in the command line. Instead
different modes are provided to read corresponding commands. Note that by
default these modes are mapped to the prefix keys above.

Syntax

Characters from "#" to the line end are comments and ignored.

There are three special commands for configuration.

"set" is used to set an option which could be (1) bool (e.g. "set hidden", "set
nohidden", "set hidden!") (2) int (e.g. "set scrolloff 10") (3) string (e.g.
"set sortby time").

"map" is used to bind a key to a command which could be (1) built-in command
(e.g. "map gh cd ~") (2) custom command (e.g. "map D trash") (3) shell command
(e.g. "map i $less "$f"", "map u !du -h . | less"). You can delete an existing
binding by leaving the expression empty (e.g. "map gh").

"cmd" is used to define a custom command or delete an existing command by
leaving the expression empty (e.g. "cmd trash").

If there is no prefix then ":" is assumed. An explicit ":" could be provided to
group statements until a "\n" occurs. This is especially useful for "map" and
"cmd" commands. If you need multiline you can wrap statements in "{{" and "}}"
after the proper prefix.

Yank/Delete/Paste

lf uses the underlying "cp" and "mv" shell commands for file operations. For<commit_msg>cleanup<commit_after>//go:generate gen/docstring.sh

/*
lf is a terminal file manager.

Source code can be found in the repository at https://github.com/gokcehan/lf.

This documentation can either be read from terminal using "lf -doc" or online
at https://godoc.org/github.com/gokcehan/lf.

Reference

The following commands and default keybindings are provided by lf.

    up                (default "k" and "<up>")
    half-up           (default "<c-u>")
    page-up           (default "<c-b>")
    down              (default "j" and "<down>")
    half-down         (default "<c-d>")
    page-down         (default "<c-f>")
    updir             (default "h" and "<left>")
    open              (default "l" and "<right>")
    quit              (default "q")
    bot               (default "G")
    top               (default "gg")
    read              (default ":")
    read-shell        (default "$")
    read-shell-wait   (default "!")
    read-shell-async  (default "&")
    search            (default "/")
    search-back       (default "?")
    toggle            (default "<space>")
    yank              (default "y")
    delete            (default "d")
    paste             (default "p")
    renew             (default "<c-l>")

The following options can be used to customize the behavior of lf.

    hidden     bool    (default off)
    preview    bool    (default on)
    scrolloff  int     (default 0)
    tabstop    int     (default 8)
    ifs        string  (default "") (not exported if empty)
    shell      string  (default "$SHELL")
    showinfo   string  (default "none")
    sortby     string  (default "name")
    ratios     string  (default "1:2:3")

The following variables are exported for shell commands.

    $f   current file
    $fs  marked file(s) separated with ':'
    $fx  current file or marked file(s) if any

The configuration file should either be located in "$XDG_CONFIG_HOME/lf/lfrc"
or "~/.config/lf/lfrc". A sample configuration file can be found at
https://github.com/gokcehan/lf/blob/master/etc/lfrc.example.

Prefixes

The following command prefixes are used by lf:

    :  read (default)
    $  read-shell
    !  read-shell-wait
    &  read-shell-async
    /  search
    ?  search-back

The same evaluator is used for the command line and the configuration file. The
difference is that prefixes are not necessary in the command line. Instead
different modes are provided to read corresponding commands. Note that by
default these modes are mapped to the prefix keys above.

Syntax

Characters from "#" to the line end are comments and ignored.

There are three special commands for configuration.

"set" is used to set an option which could be (1) bool (e.g. "set hidden", "set
nohidden", "set hidden!") (2) int (e.g. "set scrolloff 10") (3) string (e.g.
"set sortby time").

"map" is used to bind a key to a command which could be (1) built-in command
(e.g. "map gh cd ~") (2) custom command (e.g. "map D trash") (3) shell command
(e.g. "map i $less "$f"", "map u !du -h . | less"). You can delete an existing
binding by leaving the expression empty (e.g. "map gh").

"cmd" is used to define a custom command or delete an existing command by
leaving the expression empty (e.g. "cmd trash").

If there is no prefix then ":" is assumed. An explicit ":" could be provided to
group statements until a "\n" occurs. This is especially useful for "map" and
"cmd" commands. If you need multiline you can wrap statements in "{{" and "}}"
after the proper prefix.

File Operations

lf uses the underlying "cp" and "mv" shell commands for file operations. For
{'fraction_non_alphanumeric': 0.1063888888888889, 'fraction_numerical': 0.003611111111111111, 'mean_word_length': 2.429047619047619, 'pattern_counts': {'":': 6, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2411974', 'n_tokens_mistral': 2150, 'n_tokens_neox': 2111, 'n_words': 902}