Mitchell Hashimoto
๐ค SpeakerAppearances Over Time
Podcast Appearances
Editing that prompt right the shell is editing the prompt and the shell is moving when you did a back arrow I'm not even moving the cursor I'm sending a back arrow to the shell and the shell is sending a message back to me saying move the cursor left by one But it could do anything it wants in the same way that when you hit the up arrow It's not telling me to move the cursor up It's telling me paint this text which is history that I don't know anything about the shell knows about and so
Editing that prompt right the shell is editing the prompt and the shell is moving when you did a back arrow I'm not even moving the cursor I'm sending a back arrow to the shell and the shell is sending a message back to me saying move the cursor left by one But it could do anything it wants in the same way that when you hit the up arrow It's not telling me to move the cursor up It's telling me paint this text which is history that I don't know anything about the shell knows about and so
It's hard for me to solve because we don't own that text input. There's very hacky things that Ghosty and other terminals do. If you shift-click somewhere into the prompt, the cursor moves there. I think it's shift-clicked or shift-command-clicked. I don't even remember off the top of my head. And when someone suggested Ghosty support that, I gave them this answer of, like, I can't do that.
It's hard for me to solve because we don't own that text input. There's very hacky things that Ghosty and other terminals do. If you shift-click somewhere into the prompt, the cursor moves there. I think it's shift-clicked or shift-command-clicked. I don't even remember off the top of my head. And when someone suggested Ghosty support that, I gave them this answer of, like, I can't do that.
They said, oh, other terminals support it. And so I went and looked, and I was like, how do these other terminals do it? They actually synthesize arrow keys is how they do it. They guess. They guess. You click one row up and four cells to the left. I'm going to send you one up arrow and four left arrows and hope your cursor gets there. And it leads to all sorts of weird stuff.
They said, oh, other terminals support it. And so I went and looked, and I was like, how do these other terminals do it? They actually synthesize arrow keys is how they do it. They guess. They guess. You click one row up and four cells to the left. I'm going to send you one up arrow and four left arrows and hope your cursor gets there. And it leads to all sorts of weird stuff.
So if you like, you could do this in Ghosty. You could do it in other terminals where if you click up too many times, history will start showing up. because it's sending up arrows and history is actually showing up instead. And that's a terrible experience. And so this is a long, rambly way to say, it's not my problem, but I do want to solve it. I do want to help make it easier.
So if you like, you could do this in Ghosty. You could do it in other terminals where if you click up too many times, history will start showing up. because it's sending up arrows and history is actually showing up instead. And that's a terrible experience. And so this is a long, rambly way to say, it's not my problem, but I do want to solve it. I do want to help make it easier.
And this is one of the areas where I want a terminal to provide better tooling to shells so that we could actually do this in a very user-friendly way.
And this is one of the areas where I want a terminal to provide better tooling to shells so that we could actually do this in a very user-friendly way.
The community suggested this as an option, as a configuration option. I could solve it by separating out where the prompt is and where the output is. And I think that's what Warp does. you know, your, your, your prompt input is like a totally separate box from where the output goes. And in that way, I could just defer sending stuff to the shell. You know, I could actually own the input fully.
The community suggested this as an option, as a configuration option. I could solve it by separating out where the prompt is and where the output is. And I think that's what Warp does. you know, your, your, your prompt input is like a totally separate box from where the output goes. And in that way, I could just defer sending stuff to the shell. You know, I could actually own the input fully.
And only when you sort of hit enter or hit tab or hit certain control characters, I could actually flush it out to the shell and be like, okay, what's the deal and sync back up. I'm not trying to over-trivialize that problem or anything. I think what Warp did is really good there. But that's how I could solve it.
And only when you sort of hit enter or hit tab or hit certain control characters, I could actually flush it out to the shell and be like, okay, what's the deal and sync back up. I'm not trying to over-trivialize that problem or anything. I think what Warp did is really good there. But that's how I could solve it.
But it would feel distinctly different for people that actually want a prompt that starts marching down your screen.
But it would feel distinctly different for people that actually want a prompt that starts marching down your screen.
Yeah.
Yeah.
The directory maybe didn't exist?
The directory maybe didn't exist?