Thursday 18 January 2018

conemu - How do I give each tab opened by a {Task} a custom name?


I have a ConEmu {Task} that opens several tabs, each to a different directory. The trouble is, these tabs all have the same name and are hard to tell apart. I know I can rename each tab by right-clicking it and selecting rename*, but is there a way of renaming each one automatically via the task configuration?


It would be super-handy being able to:


a) specify a custom title;
b) specify a variable title using the current directory.


(*what is the Apps+R shortcut, btw? I've never come across the Apps key before.)



Answer



1) Modify contents of your task. Example:


>cmd /c RenameTab "Tab1" & tcc cdd C:\temp
cmd /k RenameTab "Tab2" & cd /d D:\
cmd /c RenameTab "Tab3" & stermc charlesr ...

And so on... Supposing, that %ConEmuBaseDir% exists in %PATH%. This can be done automatically with last ConEmu versions (option on ComSpec settings page).


More short and preferable alternative is available in build 121109 or higher


>tcc cdd C:\temp "-new_console:t:Tab1"
cmd /k cd D:\ "-new_console:t:Tab2"
stermc charles "-new_console:t:Tab3"

2) As for CD in title, you may use usual method. This works for cmd and tcc consoles. Example:


tcc prompt $E]2;"$P"$E\$P$G & cdd D:\
cmd prompt $E]2;"$P"$E\$P$G & cd /d D:\

Don't use 1 and 2 simultaneously. RenameTab has precedence!


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...