All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Looijmans <mike.looijmans@topic.nl>
To: openembedded-core@lists.openembedded.org
Cc: Mike Looijmans <mike.looijmans@topic.nl>
Subject: [PATCH 2/2] base-files: profile: Make the "resize" command have the intended effect
Date: Mon, 18 Sep 2017 10:39:26 +0200	[thread overview]
Message-ID: <1505723966-17120-2-git-send-email-mike.looijmans@topic.nl> (raw)
In-Reply-To: <1505723966-17120-1-git-send-email-mike.looijmans@topic.nl>

The "resize" command outputs shell script to be evaluated. The proper way
to use it is to do:
  eval `resize`
This sets the related environment variables COLUMNS and ROWS so that a vi
invokation uses the proper dimensions. Without the "eval" part, running
vi still gives a garbled screen when the dimensions aren't 80x25.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
---
 meta/recipes-core/base-files/base-files/profile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index b5b533c..36bd35f 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -26,7 +26,7 @@ fi
 # /dev/tty[A-z]), otherwise we confuse e.g. the eclipse launcher which
 # tries do use ssh
 case $(tty 2>/dev/null) in
-	/dev/tty[A-z]*) resize >/dev/null;;
+	/dev/tty[A-z]*) eval `resize` ;;
 esac
 
 export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
-- 
1.9.1



  reply	other threads:[~2017-09-18  8:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18  8:39 [PATCH 1/2] base-files: profile: Do not assume that the 'command' command exists Mike Looijmans
2017-09-18  8:39 ` Mike Looijmans [this message]
2017-09-18  8:49 ` Peter Kjellerstedt
2017-09-18 11:31   ` Mike Looijmans
2017-09-18 13:08     ` Burton, Ross
2017-09-18 13:24       ` Mike Looijmans
2017-09-18 13:56         ` Mike Looijmans
2017-10-13  9:53           ` ChenQi
2017-10-13 10:07             ` ChenQi
2018-05-18 10:28               ` Martin Jansa
2018-05-18 16:51                 ` Peter Kjellerstedt
2018-05-18 17:32                   ` Martin Jansa
2017-09-18 14:07       ` [PATCH] base-files: profile: Get rid of "resize" Mike Looijmans
2017-09-18 15:07         ` Peter Kjellerstedt
2017-09-18 15:17           ` Burton, Ross
2017-09-18 18:41             ` Andre McCurdy
2017-09-18 18:43               ` Burton, Ross
2017-09-18 19:01                 ` Andre McCurdy
2017-09-18 19:19                   ` Burton, Ross
2017-09-18 19:30                     ` Andre McCurdy
2017-09-18 20:18                       ` Burton, Ross
2017-09-18 21:11                         ` Andre McCurdy
2017-09-18 23:07                           ` Trevor Woerner
2017-09-19  5:35                             ` Mike Looijmans
2017-09-19 12:34                           ` Burton, Ross
2017-09-19  5:31                     ` Mike Looijmans
2017-09-19  5:26                 ` Mike Looijmans
2017-09-19 12:33                   ` Burton, Ross
2017-09-18 14:30 ` ✗ patchtest: failure for "base-files: profile: Do not as..." and 1 more (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1505723966-17120-2-git-send-email-mike.looijmans@topic.nl \
    --to=mike.looijmans@topic.nl \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.