Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.)

share|improve this question
1  
WinUser.h -> #define VK_APPS 0x5D. May be you come across this as Menu? :-P –  Maximus Aug 8 '12 at 17:15
    
Provide a contents of your {Task} –  Maximus Aug 8 '12 at 17:17
    
Here's is the task config: i.imgur.com/dNr2M.png and here is what it looks like when I launch it from the ConEmu menu: i.imgur.com/RjIp3.png –  Charles Roper Aug 8 '12 at 17:58
    
Re. Menu I don't have one of those either. I've just got a standard UK keyboard (from Dell). EDIT: yes I do! It's the key next to the right Ctrl. –  Charles Roper Aug 8 '12 at 18:00
2  
The Apps key has a menu symbol on it. Take a look: buypcsupplies.com/images/cat/38550_xlargenss_ndo4190.jpg –  Charles Roper Aug 8 '12 at 18:16

1 Answer 1

up vote 20 down vote accepted

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!

share|improve this answer
    
Wow, I didn't think it was possible - thank you. Having said that, 2) isn't working for me - it doesn't change the tab name. Could you possibly show what it should look like in your {Tasks} config? –  Charles Roper Aug 9 '12 at 7:38
    
Note! prompt $E]2;"$P"$E\$P$G change console title, not rename tab. Rename tab has priority. i.imgur.com/UCl3R.png i.imgur.com/A0WwJ.png –  Maximus Aug 9 '12 at 7:41
    
+1 thanks for the tip –  rsenna Aug 10 '12 at 14:20
4  
New switch introduced, answer updated. –  Maximus Nov 12 '12 at 18:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.