bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fg via keybind modifies tty settings


From: #!microsuxx
Subject: Re: fg via keybind modifies tty settings
Date: Sat, 16 Nov 2024 21:15:09 +0100

so , this is using the logic that vim returns a specific code 148 on
control-z
checking $? for it is what i did , for your request ..

that thats a bit more clear , we can go on with testing

copypaste the first small code in a terminal
and proceed with vim c-z testing

the second longer is only for when u wanna match that the 148 returned
process for stty sane is 'vim*''

i suggest u stick to the first small code and copy the bigger one for just
so to have it

greets


On Sat, Nov 16, 2024, 7:52 PM David Moberg <kaddkaka@gmail.com> wrote:

> That looks very complicated, how do interpret that? And where/when to run
> it?
>
> Den lör 16 nov. 2024 16:48#!microsuxx <fxmbsw7@gmail.com> skrev:
>
>> trap ' t=$? ; [[ $BASH_COMMAND != *'$'bashcmd* ]] &&
>> bashcmd=$BASH_COMMAND ' debug ; PROMPT_COMMAND=' [[ $t == 148 && $bashcmd
>> == vim* ]] && echo ye && stty sane '
>>
>> On Sat, Nov 16, 2024, 4:40 PM #!microsuxx <fxmbsw7@gmail.com> wrote:
>>
>>> PROMPT_COMMAND=' [[ $? == 148 ]] && stty sane '
>>>
>>> On Sat, Nov 16, 2024, 11:29 AM David Moberg <kaddkaka@gmail.com> wrote:
>>>
>>>> Ok, is there anything I can do on my user side to get desired behavior?
>>>> (similar to running `stty sane` every time I send vim to the
>>>> background.)
>>>>
>>>> Den tis 12 nov. 2024 16:49Chet Ramey <chet.ramey@case.edu> skrev:
>>>>
>>>> > On 11/10/24 7:14 PM, Martin D Kealey wrote:
>>>> >
>>>> > > Perhaps what's really needed is to make sure that "ordinary"
>>>> commands
>>>> > bound
>>>> > > using bash -x are completely broken (so people won't try to use
>>>> them),
>>>> > > rather than almost working.
>>>> >
>>>> > `Ordinary' commands aren't broken. Programs like vim that modify the
>>>> > terminal settings, which are in the minority, are.
>>>> >
>>>> > --
>>>> > ``The lyf so short, the craft so long to lerne.'' - Chaucer
>>>> >                  ``Ars longa, vita brevis'' - Hippocrates
>>>> > Chet Ramey, UTech, CWRU    chet@case.edu
>>>> http://tiswww.cwru.edu/~chet/
>>>> >
>>>>
>>>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]