Use in Cygwin

xiaoxiao2021-03-06  41

The use of Chinese Cygwin tools in the Cygwin B20 environment is a ported version of the GNU tool on the Win32 platform, which follows the POSIX standard as much as possible. These include C / C compilers GCC, TextUtils, FileUtils, Bash, and so on. This article will explain how to use Chinese in Cygwin (B20). Cygwin launches Bash through Cygnus.bat (in x: / cygnus / cygwin-b20), as follows: @echo off

Set make_mode = UNIX

SET PATH = C: / Cygnus / Cygwin ~ 1 / H-I586 ~ 1 / bin;% PATH%

Bash

In one of the sentences: set home = x: / homename

X: For the drive letter, / Homename is the existing directory name, such as C: / MyHome. Bash will look for initialization files in the X: / Homename directory. By default, the Bash command line cannot enter Chinese characters, must establish files in the x: / homename directory .INPUTRC, the content is as follows: Set meta-flag on

SET Convert-Meta Off

Set output-meta on these lines mainly implement the input and display of Chinese characters on the command line. For example, I want to enter the name of the Chinese character.

Note: In Cygwin-B20. INPUTRC must be a UN * X file format. Bash cannot accept Chinese characters input from the DOS window in Windows 9x. In order to let the Less command to display Chinese characters in x: /homename/.bashrc: export lesscharset = latin1

In order to display the Chinese character file and directory name in x: /homename/.bashrc: Alias ​​Ls = 'ls -n --color'

Screenshot of Cygwin Bash shell of: Blade Sun2002-5-1version 0.1gnuwin32@sohu.com

转载请注明原文地址:https://www.9cbs.com/read-60335.html

New Post(0)