tcsh: незначительный сбой символа i-search-back

Это - пример для Debian (и находящиеся в Debian системы как Ubuntu) - поскольку Вы не дали ОС Linux, для которой Вы хотите это.

Если Вы находитесь в такой системе, можно использовать:

sudo apt-get install {package name}

Пример, если Вы хотите установить gcc, Вы сделаете это:

sudo apt-get install gcc

И если Вы хотите обновить ОС, можно хотеть сделать это:

sudo apt-get update
sudo apt-get upgrade

Проверьте эту ссылку (для Ubuntu).

2
02.10.2014, 21:08
1 ответ

Чтение страницы руководства, это не сработает:

   i-search-back (not bound)
           Searches  backward  like  history-search-backward,  copies  the
           first match into the input buffer with the cursor positioned at
           the end of the pattern, and prompts with `bck: ' and the  first
           match.   Additional  characters  may  be  typed  to  extend the
           search, i-search-back may be typed to continue  searching  with
           the  same  pattern,  wrapping around the history list if neces‐
           sary, (i-search-back must be bound to a  single  character  for
           this to work) or one of the following special characters may be
           typed:

               ^W      Appends the rest of the word under  the  cursor  to
                       the search pattern.
               delete (or any character bound to backward-delete-char)
                       Undoes  the  effect of the last character typed and
                       deletes a character  from  the  search  pattern  if
                       appropriate.
               ^G      If  the  previous search was successful, aborts the
                       entire search.  If not, goes back to the last  suc‐
                       cessful search.
               escape  Ends  the  search,  leaving the current line in the
                       input buffer.

           Any other character not bound to self-insert-command terminates
           the  search,  leaving the current line in the input buffer, and
           is then interpreted as normal input.  In particular, a carriage
           return  causes  the  current  line  to be executed.  Emacs mode
           only.  See also i-search-fwd and history-search-backward.

Страница руководства сообщает вам, что единственными специальными символами, которые tcsh готов обработать, являются четыре перечисленных, и что все остальное интерпретируется как

  • Дополнительные символы могут вводится для расширения поиска, и
  • "Любой другой символ, не связанный с командой self-insert-command, завершает поиск, оставляя текущую строку во входном буфере, и затем интерпретируется как обычный ввод.

Поскольку escape-символ (который является частью стрелки влево / вправо) не печатается, tcsh отбрасывает его, оставляя печатаемые символы как часть «обычного ввода».

{{ 1}}
1
27.01.2020, 22:13

Теги

Похожие вопросы