Skip to content
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

shorten tab text #3850

Closed
hteibler opened this issue Dec 5, 2019 · 4 comments
Closed

shorten tab text #3850

hteibler opened this issue Dec 5, 2019 · 4 comments
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Question For questions or discussion Needs-Attention The core contributors need to come back around and look at this ASAP. Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered

Comments

@hteibler
Copy link

hteibler commented Dec 5, 2019

Description of the new feature/enhancement

shorten tab text
if you have a very long path, one tab can consume nearly the whole window size space
or many tabs with long path, us

Proposed technical implementation details (optional)

ability to configure tab, like the prompt
eg, only last 2 layers of directory
eg. user without hostname
eg. only path
eg. ...

@hteibler hteibler added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Dec 5, 2019
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Dec 5, 2019
@zadjii-msft
Copy link
Member

You can already override the starting title of the window with the tabTitle parameter.

Most shells let you change the title at runtime - see #2304 for details. cmd lets you change the title with the title command, and I know that bash by default sets the title using the PS1 variable.

If you're looking for more dynamic text in the tab, there's also #1320.

There's also #597 for adding settings to manually control the width of the tab.

@hteibler Would you say that any of the above issues have an appropriate solution to your problem?

@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for console or terminal Issue-Question For questions or discussion Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Dec 5, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Dec 5, 2019
@hteibler
Copy link
Author

hteibler commented Dec 6, 2019

I think I don't get it ...
in CMD title is working
but no clue with ubuntu
and "tabTitle" in json profile is ignored, --> should overrule

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Dec 6, 2019
@hteibler
Copy link
Author

hteibler commented Dec 6, 2019

found a solution for me: don't display user@host for my default user in title
in .bashrc ( of default user) I removed \u@\h from here:
old:
PS1="[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a]$PS1"
new:
case "$TERM" in
xterm*|rxvt*)
PS1="[\e]0;${debian_chroot:+($debian_chroot)}\w\a]$PS1"
;;
*)
;;
esac

@zadjii-msft
Copy link
Member

tabTitle is more correctly "starting title" - it's just the title that the shell starts with. As you've discovered, bash resets the title on each prompt. There's another setting we've added, suppressApplicationTitle that should prevent bash from setting the title at all, though it's a little buggy in 0.7.

Since you've seemed to found a solution that works for you, I'm going to close this thread. Thanks!

@zadjii-msft zadjii-msft added the Resolution-Answered Related to questions that have been answered label Dec 6, 2019
@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Question For questions or discussion Needs-Attention The core contributors need to come back around and look at this ASAP. Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

3 participants