Thank you, the first option worked like a charm :-)

[email protected] schrieb am Freitag, 25. September 2020 um 16:59:57 
UTC+2:

> #{b;=3:pane_current_path} if you have 2.9 or later.
>
> #{=3:#{b:pane_current_path}} will also work in some later versions.
>
>
>
> On Fri, 25 Sep 2020 at 15:46, Niklas <[email protected]> wrote:
>
>> How do I combine two commands two formatting commands?
>>
>> I want to set the name of a window to the first 3 letters of my current 
>> directory.
>>
>> Example: /some/dir/project
>> Goal: "proj"
>>
>> In tmux I can realize this with:
>>
>> set-option -g automatic-rename on
>> set-option -g automatic-rename-format 'string'
>>
>> Where I can set string to either:
>> - #{=3:pane_current_path}  -> first five letters of path -> "/so"
>> - #{b:pane_current_path} -> current dir -> "project"
>>
>> However, if I attempt to combine the two I just get an empty string. Did 
>> anyone else get this to work?
>>
>> Cheers,
>> Niklas
>>
>>
>> -- 
>> 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 [email protected].
>> To view this discussion on the web, visit 
>> https://groups.google.com/d/msgid/tmux-users/a7c35c72-1510-4089-9c7b-b9eeeb053761n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tmux-users/a7c35c72-1510-4089-9c7b-b9eeeb053761n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/tmux-users/699bb5cb-e7db-40b6-accd-6032cd9154d4n%40googlegroups.com.

Reply via email to