Help us understand the problem. What is going on with this article?

Bash 5.0の新機能:カーソルの画面行移動

More than 1 year has passed since last update.

Bash 5.0のNEWSファイルをさくっと翻訳したエントリー「bash 5.0のNEWSファイル私訳」を先日書きました。

この中のReadline 8.0の新機能として、カーソルの画面行移動機能がありました。

b. キーに割り当てられるコマンドに新しく`next-screen-line' and
   `previous-screen-line'があります。カーソルを画面行のそれぞれ次と前
   の行の同じカラムに移動します。

さっそく試してみましょう。

Bash 5.0のコマンドラインから、Ctrl-↓にnext-screen-lineを割り当てます。

$ bind '"\e[1;5B": next-screen-line'

同様にCtrl-↑にprevious-screen-lineを割り当てます。

$ bind '"\e[1;5A": previous-screen-line'

コマンドラインで、1行が1画面行を超えるように文字を入力します。

$ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

ここでCtrl-↓とCtrl-↑を押すとカーソルが画面行を移動することがわかります。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした