On Mon, Oct 31, 2022 at 2:47 AM Greg Wooledge wrote:
>
> There's no 100% portable way to determine where the cursor is.
On Mon, Oct 31, 2022 at 4:45 PM Chet Ramey wrote:
>
> There is no portable way to determine this.
If only computers were general purpose programmable devices... :)
Koichi's P
where the cursor is ? some tput ansi code returns it .. but i guess u mean
bigger compatibility problems
does, readline, export its cursor assumptations ? like for dev'ing
On Mon, Oct 31, 2022, 16:46 Chet Ramey wrote:
> On 10/30/22 9:40 PM, Oğuz wrote:
>
> > Yeah, or add a new prompt sequence (e
On 10/30/22 9:40 PM, Oğuz wrote:
Yeah, or add a new prompt sequence (e.g. \N) that prints a newline only if
the cursor is not at column 0.
There is no portable way to determine this.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - H
On 10/28/22 8:21 AM, Albert Vaca Cintora wrote:
Machine: All archs
OS: All OSes
Bash Version: All versions since I have memory
Description:
When there's leftover output before the prompt (ie: when the
previous command output doesn't end in a new line), editing a
multi-line command from
31 Ekim 2022 Pazartesi tarihinde Greg Wooledge yazdı:
>
> There's no 100% portable way to determine where the cursor is.
Pity
> Shells like zsh that show a special symbol in these cases use a hack
> to do so. There's a good explanation in this answer:
>
> https://unix.stackexchange.com/questi
On Mon, Oct 31, 2022 at 03:40:34AM +0200, Oğuz wrote:
> > Option B: Fix the line editor to take into account when the
> > prompt doesn't start at column 0.
> >
> >
> Yeah, or add a new prompt sequence (e.g. \N) that prints a newline only if
> the cursor is not at column 0.
There's no 100%
28 Ekim 2022 Cuma tarihinde Albert Vaca Cintora
yazdı:
>
> Option A: If the previous command doesn't end in a newline,
> add a newline manually. This is what most shells do.
This sounds wrong. How are you going to know if the previous command ends
in a newline or not then?
> Op
On Sun, Oct 30, 2022, 23:01 Dennis Williamson
wrote:
>
>
> On Sun, Oct 30, 2022 at 4:41 PM Alex fxmbsw7 Ratchev
> wrote:
>
>>
>>
>> i coded a files tree to bash code via gawk reading and printing bash code
>> i did noeol no newline at end
>> logically , cause , who wants var='from file\n'
>>
>>
On Sun, Oct 30, 2022 at 4:41 PM Alex fxmbsw7 Ratchev
wrote:
>
>
> i coded a files tree to bash code via gawk reading and printing bash code
> i did noeol no newline at end
> logically , cause , who wants var='from file\n'
>
> >
>
Because command substitution strips trailing newlines?
$ echo -e
On Sun, Oct 30, 2022, 21:21 Albert Vaca Cintora
wrote:
> On Sun, Oct 30, 2022 at 7:54 AM Martin D Kealey
> wrote:
> >
> > This sounds like a bug in whatever is producing the output. POSIX text
> files have a newline terminating every line; that description includes
> streams going through pipes
On Sun, Oct 30, 2022 at 7:54 AM Martin D Kealey wrote:
>
> This sounds like a bug in whatever is producing the output. POSIX text files
> have a newline terminating every line; that description includes streams
> going through pipes and tty devices if they purport to be text.
>
There are many r
This sounds like a bug in whatever is producing the output. POSIX text
files have a newline terminating every line; that description includes
streams going through pipes and tty devices if they purport to be text.
It's fairly simple to fix this by adding this to the end of your .bashrc
(or the sys
> $ printf '%*s\rY' "$COLUMNS" X
> | ... X|
> |Y |
P.S. Here I used `|' to represent the left and right boundaries of the
terminal display area.
2022年10月29日(土) 15:44 Albert Vaca Cintora :
> On Sat, Oct 29, 2022 at 7:28 AM Koichi Murase wrote:
> > shopt -s checkwinsize
> > { ! type -t tput || tput xenl || tput xn; } &>/dev/null;
> > _prompt_xenl_offset=$?
> > _prompt_newline() { (:); printf '\e[m%-*s\r\e[K'
> > "$((COLUMNS-_prompt_xenl_off
On Sat, Oct 29, 2022 at 7:28 AM Koichi Murase wrote:
>
> 2022年10月28日(金) 21:24 Albert Vaca Cintora :
> > Description:
> > When there's leftover output before the prompt (ie: when the
> > previous command output doesn't end in a new line), editing a
> > multi-line command from history doesn'
2022年10月28日(金) 21:24 Albert Vaca Cintora :
> Description:
> When there's leftover output before the prompt (ie: when the
> previous command output doesn't end in a new line), editing a
> multi-line command from history doesn't correctly display what you
> edit.
>
> [...]
> Option A:
Machine: All archs
OS: All OSes
Bash Version: All versions since I have memory
Description:
When there's leftover output before the prompt (ie: when the
previous command output doesn't end in a new line), editing a
multi-line command from history doesn't correctly display what you
edit.
R
17 matches
Mail list logo