2017-11-12 3 views
0

ri의 ruby ​​Array 문서를 파일로 리디렉션했지만 gedit에서 좋지 않습니다. 그러나 텍스트는 cli에서 잘 보입니다. 터미널 편집기에서 내 파일을 찾는 방법입니다. 여기에는 모든 것이 좋습니다. 텍스트 파일의 Linux cat 및 less 출력이 gedit 및 다른 GNOME 편집기와 다릅니다.

= Array#to_param 
 

 
(from gem activesupport-5.1.3) 
 
------------------------------------------------------------------------------ 
 
    to_param() 
 

 
------------------------------------------------------------------------------ 
 

 
Calls to_param on all its elements and joins the result with slashes. This is 
 
used by url_for in Action Pack. 
 

 

 
= Array#to_query 
 

 
(from gem activesupport-5.1.3) 
 
------------------------------------------------------------------------------ 
 
    to_query(key) 
 

 
------------------------------------------------------------------------------ 
 

 
Converts an array into a string suitable for use as a URL query string, using 
 
the given key as the param name. 
 

 
    ['Rails', 'coding'].to_query('hobbies') # => "hobbies%5B%5D=Rails&hobbies%5B%5D=coding" 
 

 

 
= Array#to_s 
 

 
(from ruby core) 
 
------------------------------------------------------------------------------ 
 
    to_s() 
 

 
------------------------------------------------------------------------------ 
 

 

 
(from gem activesupport-5.1.3) 
 
------------------------------------------------------------------------------ 
 
    to_s(format = :default) 
 

 
------------------------------------------------------------------------------ 
 

 

 
= Array#to_sentence 
 

 
(from gem activesupport-5.1.3) 
 
------------------------------------------------------------------------------ 
 
    to_sentence(options = {}) 
 

 
------------------------------------------------------------------------------
하지만 gedit에서 또는 다른 그놈 편집기에서 열 때, 그게처럼 보이는 방법입니다. 어떤 특정 단어는 터무니없는 형식으로 보입니다. 어떤 제안이나 도움을 주시면 감사하겠습니다.

= AArrrraayy##ttoo__ffoorrmmaatttteedd__ss 
 

 
(from gem activesupport-5.1.3) 
 
------------------------------------------------------------------------------ 
 
    to_formatted_s(format = :default) 
 

 
------------------------------------------------------------------------------ 
 

 
Extends Array#to_s to convert a collection of elements into a comma separated 
 
id list if :db argument is given as the format. 
 

 
    Blog.all.to_formatted_s(:db) # => "1,2,3" 
 
    Blog.none.to_formatted_s(:db) # => "null" 
 
    [1,2].to_formatted_s   # => "[1, 2]" 
 

 

 
= AArrrraayy##ttoo__ppaarraamm 
 

 
(from gem activesupport-5.1.3) 
 
------------------------------------------------------------------------------ 
 
    to_param() 
 

 
------------------------------------------------------------------------------ 
 

 
Calls to_param on all its elements and joins the result with slashes. This is 
 
used by url_for in Action Pack. 
 

 

 
= AArrrraayy##ttoo__qquueerryy 
 

 
(from gem activesupport-5.1.3) 
 
------------------------------------------------------------------------------ 
 
    to_query(key) 
 

 
------------------------------------------------------------------------------ 
 

 
Converts an array into a string suitable for use as a URL query string, using 
 
the given key as the param name. 
 

 
    ['Rails', 'coding'].to_query('hobbies') # => "hobbies%5B%5D=Rails&hobbies%5B%5D=coding" 
 

 

 
= AArrrraayy##ttoo__ss 
 

 
(from ruby core) 
 
------------------------------------------------------------------------------ 
 
    to_s() 
 

 
------------------------------------------------------------------------------ 
 

 

 
(from gem activesupport-5.1.3) 
 
------------------------------------------------------------------------------ 
 
    to_s(format = :default) 
 

 
------------------------------------------------------------------------------ 
 

 

 
= AArrrraayy##ttoo__sseenntteennccee 
 

 
(from gem activesupport-5.1.3) 
 
------------------------------------------------------------------------------ 
 
    to_sentence(options = {}) 
 

 
------------------------------------------------------------------------------
나는 모든 시스템에 파일을 열기 시도했다. 그러나 고양이 같은 단말 편집기를 제외하고는 텍스트가 여전히 엉망입니다.
텍스트 인코딩과 관련이 있습니까?

답변

0

riASCII text, with overstriking 형식의 문서를 출력합니다. 파일에서 file 명령을 실행하여이를 확인할 수 있습니다.

설명서의 일부 부분은 굵게 표시되어 있으며 일부 문자, 백 스페이스 (^H) 및 첫 번째 문자로 다시 나타납니다. gedit 및 다른 그놈 편집자가 이러한 백 스페이스 문자를 무시하고 실제 문자가 반복되는 것으로 보입니다.

당신이 할 수있는이 같은 출력 바로 ASCII : ri Array | col -bx > array.txt

자세한 내용에 대한 nroff 서식 답변 : 귀하의 답변에 대한 https://unix.stackexchange.com/a/274795

+0

감사합니다. 그것은 일했다 !!! ri의 man 페이지를 살펴보기 시작했고 -f 옵션을 사용하여 출력 형식을 변경할 수 있음을 발견했습니다. 그래서, ri -f rdoc Array> array.txt도 작동합니다. – Meimo

관련 문제