id = "elvish" name = "Elvish" homepage = "https://elv.sh/" description = "Friendly and expressive shell" executables = ["elvish"] [dotfiles] # Elvish's command reference documents the user rc file locations: the XDG # config path on Unix, ~/.config/elvish/rc.elv when XDG_CONFIG_HOME is unset, # and %APPDATA%/elvish/rc.elv on Windows. # https://elv.sh/ref/command.html paths = [ "[configHome]/elvish/rc.elv", "%APPDATA%/elvish/rc.elv", ] secret = [] side_effect = false [commands] format = 1 label = "Run an Elvish script" description = "Run an Elvish script file or a single code chunk non-interactively, or check it without executing. Daemon, language-server and logging flags are not covered." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false } [[commands.source]] id = "manual" kind = "manual" url = "https://elv.sh/ref/command.html" revision = "2026-10-27" evidence = """ If the `-c` flag is given, the first argument is executed as a single code chunk. If the `-c` flag is not given, the first argument is taken as a filename, and the content of the file is executed as a single code chunk. The remaining arguments are put in `$args`. - `-c`: Treat the first argument as code to execute, instead of name of file to execute. - `-compileonly`: Parse and compile Elvish code without executing it. - `-norc`: Don't read the RC file when running interactively. - `-rc /path/to/rc`: Path to the RC file when running interactively. - `-version`: Output the Elvish version and quit. """ [[commands.field]] id = "code" label = "Run as code" description = "Treat the script argument as code to execute instead of a filename." type = "boolean" option = ["-c"] sources = ["manual"] [[commands.field]] id = "compile_only" label = "Check only" description = "Parse and compile without executing." type = "boolean" option = ["-compileonly"] sources = ["manual"] [[commands.field]] id = "script" label = "Script file or code" type = "string" position = 0 sources = ["manual"] [[commands.field]] id = "args" label = "Script arguments" description = "Available to the script as $args." type = "string" position = 1 multiple = true sources = ["manual"] [[commands.field]] id = "norc" label = "Skip RC file" description = "Only applies when starting an interactive shell, so leave Script empty." type = "boolean" option = ["-norc"] sources = ["manual"] [[commands.field]] id = "rc" label = "RC file" description = "Only applies when starting an interactive shell, so leave Script empty." type = "path" option = ["-rc"] path = { kind = "file", role = "input" } sources = ["manual"] [[commands.task]] id = "run_file" label = "Run a script file" fields = ["script", "args"] required = ["script"] [[commands.task]] id = "check_file" label = "Check a script without running it" fields = ["compile_only", "script"] required = ["compile_only", "script"] set = { compile_only = [true] } [[commands.task]] id = "run_code" label = "Run a code chunk" fields = ["code", "script"] required = ["code", "script"] set = { code = [true] } [[commands.task]] id = "try_rc" label = "Try an interactive config" fields = ["rc"] required = ["rc"] [[commands.group]] id = "basic" label = "Basic" fields = ["code", "compile_only", "script", "args"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["norc", "rc"]