免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3939 | 回复: 7
打印 上一主题 下一主题

set -o vi什么意思 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-14 09:47 |只看该作者 |倒序浏览
大家好,set -o vi是什么意思啊?set是设置本地变量的,加上一个-o是什么意思?谢谢!

请大家详细解释一下-o这个选项,先谢过!

论坛徽章:
23
15-16赛季CBA联赛之吉林
日期:2017-12-21 16:39:27白羊座
日期:2014-10-27 11:14:37申猴
日期:2014-10-23 08:36:23金牛座
日期:2014-09-30 08:26:49午马
日期:2014-09-29 09:40:16射手座
日期:2014-11-25 08:56:112015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:49:0315-16赛季CBA联赛之山东
日期:2017-12-21 16:39:1915-16赛季CBA联赛之广东
日期:2016-01-19 13:33:372015亚冠之山东鲁能
日期:2015-10-13 09:39:062015亚冠之西悉尼流浪者
日期:2015-09-21 08:27:57
2 [报告]
发表于 2008-10-14 09:48 |只看该作者
man set

论坛徽章:
0
3 [报告]
发表于 2008-10-14 09:49 |只看该作者
就是使用vi风格的命令行编辑器。

论坛徽章:
0
4 [报告]
发表于 2008-10-14 11:25 |只看该作者
man set不能用啊。
这语句作用是使用vi风格的命令行编辑器没错,这应该是通过设置一个本地变量,达到更改编辑器的作用,但是这个-o不懂得什么意思啊,它到底是一个本地变量,还是set的一个选项呢?

论坛徽章:
23
15-16赛季CBA联赛之吉林
日期:2017-12-21 16:39:27白羊座
日期:2014-10-27 11:14:37申猴
日期:2014-10-23 08:36:23金牛座
日期:2014-09-30 08:26:49午马
日期:2014-09-29 09:40:16射手座
日期:2014-11-25 08:56:112015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:49:0315-16赛季CBA联赛之山东
日期:2017-12-21 16:39:1915-16赛季CBA联赛之广东
日期:2016-01-19 13:33:372015亚冠之山东鲁能
日期:2015-10-13 09:39:062015亚冠之西悉尼流浪者
日期:2015-09-21 08:27:57
5 [报告]
发表于 2008-10-14 11:28 |只看该作者
原帖由 huangbt_unix 于 2008-10-14 11:25 发表
man set不能用啊。
这语句作用是使用vi风格的命令行编辑器没错,这应该是通过设置一个本地变量,达到更改编辑器的作用,但是这个-o不懂得什么意思啊,它到底是一个本地变量,还是set的一个选项呢?


man set

        -o option-name
                      The option-name can be one of the following:
                      allexport
                              Same as -a.
                      braceexpand
                              Same as -B.
                      emacs   Use  an  emacs-style command line editing inter-
                              face.  This is enabled by default when the shell
                              is interactive, unless the shell is started with
                              the --noediting option.
                      errexit Same as -e.
                      hashall Same as -h.
                      histexpand
                              Same as -H.
                      history Enable command history, as described above under
                              HISTORY.  This option is on by default in inter-
                              active shells.
                      ignoreeof
                              The  effect  is  as   if   the   shell   command
                              ``IGNOREEOF=10''  had  been  executed (see Shell
                              Variables above).
                      keyword Same as -k.
                      monitor Same as -m.
                      noclobber
                              Same as -C.
                      noexec  Same as -n.
                      noglob  Same as -f.  nolog Currently ignored.
                      notify  Same as -b.
                      nounset Same as -u.
                      onecmd  Same as -t.
                      physical
                              Same as -P.
                      posix   Change the behavior of bash  where  the  default
                              operation differs from the POSIX 1003.2 standard
                              to match the standard (posix mode).
                      privileged
                              Same as -p.
                      verbose Same as -v.
                      vi      Use a vi-style command line editing interface.
                      xtrace  Same as -x.
                      If -o is supplied with no option-name, the values of the
                      current  options are printed.  If +o is supplied with no
                      option-name, a series of set commands  to  recreate  the
                      current  option  settings  is  displayed on the standard
                      output.

论坛徽章:
0
6 [报告]
发表于 2008-10-14 11:30 |只看该作者
选项

论坛徽章:
0
7 [报告]
发表于 2008-10-14 17:17 |只看该作者
就是接选项名。

论坛徽章:
3
戌狗
日期:2014-09-10 17:07:162015年辞旧岁徽章
日期:2015-03-03 16:54:15wusuopu
日期:2016-06-17 17:43:45
8 [报告]
发表于 2008-10-14 18:56 |只看该作者
原帖由 huangbt_unix 于 2008-10-14 11:25 发表
man set不能用啊。
这语句作用是使用vi风格的命令行编辑器没错,这应该是通过设置一个本地变量,达到更改编辑器的作用,但是这个-o不懂得什么意思啊,它到底是一个本地变量,还是set的一个选项呢?

man bash
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP