server.Server.sourceFile
- Module
- server
- Declared in
- Server
- Package
- libtmux
- Source
- packages/libtmux/src/server.ts
- Other languages
- PythonRuby Lua RustGoJava.NETC++Swift
-
Run a tmux config file against this server.
tmux does not expand
here.source-filejoins 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
- Python
libtmux.Server.source_file - Ruby
LibTmux::Server#source_file - Lua No source-verified Lua equivalent is recorded for this operation.
- Rust
server.Server.source_file - Go
tmux.Server.SourceFile - Java
io.github.libtmux.Server.Server.sourceFile - .NET
LibTmux.Server.SourceFileAsync - C++
libtmux::Server::source_file - Swift
Server.sourceFile(_:)
- Python
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