-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
strange fish_title behaviour ? #2123
Comments
This sounds like a terminal bug to me. What happens if you run, say, |
Does not produce any output. Here is what the signal connection in Tilda looks like: Adding a debug_print to |
In bash, Also, it sounds like you're set up to instrument the title change callback - are you able to print the title that's being set? It's surprising that there's two callbacks here. From inspecting the fish code I only expect one. |
On OS X in bash this does change the title, in Linux it produces no output (or title change). Likewise no output in fish on either OS X or Linux. I'm not sure why there are two callbacks there either. If I set it to |
I don't produce that in Linux either. |
I haven't read the fish-shell code for Here is a fish_title function which seems to exhibit the problematic behaviour (tested in tilda, gnome-terminal, xterm {Linux 4.2.5-1-ARCH #1 SMP PREEMPT}) -- A single function fish_title
set -q TITLE; and set -gx TITLE (math $TITLE + 1); or set -gx TITLE 0;
pwd
end |
From the docs:
It's not quite said outright, but fish_title is called once when a command is executed and then again when control returns to fish. (This appears necessary to me so the title doesn't include the last command when fish is in control again) So incrementing by 2 is as-intended. Why tilda seems to not get the titles, I don't know - is this maybe an issue with it not reacting fast enough? |
@faho - I didn't realize this was an intentional behaviour (bash only emits a single event per command), if you read my opening comment the problem isn't that Tilda isn't reacting fast-enough, it's rather it reacts right away - so a command which alters the title (however briefly) will displace the terminal tabs, but in that case this might be best avoided adding a configurable min-width to tilda. |
There have been so many changes to the relevant code since this was opened, and few people are using this niche terminal, I'm going to close this. If fish 2.5 on Tilda is still broken for you, @pik, please reopen. |
I use Tilda for my primary terminal, which supports terminal-tabs, additional tabs have their associated titles placed along the top of a Tilda-Window, if more tabs are in existence than the width of the window, it is possible to scroll through these left and right.
Now the issue I'm having is that when
function fish_title
is triggered (which is to say any command) there appears to be a brief instance where the length of the title screen is indeterminate or otherwise different from pre-command and post-command state. Specifically this behaviour is visible because Tilda will re-arrange (scroll) the tabs as it would on change of title-length, even though the title might not have changed at all from pre-command to post-command states. Setting a static title via. aset_title
function will prevent the re-arrangement/scrolling of the title bars.Here is my normal title function for reference:
The text was updated successfully, but these errors were encountered: