source .bashrc出错~~~~~
Tofloor
poster avatar
af******fs@qq.com
deepin
2015-01-23 06:09
Author
.bashrc 文件没动过 就在最后添加一个变量 保存推出后  source .bashrc 提示
.bashrc:16: command not found: shopt
.bashrc:24: command not found: shopt
.bashrc:109: command not found: shopt
请问是什么情况~~~~~~~
Reply Favorite View the author
All Replies
Bluek404
deepin
2015-01-23 06:11
#1
贴出文件内容
Reply View the author
af******fs@qq.com
deepin
2015-01-23 06:12
#2
贴出文件内容
全部的吗
Reply View the author
Bluek404
deepin
2015-01-23 06:14
#3
[quote]贴出文件内容
全部的吗[/quote]
只贴错误的行也行
不过你这个bashrc是安装时自带的?
这个错误是说这个命令不存在
Reply View the author
af******fs@qq.com
deepin
2015-01-23 06:15
#4
对  就贴错误的几行吧
Reply View the author
af******fs@qq.com
deepin
2015-01-23 06:17
#5
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
        shopt -s histappend
   
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
        shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
Reply View the author
af******fs@qq.com
deepin
2015-01-23 06:19
#6
shopt -s histappend

shopt -s checkwinsize

这是错误的行难道前面要加#??
Reply View the author
af******fs@qq.com
deepin
2015-01-23 06:21
#7
可以了  source 成功   前面加#
Reply View the author
Bluek404
deepin
2015-01-23 06:22
#8
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
        shopt -s histappend
   
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
        shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
别在zsh中执行
输入bash切换到bash
Reply View the author
Bluek404
deepin
2015-01-23 06:24
#9
可以了  source 成功   前面加#
那是你注释掉了,这条行就不起作用了
shopt是bash内置的命令,而deepin默认的shell是zsh,所以当然找不到命令
Reply View the author
af******fs@qq.com
deepin
2015-01-23 06:27
#10
那我如何配置PATH
Reply View the author
Bluek404
deepin
2015-01-23 06:28
#11
那我如何配置PATH
可用.zshrc替代
https://wiki.archlinux.org/index ... .BB.B6_.7E.2F.zshrc
Reply View the author
af******fs@qq.com
deepin
2015-01-23 06:29
#12
谢谢了  那我配置安装zsh
Reply View the author
176******07
deepin
2015-01-23 22:59
#13
ls正解。
Reply View the author