desktop-packages team mailing list archive
-
desktop-packages team
-
Mailing list archive
-
Message #100223
Re: [Bug 1419339] Re: Terminal input offset incorrect after output with no trailing newline and then cycling up through commands
Thanks, both those methods work for me.
On 11 February 2015 at 00:52, Egmont Koblinger <egmont@xxxxxxxxx> wrote:
> Simple version:
> export PROMPT_COMMAND='printf "%*s\r\e[K" $COLUMNS'
>
> More complex version with an inverse exclamation mark:
> export PROMPT_COMMAND='printf "\e[7m!\e[0m%*s\r\e[K" $((COLUMNS-1))'
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1419339
>
> Title:
> Terminal input offset incorrect after output with no trailing newline
> and then cycling up through commands
>
> Status in gnome-terminal package in Ubuntu:
> New
>
> Bug description:
> Steps to recreate problem:
>
> 1. Run a very long command, the command should be wider than the
> terminal width so it wraps round to the next line. For this example,
> run a long echo command, such as:
>
> echo "joi fowiejf fsweiofj woifj weiof weif wioejf weif woifjw ofwioe
> fdwiojf wfw
>
> fiowejfeiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjjjjjjjjjjjjjjjddjj
> fjwepf fweijf fwekfnwe fwef wefw efe fewf wef wef"
>
> 2. Run program that outputs to stdout without a trailing newline, e.g.
>
> printf "oiwjgoiwgoiwoiawbn"
>
> So your terminal should look like:
> oiwjgoiwgoiwoiawbnusername@pcname:~$
>
> 3. Use the up arrow key to go back to the long command you entered
>
> 4. Press the home button. The cursor goes to the wrong location,
> behind the start of the actual command and the start of where the
> command would be had it not been for the printf command.
>
> Then move the cursor to just before the echo statement, and type less
> to change "echo" to "lessecho" (a version of echo which expands meta
> characters). You should notice what the problem is now, the location
> your cursor appears to be at is not the actual location in the
> command, but where it would be if the printf command had not just been
> run.
>
>
> This is annoying because it can cause you to incorrectly modify old
> commands.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 14.04
> Package: gnome-terminal 3.6.2-0ubuntu1
> ProcVersionSignature: Ubuntu 3.13.0-44.73-generic 3.13.11-ckt12
> Uname: Linux 3.13.0-44-generic x86_64
> ApportVersion: 2.14.1-0ubuntu3.6
> Architecture: amd64
> CurrentDesktop: Unity
> Date: Sat Feb 7 20:04:37 2015
> InstallationDate: Installed on 2015-01-18 (20 days ago)
> InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64
> (20140722.2)
> SourcePackage: gnome-terminal
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1419339/+subscriptions
>
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-terminal in Ubuntu.
https://bugs.launchpad.net/bugs/1419339
Title:
Terminal input offset incorrect after output with no trailing newline
and then cycling up through commands
Status in gnome-terminal package in Ubuntu:
New
Bug description:
Steps to recreate problem:
1. Run a very long command, the command should be wider than the
terminal width so it wraps round to the next line. For this example,
run a long echo command, such as:
echo "joi fowiejf fsweiofj woifj weiof weif wioejf weif woifjw ofwioe
fdwiojf wfw
fiowejfeiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjjjjjjjjjjjjjjjddjj
fjwepf fweijf fwekfnwe fwef wefw efe fewf wef wef"
2. Run program that outputs to stdout without a trailing newline, e.g.
printf "oiwjgoiwgoiwoiawbn"
So your terminal should look like:
oiwjgoiwgoiwoiawbnusername@pcname:~$
3. Use the up arrow key to go back to the long command you entered
4. Press the home button. The cursor goes to the wrong location,
behind the start of the actual command and the start of where the
command would be had it not been for the printf command.
Then move the cursor to just before the echo statement, and type less
to change "echo" to "lessecho" (a version of echo which expands meta
characters). You should notice what the problem is now, the location
your cursor appears to be at is not the actual location in the
command, but where it would be if the printf command had not just been
run.
This is annoying because it can cause you to incorrectly modify old commands.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: gnome-terminal 3.6.2-0ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-44.73-generic 3.13.11-ckt12
Uname: Linux 3.13.0-44-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Feb 7 20:04:37 2015
InstallationDate: Installed on 2015-01-18 (20 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
SourcePackage: gnome-terminal
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1419339/+subscriptions
References