tmux/Pane/Q/What's the easiest way to get the CWD of a pane?
Properties
- logseq-entity
- Logseq/Entity/Question
What's the easiest way to get the CWD of a tmux/Pane?
AI Answer
- Short answer: run
tmux display-message -p '#{pane_current_path}'from inside the pane. - sh
tmux display-message -p '#{pane_current_path}' - To check a pane other than the active one, add
-twith awindow.panetarget: -pprints the formatted message to stdout instead of the status line, and#{pane_current_path}is the format variable holding the pane's current working directory — so this works from a script or from another pane, not only from inside the target pane itself.Sources
- Short answer: run