sách gpt4 ai đã đi

Terminal: Tôi đang ở đâu?

In lại 作者:行者123 更新时间:2023-12-04 23:31:12 29 4
mua khóa gpt4 Nike

是否有一个变量或函数可以告诉我光标的实际位置?

#!/usr/bin/env perl
use warnings;
use 5.012;

use Term::ReadKey;
use Term::Cap;
use POSIX;

my( $col, $row ) = GetTerminalSize();

my $termios = new POSIX::Termios;
$termios->getattr;
my $ospeed = $termios->getospeed;

my $terminal = Tgetent Term::Cap { TERM => undef, OSPEED => $ospeed };

# some movement ...

# at which position (x/y) is the cursor now?

1 Câu trả lời

Bạn có thể sử dụng curses反而。它有 getcurx()getcurx() .有一个CPAN module对于它(以及 Debian 或 Ubuntu 中的 libcurses-perl 包)。

关于perl - 终端:我在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4958900/

29 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com