<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>rlwrap &#8211; 良的世界</title>
	<atom:link href="https://www.lemonary.cn/tag/rlwrap/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lemonary.cn</link>
	<description></description>
	<lastBuildDate>Mon, 24 Nov 2025 06:19:22 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.lemonary.cn/wp-content/uploads/2024/12/profile-150x150.jpg</url>
	<title>rlwrap &#8211; 良的世界</title>
	<link>https://www.lemonary.cn</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>达梦数据库disql中使用上下左右键</title>
		<link>https://www.lemonary.cn/%e8%be%be%e6%a2%a6%e6%95%b0%e6%8d%ae%e5%ba%93disql%e4%b8%ad%e4%bd%bf%e7%94%a8%e4%b8%8a%e4%b8%8b%e5%b7%a6%e5%8f%b3%e9%94%ae/</link>
					<comments>https://www.lemonary.cn/%e8%be%be%e6%a2%a6%e6%95%b0%e6%8d%ae%e5%ba%93disql%e4%b8%ad%e4%bd%bf%e7%94%a8%e4%b8%8a%e4%b8%8b%e5%b7%a6%e5%8f%b3%e9%94%ae/#respond</comments>
		
		<dc:creator><![CDATA[shine]]></dc:creator>
		<pubDate>Tue, 17 Dec 2024 08:02:41 +0000</pubDate>
				<category><![CDATA[DM]]></category>
		<category><![CDATA[disql]]></category>
		<category><![CDATA[rlwrap]]></category>
		<guid isPermaLink="false">https://www.lemonary.cn/?p=1092</guid>

					<description><![CDATA[一、问题概述 DM数据库的disql中不能进行翻找命令，也不能使用简单的backspace删除，在编辑SQL的 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading" id="一、问题概述">一、问题概述</h2>



<p class="wp-block-paragraph">DM数据库的disql中不能进行翻找命令，也不能使用简单的backspace删除，在编辑SQL的时候特别的不方便，本文讲述的rlwrap工具可以用来解决这个问题。</p>



<p class="wp-block-paragraph">rlwrap是GNU readline的封装程序，可对键盘输入进行编辑。并且维护着每个输入命令的历史记录。</p>



<h2 class="wp-block-heading" id="二、安装过程">二、安装过程</h2>



<h3 class="wp-block-heading" id="2.1-yum安装">2.1 yum安装</h3>



<pre class="wp-block-code"><code>yum install rlwrap readline readline-devel</code></pre>



<h3 class="wp-block-heading" id="2.2-源码安装">2.2 源码安装</h3>



<p class="wp-block-paragraph">下载rlwrap安装包，进行源码编译安装</p>



<p class="wp-block-paragraph"><strong>下载地址</strong>：<a href="https://fossies.org/linux/privat/rlwrap-0.46.1.tar.gz"></a><a href="https://fossies.org/linux/privat/rlwrap-0.45.2.tar.gz">rlwrap-0.45.2.tar.gz</a></p>



<p class="wp-block-paragraph"><strong>最新地址</strong>：<a href="https://fossies.org/linux/privat/legacy/rlwrap-0.47.1.tar.gz/">rlwrap-0.47.1.tar.gz</a></p>



<p class="wp-block-paragraph">将<a href="https://fossies.org/linux/privat/rlwrap-0.46.1.tar.gz"></a><a href="https://fossies.org/linux/privat/rlwrap-0.45.2.tar.gz">rlwrap-0.45.2.tar.gz</a>文件上传到服务器当中进行源码安装即可</p>



<p class="wp-block-paragraph"><strong>源码编译安装过程</strong></p>



<pre class="wp-block-code"><code>&#91;root@dm ~]# tar zxvf rlwrap-0.45.2.tar.gz 
rlwrap-0.45.2/
rlwrap-0.45.2/.gitignore
rlwrap-0.45.2/AUTHORS
rlwrap-0.45.2/BUGS
rlwrap-0.45.2/COPYING
rlwrap-0.45.2/ChangeLog
rlwrap-0.45.2/INSTALL
rlwrap-0.45.2/Makefile.am
rlwrap-0.45.2/NEWS
rlwrap-0.45.2/README.md
rlwrap-0.45.2/completions/
rlwrap-0.45.2/completions/coqtop
rlwrap-0.45.2/completions/testclient
rlwrap-0.45.2/configure.ac
rlwrap-0.45.2/doc/
rlwrap-0.45.2/doc/Makefile.am
rlwrap-0.45.2/doc/rlwrap.man.in
rlwrap-0.45.2/filters/
rlwrap-0.45.2/filters/Makefile.am
rlwrap-0.45.2/filters/README
rlwrap-0.45.2/filters/RlwrapFilter.pm
rlwrap-0.45.2/filters/censor_passwords
rlwrap-0.45.2/filters/censor_passwords.py
rlwrap-0.45.2/filters/count_in_prompt
rlwrap-0.45.2/filters/count_in_prompt.py
rlwrap-0.45.2/filters/debug_null
rlwrap-0.45.2/filters/dissect_prompt
rlwrap-0.45.2/filters/edit_history
rlwrap-0.45.2/filters/ftp_filter
rlwrap-0.45.2/filters/ftp_filter.py
rlwrap-0.45.2/filters/handle_hotkeys
rlwrap-0.45.2/filters/handle_hotkeys.py
rlwrap-0.45.2/filters/handle_sigwinch
rlwrap-0.45.2/filters/history_format
rlwrap-0.45.2/filters/listing
rlwrap-0.45.2/filters/logger
rlwrap-0.45.2/filters/logger.py
rlwrap-0.45.2/filters/makefilter
rlwrap-0.45.2/filters/null
rlwrap-0.45.2/filters/null.py
rlwrap-0.45.2/filters/outfilter
rlwrap-0.45.2/filters/paint_prompt
rlwrap-0.45.2/filters/paint_prompt.py
rlwrap-0.45.2/filters/pipeline
rlwrap-0.45.2/filters/pipeto
rlwrap-0.45.2/filters/pipeto.py
rlwrap-0.45.2/filters/rlwrapfilter.md
rlwrap-0.45.2/filters/rlwrapfilter.py
rlwrap-0.45.2/filters/scrub_prompt
rlwrap-0.45.2/filters/simple_macro
rlwrap-0.45.2/filters/template
rlwrap-0.45.2/filters/unbackspace
rlwrap-0.45.2/src/
rlwrap-0.45.2/src/Makefile.am
rlwrap-0.45.2/src/completion.c
rlwrap-0.45.2/src/completion.rb
rlwrap-0.45.2/src/filter.c
rlwrap-0.45.2/src/main.c
rlwrap-0.45.2/src/malloc_debug.c
rlwrap-0.45.2/src/malloc_debug.h
rlwrap-0.45.2/src/multibyte.c
rlwrap-0.45.2/src/pty.c
rlwrap-0.45.2/src/ptytty.c
rlwrap-0.45.2/src/readline.c
rlwrap-0.45.2/src/redblack.h
rlwrap-0.45.2/src/rlwrap.h
rlwrap-0.45.2/src/signals.c
rlwrap-0.45.2/src/string_utils.c
rlwrap-0.45.2/src/term.c
rlwrap-0.45.2/src/utils.c
rlwrap-0.45.2/test/
rlwrap-0.45.2/test/testclient
rlwrap-0.45.2/test/testit
&#91;root@dm ~]# cd rlwrap-0.45.2/
&#91;root@dm rlwrap-0.45.2]# ll
总用量 100
-rw-rw-r-- 1 root root   982  6月 15  2021 AUTHORS
-rw-rw-r-- 1 root root  2021  6月 15  2021 BUGS
-rw-rw-r-- 1 root root   105  6月 15  2021 ChangeLog
drwxrwxr-x 2 root root    38  6月 15  2021 completions
-rw-rw-r-- 1 root root 18673  6月 15  2021 configure.ac
-rw-rw-r-- 1 root root 17992  6月 15  2021 COPYING
drwxrwxr-x 2 root root    46  6月 15  2021 doc
drwxrwxr-x 2 root root  4096  6月 15  2021 filters
-rw-rw-r-- 1 root root  4137  6月 15  2021 INSTALL
-rw-rw-r-- 1 root root  2123  6月 15  2021 Makefile.am
-rw-rw-r-- 1 root root 24793  6月 15  2021 NEWS
-rw-rw-r-- 1 root root  3851  6月 15  2021 README.md
drwxrwxr-x 2 root root   308  6月 15  2021 src
drwxrwxr-x 2 root root    38  6月 15  2021 test</code></pre>



<p class="wp-block-paragraph">看到解压后缺少configure文件，则需要执行以下命令</p>



<pre class="wp-block-code"><code>&#91;root@dm rlwrap-0.45.2]# yum -y install automake
上次元数据过期检查：0:26:20 前，执行于 2022年08月27日 星期六 10时20分54秒。
软件包 automake-1.16.2-1.ky10.noarch 已安装。
依赖关系解决。
无需任何处理。
完毕！
&#91;root@dm rlwrap-0.45.2]# aclocal
&#91;root@dm rlwrap-0.45.2]# autoconf
&#91;root@dm rlwrap-0.45.2]# autoheader
&#91;root@dm rlwrap-0.45.2]# autoreconf -ivf
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: creating directory tools
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:92: installing 'tools/compile'
configure.ac:32: installing 'tools/config.guess'
configure.ac:32: installing 'tools/config.sub'
configure.ac:34: installing 'tools/install-sh'
configure.ac:34: installing 'tools/missing'
parallel-tests: installing 'tools/test-driver'
src/Makefile.am: installing 'tools/depcomp'
autoreconf: Leaving directory `.'
&#91;root@dm rlwrap-0.45.2]# automake  --add-missing
&#91;root@dm rlwrap-0.45.2]# ll
总用量 460
-rw-r--r-- 1 root root  42023  8月 27 10:47 aclocal.m4
-rw-rw-r-- 1 root root    982  6月 15  2021 AUTHORS
drwxr-xr-x 2 root root     86  8月 27 10:47 autom4te.cache
-rw-rw-r-- 1 root root   2021  6月 15  2021 BUGS
-rw-rw-r-- 1 root root    105  6月 15  2021 ChangeLog
drwxrwxr-x 2 root root     38  6月 15  2021 completions
-rw-r--r-- 1 root root   9074  8月 27 10:47 config.h.in
-rw-r--r-- 1 root root   9074  8月 27 10:47 config.h.in~
-rwxr-xr-x 1 root root 250227  8月 27 10:47 configure
-rw-rw-r-- 1 root root  18673  6月 15  2021 configure.ac
-rw-rw-r-- 1 root root  17992  6月 15  2021 COPYING
drwxrwxr-x 2 root root     65  8月 27 10:47 doc
drwxrwxr-x 2 root root   4096  8月 27 10:47 filters
-rw-rw-r-- 1 root root   4137  6月 15  2021 INSTALL
-rw-rw-r-- 1 root root   2123  6月 15  2021 Makefile.am
-rw-r--r-- 1 root root  42420  8月 27 10:47 Makefile.in
-rw-rw-r-- 1 root root  24793  6月 15  2021 NEWS
-rw-rw-r-- 1 root root   3851  6月 15  2021 README.md
drwxrwxr-x 2 root root    327  8月 27 10:47 src
drwxrwxr-x 2 root root     38  6月 15  2021 test
drwxr-xr-x 2 root root    126  8月 27 10:47 tools</code></pre>



<p class="wp-block-paragraph">看到已经有configure文件，即可执行三步走进行安装</p>



<pre class="wp-block-code"><code>&#91;root@dm rlwrap-0.45.2]# ./configure
&#91;root@dm rlwrap-0.45.2]# make
&#91;root@dm rlwrap-0.45.2]# make install</code></pre>



<p class="wp-block-paragraph">完成安装。</p>



<p class="wp-block-paragraph">其中，如果./configure 出现如下报错</p>



<pre class="wp-block-code"><code>configure: WARNING: No termcap nor curses library found
checking for readline in -lreadline... no
configure: error: 
You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!</code></pre>



<p class="wp-block-paragraph">因为缺省了rpm包，则需要执行</p>



<pre class="wp-block-code"><code>yum -y install readline*</code></pre>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">注意：此步骤可在安装前执行，先检查是否安装 readline，<code>rpm -qa | grep readline</code>若未安装便可执行。</p>
</blockquote>



<h2 class="wp-block-heading" id="三、配置环境变量">三、配置环境变量</h2>



<p class="wp-block-paragraph">切换到dmdba用户，修改环境变量，增加下面两行</p>



<pre class="wp-block-code"><code>alias disql="rlwrap disql"
alias dmrman="rlwrap dmrman"</code></pre>



<p class="wp-block-paragraph">保存，退出，使环境变量生效</p>



<pre class="wp-block-code"><code>&#91;dmdba@dm ~]$ source .bash_profile
# 或者
&#91;dmdba@dm ~]$ . .bash_profile</code></pre>



<p class="wp-block-paragraph">配置完成，再次打开disql便可以使用上下左右及backspace键。</p>



<h2 class="wp-block-heading" id="官方文档地址">官方文档地址</h2>



<p class="wp-block-paragraph"><a href="https://eco.dameng.com/document/dm/zh-cn/faq/faq-db-check#disql%20%E4%B8%AD%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E4%B8%8A%E4%B8%8B%E5%B7%A6%E5%8F%B3%E9%94%AE">https://eco.dameng.com/document/dm/zh-cn/faq/faq-db-check#disql%20%E4%B8%AD%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E4%B8%8A%E4%B8%8B%E5%B7%A6%E5%8F%B3%E9%94%AE</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.lemonary.cn/%e8%be%be%e6%a2%a6%e6%95%b0%e6%8d%ae%e5%ba%93disql%e4%b8%ad%e4%bd%bf%e7%94%a8%e4%b8%8a%e4%b8%8b%e5%b7%a6%e5%8f%b3%e9%94%ae/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
