man tmux
...
A limit may be placed on the length of the resultant string by prefixing
it by an `=', a number and a colon. Positive numbers count from the
start of the string and negative from the end, so `#{=5:pane_title}' will
include at most the first 5 characters of the pane title, or
`#{=-5:pane_title}' the last 5 characters. Prefixing a time variable
with `t:' will convert it to a string, so if `#{window_activity}' gives
`1445765102', `#{t:window_activity}' gives `Sun Oct 25 09:25:02 2015'.
The `b:' and `d:' prefixes are basename(3) and dirname(3) of the variable
respectively. A prefix of the form `s/foo/bar/:' will substitute `foo'
with `bar' throughout.
...
On Wed, Mar 09, 2016 at 09:48:53PM +0100, Dr. Johannes Zellner wrote:
> Nicholas,
>
> thanks. Unfortunately I didn't find what the correct syntax of the
> substitution could be.
>
> Any pointers?
>
> --
> Johannes
>
> Am 2016-03-09 18:11, schrieb Nicholas Marriott:
>
> You can do conditionals by using substitution, I don't remember the
> syntax but if you s/bash// it will be empty so false.
>
> On 9 Mar 2016 3:41 p.m., "Dr. Johannes Zellner"
> <[2]
joha...@zellner.org> wrote:
>
> Hi,
>
> I'd like to have automatic-rename behave like this:
>
> 1. show path of current dirctory (e.g. #pane_current_path) if the
> shell
> prompt is shown (e.g. if #pane_current_command == bash)
> 2. show #pane_current_command, if a command different from the
> shell is
> active (if #pane_current_command != bash)
>
> Any ideas how to do that?
>
> --
> Johannes
>
> --
> You received this message because you are subscribed to the Google
> Groups
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an
> email to [3]
tmux-users+...@googlegroups.com.
> To post to this group, send an email to
> [4]
tmux-...@googlegroups.com.
> For more options, visit [5]
https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [6]
tmux-users+...@googlegroups.com.
> To post to this group, send an email to
> [7]
tmux-...@googlegroups.com.
> For more options, visit [8]
https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [9]
tmux-users+...@googlegroups.com.
> To post to this group, send email to [10]
tmux-...@googlegroups.com.
> For more options, visit [11]
https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:
joha...@zellner.org
> 2. mailto:
joha...@zellner.org
> 3. mailto:
tmux-users%2Bunsu...@googlegroups.com
> 4. mailto:
tmux-...@googlegroups.com
> 5.
https://groups.google.com/d/optout
> 6. mailto:
tmux-users%2Bunsu...@googlegroups.com
> 7. mailto:
tmux-...@googlegroups.com
> 8.
https://groups.google.com/d/optout
> 9. mailto:
tmux-users+...@googlegroups.com
> 10. mailto:
tmux-...@googlegroups.com
> 11.
https://groups.google.com/d/optout