ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.83k stars 451 forks source link

Automatic or silent installation #1185

Closed ycpss91255 closed 4 months ago

ycpss91255 commented 4 months ago

Feature description

if command -v curl >/dev/null 2>&1; then
    bash -c "$(curl -fsSL https://raw.githubusercontent.com/ayamir/nvimdots/HEAD/scripts/install.sh)"
else
    bash -c "$(wget -O- https://raw.githubusercontent.com/ayamir/nvimdots/HEAD/scripts/install.sh)"
fi

Is there a way to install automatically or silently?

Additional information

No response

ayamir commented 4 months ago

No, you should keep nvim open in foreground until all of components installed.

Jint-lzxy commented 3 months ago

No, you should keep nvim open in foreground until all of components installed.

@ayamir I'm thinking that perhaps we could provide a "headless install" option, which would allow the entire installation to remain silent but could result in errors that can't be caught (which IMO is the user's responsibility to handle such situations, e.g., thru I/O redirection, pipelines, etc.)

                            *--headless*
--headless  Start without UI, and do not wait for `nvim_ui_attach`. The
        builtin TUI is not used, so stdio works as an arbitrary
        communication channel. |channel-stdio|

        Also useful for scripting (tests) to see messages that would
        not be printed by |-es|.

        To detect if a UI is available, check if |nvim_list_uis()| is
        empty during or after |VimEnter|.

        To read stdin as text, "-" must be given explicitly:
        --headless cannot assume that stdin is just text. >
            echo foo | nvim --headless +"%print" +"q!" -
<
        See also |--embed|.
        See also |-es|, which also disables most messages.