New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab template for current directory name #66

Closed
kdelmonte opened this Issue Mar 7, 2015 · 20 comments

Comments

Projects
None yet
4 participants
@kdelmonte

kdelmonte commented Mar 7, 2015

@Maximus5, is there a tab template for current directory name vs the full directory path? This would be very useful for users who use ConEmu on several folders at the same time using a single window and multiple tabs.

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Mar 7, 2015

What do you mean?

@kdelmonte

This comment has been minimized.

kdelmonte commented Mar 8, 2015

Let's say I am on directory C:\test\one\two\three\four\and\my-project-name.

If I use the tab template : <%c> %d

I get <1> C:\test\one\two\three\four\and\my-project-name.

Anyway to get <1> my-project-name?

capture

@kdelmonte

This comment has been minimized.

kdelmonte commented Mar 8, 2015

Hahahaha... You are awesome my friend. Just got the update. Works great!

@kdelmonte kdelmonte closed this Mar 8, 2015

@gene-pavlovsky

This comment has been minimized.

gene-pavlovsky commented Oct 3, 2016

I don't get it. For me, it still shows the full path, rather than the basename (last part of the path)

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Oct 3, 2016

@gene-pavlovsky Just look carefully in your configuration dialog.

@gene-pavlovsky

This comment has been minimized.

gene-pavlovsky commented Oct 3, 2016

@Maximus5 Well I replaced %s with %d, what else is there to look at? It doesn't have effect on Far at all (and setting %d in Far settings didn't work either). I'm mostly using Cygwin bash, my PROMPT_COMMAND includes a call to ConEmuC -StoreCWD.

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Oct 3, 2016

You shall read description for tab temlate field! %d is not a template you are looking for.

@gene-pavlovsky

This comment has been minimized.

gene-pavlovsky commented Oct 3, 2016

The OP posted a screenshot using %d followed by Works great! comment and then the issue was closed. What is the solution, then? Please point me to the full list of available tab template field patterns. I didn't find anything relevant here.

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Oct 3, 2016

The screenshot shows template for "directory path", what was requested.
Is it so hard to read description near to the template field to get %f - folder?

@gene-pavlovsky

This comment has been minimized.

gene-pavlovsky commented Oct 3, 2016

@Maximus5, sorry to steal your time with my questions.
To be honest, there's no %f in the screenshot, and that's where I looked. Now I see in settings themselves there's %f (but it's not mentioned on the Far manager's page).
It seems to work half of the times - sometimes it doesn't update. So I changed drive from C:\ to D:, didn't update. Entered a dir, updated. Entered a subdir in that dir, not updated. Entered another subdir, updated.

Same issue if I use ConEmuC -GuiMacro Rename 1 "$PWD" instead of Rename 0 in bash's PROMPT_COMMAND. Should I open another github issue?

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Oct 3, 2016

Screenshot was not posted by me and I tried to force you to check your settings dialog.

Without thorough information about OS, shell, prompt configuration, ConEmu version and probably something else I can't find your problem with jammed folder in title.

@gene-pavlovsky

This comment has been minimized.

gene-pavlovsky commented Oct 3, 2016

Sorry for misunderstanding. Right, I posted another issue about Far with more details. Problem in bash was unrelated. That issue was due to:

19:13:59 /proc
# ConEmuC -GuiMacro Rename 1 "$PWD"
Error: Current working directory is a virtual Cygwin directory which does
not exist for a native Windows application.
Can't start native Windows application from here.

Same happens with /cygdrive. Small price to pay, I guess.

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Oct 3, 2016

I suppose, you may correct PROMPT_COMMAND and suggest an improvement.

Anyway, I hate /cygdrive.

@gene-pavlovsky

This comment has been minimized.

gene-pavlovsky commented Oct 3, 2016

I renamed mine to /mnt through fstab. If I would be running Linux, that's where Windows filesystems would be mounted.
Anyway /dev and below, /proc and below and exactly /cygdrive (/mnt in my case) are the places which don't map anywhere within Windows world (e.g. can't open Far pointing there), I have no idea what to update the CWD to. Just change the tab title to the current path?
Btw, if I change the tab title with ConEmuC -GuiMacro Rename 0 "title", what should I do to reset it to the default tab title template (e.g. %c %d)?

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Oct 3, 2016

Empty string would revert to default tab title.

@gene-pavlovsky

This comment has been minimized.

gene-pavlovsky commented Oct 3, 2016

Genius! Could have guessed it :)

@gpressutto5

This comment has been minimized.

gpressutto5 commented Dec 5, 2016

@Maximus5 I don't know why, but on my machine %f shows my user name. Here is my directory:
guilherme.ferruzzi@MLW153 MINGW64 /C/Users/guilherme.ferruzzi/PhpstormProjects/vue-bills-api (master)
But in tabs: %f shows guilherme.ferruzzi

@gpressutto5

This comment has been minimized.

gpressutto5 commented Dec 5, 2016

Different process on the same folder shows:
%n - %f = node.exe - guilherme.ferruzzi, php.exe - guilherme.ferruzzi, bash.exe - guilherme.ferruzzi
I would like it to be node.exe - vue-bills-api

image

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Dec 5, 2016

@gpressutto5

This comment has been minimized.

gpressutto5 commented Dec 5, 2016

@Maximus5 Works great! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment