[x] I have searched the issues of this repo and believe that this is not a duplicate
OS version and name: OS X El Capitan 10.11.6
I know this has been discussed before in #284, but as a SysAdm I frequently have to ssh to other machines and the current approach will fail, because you can no longer rename the tab through bash tricks.
I feel a better way could be the addition of another hyper command(rename-tab) in hyper-keymap and prompt the user in an os-level dialog and ask the new title.
This works, you just have to have your shell do it, see https://github.com/zeit/hyper/issues/284#issuecomment-383477467
Hi, @Stanzilla . Sorry to bother you but this is definitely not working in the case where you connect to a remote machine. The title command will be sent to the remote machine and it won't pass back to your local box.
Hey there, to verify if this is indeed a Hyper issue or upstream at https://github.com/xtermjs/xterm.js/ could you please test if another xterm.js powered terminal shows the same problem you are experiencing? I suggest using https://github.com/Microsoft/vscode for testing. Thanks!
Hi, @Stanzilla, I have verified that this is indeed a missing feature in Hyper. I don't believe this is an issue with xterm.js because tab management is part of Hyper, and xterm.js does not have a concept of tabs.
Can you please verify this yourself on your end?
Steps:
title test1test1title test2 and observeIf you do not have access to a remote machine, can you leave the issue open and let other maintainers have a try? Thanks!
So the issue is that you want Hyper to use your own ~/.bashrc even though you are connected to a remote IP?
I will reopen but I really don't know if this should work. I just tried with Windows Bash and it does not work there either.
See https://github.com/xtermjs/xterm.js/blob/716a8d592676ada264d9b9b7ebec2f1f3277a4c6/src/Terminal.ts#L2134, you want to handle the title event on Terminal:
term.on('title', (title) => console.log('the program set the title to ' + title));
@Stanzilla Can I create a fork/PR for this and make it load the current folder by default for the title?
@El-Dringo-Brannde sure, no promises on it being accepted though :)
@Stanzilla This is my first OSS contribution (Which I'm doing for a school project). Anything I can do to increase the likelihood of it being accepted?
Also, is there any formalities to adding the in progress tags or help wanted to the issue?
@El-Dringo-Brannde Follow https://github.com/zeit/hyper#contribute as best as possible and just mention the current state of the PR and if you need help with anything! 馃憤
@xiaket Same here.
Running a small linux server group of 6. Need to ssh all of them sometimes and to rename tab title conveniently is show-stopper for picking terminal simulator.
With terminator I can click title then edit it directly. Hope hyer can do that as well.
Sorry to be the one to say this @El-Dringo-Brannde , but your PR #3015 will not fix this issue. Thanks for your contribution though.
I'm with @xiaket here. The idea of using bash functions to set your title works in some cases, but I don't think it's a good solution, for a few reasons:
First, it's coupling your terminal program to your .bashrc, which isn't great; what if you use more than one terminal and they use different escape code? And more generally, why use a shell function to do something that affects Hyper itself? Nothing else in Hyper works this way.
Second, as xiaket pointed out, it's completely broken when you SSH into another machine. I now have multiple tabs called "user@host: ~" but in fact none of those titles are accurate; I'm ssh'd into different machines in each. But there's no way to update the titles to reflect which machine I'm logged into, which is frustrating.
@xiaket 's idea of adding a native hyper command (rename-tab) in hyper-keymap sounds like a better approach.
Hi! I have used the bash function from the other issue, but in practice the titles switch back if I have multiple windows (split in various ways) in one tab and the CLI commands running in there do somehow revert this back to "Shell". I believe this is a fairly typical setup. Whatever the solution, from a ergonomics perspective one should be able to rename via CLI and by clicking (somehow) the tab, from my experience how people expect tabs to work.
@mhrisse Can you make a GIF of this. Since I'm to busy to test behaviours?
I need to be able to rename tabs. Please help.
Running commands override the title directive.
I'm running several different programs using npm and want to check logs. Hyper's approach isn't very user-friendly in this case:

This stopped working for me when I upgraded to Version 3. I am using this on Mac Mojave 10.14.5.
Running commands override the
titledirective.I'm running several different programs using
npmand want to check logs. Hyper's approach isn't very user-friendly in this case:
@aedm try this https://www.npmjs.com/package/hyper-prefix-of-tab plugin. It just adds a prefix to the shown title to identify different tab.
Here is how Apple does it with Terminal and zsh:
from /etc/zshrc:
# Useful support for interacting with Terminal.app or other terminal programs
[ -r "/etc/zshrc_$TERM_PROGRAM" ] && . "/etc/zshrc_$TERM_PROGRAM"
which sources /etc/zshrc_Apple_Terminal:
# zsh support for Terminal.
# Working Directory
#
# Tell the terminal about the current working directory at each prompt.
if [ -z "$INSIDE_EMACS" ]; then
update_terminal_cwd() {
# Identify the directory using a "file:" scheme URL, including
# the host name to disambiguate local vs. remote paths.
# Percent-encode the pathname.
local url_path=''
{
# Use LC_CTYPE=C to process text byte-by-byte. Ensure that
# LC_ALL isn't set, so it doesn't interfere.
local i ch hexch LC_CTYPE=C LC_ALL=
for ((i = 1; i <= ${#PWD}; ++i)); do
ch="$PWD[i]"
if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then
url_path+="$ch"
else
printf -v hexch "%02X" "'$ch"
url_path+="%$hexch"
fi
done
}
printf '\e]7;%s\a' "file://$HOST$url_path"
}
# Register the function so it is called at each prompt.
autoload add-zsh-hook
add-zsh-hook precmd update_terminal_cwd
fi
I love Hyper so don't take what I say the wrong way.
Having to use a script to change the tab name is silly.
Since tabs are created by Hyper, they should have the functionality you would expect from tabs. They should support drag and drop and they should be renameable.
Most helpful comment
I love Hyper so don't take what I say the wrong way.
Having to use a script to change the tab name is silly.
Since tabs are created by Hyper, they should have the functionality you would expect from tabs. They should support drag and drop and they should be renameable.