inputrc 文件是 Readline 库的配置文件,该库在用户从终端输入命令行时提供编辑功能。它的工作原理是将键盘输入翻译为特定动作。 多数人不需要 Readline 的用户配置功能,因此以下命令创建全局的 /etc/inputrc 文件,供所有登录用户使用。 如果您之后决定对于某个用户覆盖掉默认值,您可以在该用户的主目录下创建 .inputrc 文件,包含需要修改的映射。 下面是一个通用的全局 inputrc 文件,包含解释一些选项含义的注释。注意注释不能和命令写在同一行。 执行以下命令创建该文件: cat > /etc/inputrc << "EOF" # Begin /etc/inputrc # Modified by Chris Lynn # Allow the
inputrc文件时Readline库的启动文件,当使用Readline作为输入库的程序启动时,它会自动读取inputrc配置文件,初始化自定义的键盘映射。 inputrc文件的位置由shell的环境变量INPUTRC控制,如果该变量没有设置,缺省的 inputrc 文件的路径是~/.inputrc。 如果该文件~/.inputrc 不存在,就会使用系统级(对所有用户生效)的inputrc文件/etc/inputrc。 如果某个用户需要修改系统默认的 inputrc 配置,可以改动~/.inputrc,这样会覆盖系统的默认配置。 inputrc 配置 在inputrc文件中,有两种配置:一种是inputrc变量,一种是键盘映射。 注意,在配置该文件时,注释必须占单独的一行,否则可能会有问题。
inputrc 文件的作用是告知系统应该以怎样的键盘布局处理键盘。 对于大部分用户来说,都不使用那些奇奇怪怪的键盘映射,所以,可以通过以下的命令建立一个全局的 /etc/inputrc 以供所有用户使用。 如果需要更改某一个用户的键盘映射,仅需要在那个用户的 HOME 目录下建立一个 .inputrc 文件,然后修改对应的键盘映射就可以了。 下面显示的就是通用的 inputrc 文件,其中包含有 “#” 的都是注释行(需要注意的是,此文件不支持在设置后跟随注释)。 使用以下命令创建此文件: cat > /etc/inputrc << "EOF" # Begin /etc/inputrc # Modified by Chris Lynn # Allow the
bash随后调用terminfo和inputrc,完成终端属性和键盘映射的设定. mail/$USER" #通过/bin/hostname获取主机名 #定义history的记录数为1000 HOSTNAME=`/bin/hostname` HISTSIZE=1000 #如果没有定义INPUTRC 并且不存在HOME/.inputrc文件 #定义变量INPUTRC的值为/etc/inputrc if [ -z " INPUTRC=/etc/inputrc fi export REMOTE_JAVA_DEBUG =on export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC #执行/etc/profile.d/下的所有脚本,-r是确认它们可读 for i inputrc 文件为特定的情况处理键盘映射,这个文件被 Readline 用作启动文件,Readline 是 Bash 和其它大多数 shell 使用的与输入相关的库 第七部分: 第46行open(
2.vim /etc/inputrc 找到set bell-style none将前面的#去掉,之后重启系统即可解决声音问题。 vim /etc/inputrc ?
在自己的用户主目录(home directory)新建一个 .inputrc 文件: $ vi ~/.inputrc "\e[A": history-search-backward "\e[B": history-search-forward
注意检查/etc/inputrc,里面的两项要打开,如图 ?
设置macOS Terminal 命令自动完成 ## Step 1 sudo nano ~/.inputrc ## Step 2 - Paste the following commands one completion-ignore-case on set show-all-if-ambiguous on TAB: menu-complete ## Step 3 Hit control+O to save changes to .inputrc
G_BROKEN_FILENAMES="1" declare -x HISTSIZE="1000" declare -x HOME="/root" declare -x HOSTNAME="localhost" declare -x INPUTRC ="/etc/inputrc" declare -x LANG="zh_CN.UTF-8" declare -x LESSOPEN="|/usr/bin/lesspipe.sh %s" declare
汉化 bin目录,打开jmeter.properties 文件 第三十七行修改为:language=zh_CN 去掉前面的#,以后打开就是中文界面了 mac命令自动补全: 打开终端,输入:nano .inputrc
ssh/sshd_config 最后一行添加 PermitRootLogin yes systemctl restart sshd 配置 pageup 和 pagedown 查看历史命令 取消 /etc/inputrc # /etc/inputrc 40 # alternate mappings for "page up" and "page down" to search the history 41 "\e[5
G_BROKEN_FILENAMES="1" declare -x HISTSIZE="1000" declare -x HOME="/root" declare -x hostname="localhost" declare -x INPUTRC ="/etc/inputrc" ...
G_BROKEN_FILENAMES="1" declare -x HISTSIZE="1000" declare -x HOME="/root" declare -x hostname="localhost" declare -x INPUTRC ="/etc/inputrc" declare -x LANG="zh_CN.UTF-8" declare -x LESSOPEN="|/usr/bin/lesspipe.sh %s" declare
另一种方法是将下面的命令加入 ~/.inputrc: $ set bell-style none 使用 ALSA Tip: 大部分 Intel 声卡不会显示在 alsamixer 的默认设备中,请按 F6
Defaults always_set_home Defaults env_reset Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC Defaults always_set_home Defaults env_reset Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC
安装成功后注意:】 1、 第一次运行cygwin会产生home/用户名文件夹,在这个文件夹下(c:\cygwin\home\当前用户)生成三个配置文件,.bashrc,.bash_profile和.inputrc 设置为中文环境,使提示成为中文 export LANG="zh_CN.GBK" # 输出为中文编码 export OUTPUT_CHARSET="GBK" cygwin\home\username\.inputrc
/etc/bashrc /etc/dircolors /etc/fstab /etc/hosts /etc/inputrc /etc/profile /etc/resolv.conf /etc/vimrc
login shell读取配置文件流程 系统设置文件 只有login shell才读取系统设置文件/etc/profile,它是系统的整体的配置文件,该文件会调用 ①/etc/inputrc用来设置bash
/etc/bashrc /etc/dircolors /etc/fstab /etc/hosts /etc/inputrc /etc/profile /etc/resolv.conf /etc/vimrc
4.1 首先读入全局环境变量设定档/etc/profile,然后根据其内容读取额外的设定的文档,如/etc/profile.d和/etc/inputrc; 4.2 根据不同使用者帐号,于其家目录内读取~