Server.sourceFile
Run a tmux config file against this server.
Source and package
-
Description#
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.Examples#
await server.sourceFile(`${process.env["HOME"] ?? "."}/.tmux.conf`);
tmux command#
The tmux commands behind sourceFile.
tmux C API#
The C declarations in tmux that implement these commands.
In other ports#
Load a tmux configuration file
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Erlang | tmux Builds a trusted command value. Execute it explicitly with tmux_server:command/3. |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| Rust | server |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | libtmux:: |
| Swift | Server |
| OCaml | No direct public OCaml equivalent is recorded for this operation. |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |
No equivalent is recorded in Lua, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.