Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

server.Server.sourceFile

View as Markdown

Module
server
Declared in
Server
Package
libtmux
Source
packages/libtmux/src/server.ts
Other languages
PythonRuby Lua RustGoJava.NETC++Swift
sourceFile ( path : : string ) → Promise<void>
method [source]
method [source]
sourceFile

Run a tmux config file against this server.

tmux does not expand here. source-file joins a path that is not absolute to the client's working directory and globs the result, so "~/.tmux.conf" looks for a directory literally named . Typing it at a shell works because the shell expands it first; passing it as a string never does.

In other ports Load a tmux configuration file

Examples

await server.sourceFile(`${process.env["HOME"] ?? "."}/.tmux.conf`);
>>> import pathlib
>>> conf = pathlib.Path(request.config.rootdir) / '..' / 'tmp_src.conf'
>>> _ = conf.write_text('set -g @test_source yes')
>>> server.source_file(str(conf))

0 declared, 0 inherited

Esc

Type to search.