gnuplot 대화형 터미널의 Home 및 End 키는 커서를 이동하지 않습니다.

gnuplot 대화형 터미널의 Home 및 End 키는 커서를 이동하지 않습니다.

gnuplot과 대화형으로 작업할 때 home 및 end 키는 커서를 줄의 시작과 끝으로 이동하지 않고 대신 각각 "OH" 및 "OF" 문자를 생성합니다. 그 이유는 무엇이며 커서를 명령의 시작과 끝으로 이동하려면 어떻게 해야 합니까?

답변1

readline 라이브러리와 관련하여 GNU와 Ubuntu/Debian 사이에 라이센스 문제가 있습니다. 이 수정 사항을 사용하면 소스에서 gnuplot을 컴파일하고 HOME, END, CTRL+왼쪽 화살표, CTRL+오른쪽 화살표 키를 사용할 수 있습니다.

이는 OH, OF, 1;5D, 1;3D 등을 생성하지 않습니다.

./configure --with-readline=/lib/x86_64-linux-gnu/libreadline.so.6
make
make install

참고 사항:

./configure --with-readline=gnu

나에게 적합하지 않습니다.

답변2

줄의 시작과 끝으로 이동하는 것에 대한 답변의 일부입니다. 바라보다도움말 라인 편집, gnuplot의 올바른 단축키를 배우려면. 따라서 줄의 CtrlA시작과 끝으로 이동을 사용하세요.CtrlE

      `Line-editing`:
       ^B    moves back a single character.
       ^F    moves forward a single character.
       ^A    moves to the beginning of the line.
       ^E    moves to the end of the line.
       ^H    and DEL delete the previous character.
       ^D    deletes the current character.
       ^K    deletes from current position to the end of line.
       ^L,^R redraws line in case it gets trashed.
       ^U    deletes the entire line.
       ^W    deletes from the current word to the end of line.

귀하의 경우에는 왜 그것이 표시되는지 설명할 수 없지만 링크된 페이지가 표시됩니다(이 메시지는 버전과 관련된 것 같습니다)

( 의 readline 함수는 gnuplotGNU Bash 및 GNU Emacs에서 사용되는 readline과 다릅니다. GNU 버전을 원할 경우 gnuplot컴파일 타임 버전 대신 이를 선택할 수 있습니다.)

답변3

gnuplot은 GNU 프로젝트가 아니지만 이후 해당 이름으로 개발되었습니다.1986년, GNU 선언문(1985)이 출판된 직후를 되돌아봅니다. 실제 GNU프로젝트그 시대 언젠가 시작되었습니다(다양한 날짜를 본 적이 있습니다).

GNU 프로젝트가 아니기 때문에 GNU 라이센스를 사용할 이유가 없습니다. 정말,저작권 고지수정 및 연락처 정보에 일부 제한이 있지만 허용됩니다.

 Permission to modify the software is granted, but not the right to
 distribute the complete modified source code.  Modifications are to be
 distributed as patches to the released version.  Permission to distribute
 binaries produced by compiling modified sources is granted, provided you
   1. distribute the corresponding source modifications from the released
      version in the form of a patch file along with the binaries,
   2. add special version identification to distinguish your version in
      addition to the base release version number,
   3. provide your name and address as the primary contact for the support
      of your modified version, and
   4. retain our contact information in regard to use of the base software.
 Permission to distribute the released version of the source code along
 with corresponding source modifications in the form of a patch file is
 granted with same provisions 2 through 4 for binary distributions.

GPL은 사후 동적 링크 해석을 포함하여 자체 제한을 넘어서는 모든 제한을 금지하므로 readline(현재 GPLv3)을 사용하여 gnuplot용 실행 파일을 배포하는 것은 허용되지 않습니다.

이 문제는 데비안과 그 파생 제품(예: 우분투)에만 국한된 것은 아니지만, 데비안은 라이센스에 있어서 다른 조직보다 더 조심스럽습니다. README.Debiangnuplot 주석 파일

Yes, the built in readline of gnuplot is bad. However, libreadline
cannot be used instead because it is licensed under the GPL, whereas
gnuplot has special licenses (patches only). Distribution of those
programs linked together is legally impossible but you may rebuild
your own custom package with readline. Please don't file bugs telling   
me to use libreadline in gnuplot...

데비안은 gnuplot을 libedit와 연결합니다.제임스 비글러의 페이지~처럼

libedit는 GNU readline 명령줄 편집 기능을 대체하거나 대체합니다. libedit는 BSD 스타일 라이센스로 출시되므로 독점 코드에서 사용할 수 있습니다.

질문에서 묻는 것과 같은 간단한 작업에는 libedit로 충분합니다. 하지만 읽은 내용은다른readline 대신( ~/.editrc대신 .inputrc) 구성 파일을 사용하세요. 관련 매뉴얼 페이지가 도움이 될 것입니다.libedit-dev 패키지설치하다):

OP가 직면하고 있는 즉각적인 문제는 홈/엔드 키를 인식할 수 없다는 것입니다. libedit는 터미널 데이터베이스에서 관련 정보를 얻으려고 시도하지만(readline과 마찬가지로) xterm 유사점 중 일부가 xterm의 기능 키와 일치하지 않으며 어떤 경우에도 readline은 응용 프로그램 키보드를 사용하는 터미널 설명의 절반 정도를 이해하지 못합니다. 설정(시간의 절반이 틀렸습니다).

라이브러리를 개선하는 대신 사람들은 설정을 .inputrc파일에 붙여넣어 문제를 해결했습니다. libedit를 사용하면 파일 작업을 다시 시작할 수 있습니다 .editrc.

추가 자료:

답변4

이것은 나를 위해 일했지만 설치 후에야읽기 라인 개발:

./configure --with-readline=gnu
make
make install

당신은 확인할 수 있습니다LDD올바른 readline 라이브러리와 연결하십시오.

관련 정보