-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Revisit the idea of rename tabs #2907
Comments
This works, you just have to have your shell do it, see #284 (comment) |
Hi, @Stanzilla . Sorry to bother you but this is definitely not working in the case where you connect to a remote machine. The |
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:
If 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 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: |
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. |
This stopped working for me when I upgraded to Version 3. I am using this on Mac Mojave 10.14.5. |
@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 from # Useful support for interacting with Terminal.app or other terminal programs
[ -r "/etc/zshrc_$TERM_PROGRAM" ] && . "/etc/zshrc_$TERM_PROGRAM" which sources # 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. |
I am on the latest Hyper.app version
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
Hyper.app version: 2.0.0
Issue
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.
The text was updated successfully, but these errors were encountered: