new*_*ike 6 linux zsh docker boot2docker
我用过这个FROM rails:onbuild图片
您可以在此处查看错误/不可读的编码

当我在测试后键入退格键时,它不起作用,它在shell上添加了空格

这是环境变量,
任何关于bug的想法?
RUBY_MAJOR=2.2
RUBY_VERSION=2.2.2
RUBY_DOWNLOAD_SHA256=5ffc0f317e429e6b29d4a98ac521c3ce65481bfd22a8cf845fa02a7b113d9b44
GEM_HOME=/usr/local/bundle
BUNDLE_APP_CONFIG=/usr/local/bundle
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=en_US.UTF-8
HOME=/root
LOGNAME=root
SHLVL=1
PWD=/associate-app
OLDPWD=/associate-app
ZSH=/root/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
_=/usr/bin/env
Run Code Online (Sandbox Code Playgroud)
FROM rails:onbuild
RUN apt-get update && apt-get -y upgrade
RUN apt-get -y -qq --force-yes install \
build-essential \
tree \
locales \
ruby-dev \
vim \
vim-scripts \
git \
git-flow\
curl \
zsh \
sudo
# Install Zsh
RUN git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh \
&& cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \
&& chsh -s /bin/zsh
RUN sed -i -E "s/^plugins=\((.*)\)$/plugins=(\1 git git-flow ruby tmux)/" ~/.zshrc
# Make ssh dir
RUN mkdir /root/.ssh/
# Copy over private key, and set permissions
ADD id_rsa /root/.ssh/id_rsa
# Create known_hosts
RUN touch /root/.ssh/known_hosts
# Add bitbuckets key
RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts
RUN echo "alias ls='ls --color=auto'" >> /etc/zsh/zshrc && \
echo "alias ll='ls -halF'" >> /etc/zsh/zshrc && \
echo "alias ls='ls --color=auto'" >> /etc/profile && \
echo "alias ll='ls -halF'" >> /etc/zsh/zshrc
# copy GEMFILE
WORKDIR /tmp
COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
RUN bundle install
RUN mkdir /associate-app
WORKDIR /associate-app
ADD . /associate-app
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
CMD echo 'LC_ALL=en_US.UTF-8' >> ~/.zshrc && \
echo 'LANG=C.UTF-8' >> ~/.zshrc && \
echo 'LC_CTYPE=en_US.UTF-8' >> ~/.zshrc && \
CMD ["zsh"]
Run Code Online (Sandbox Code Playgroud)
speed 38400 baud; rows 40; columns 164; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
Run Code Online (Sandbox Code Playgroud)
您的本地设置不一致
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=en_US.UTF-8
Run Code Online (Sandbox Code Playgroud)
也就是说,LANGUAGE不使用UTF-8,而其他设置都是这样做的。
这可能是问题的一部分。
此外,某些终端实现了iutf8的设置stty。这告诉终端驱动程序如何调整多字节 (UTF-8) 字符的光标位置。您可以检查是否stty -a显示-iutf8(功能已禁用),如果没有则启用它,例如,
stty -a
stty iutf8
Run Code Online (Sandbox Code Playgroud)
当该功能可用时,终端驱动程序知道它应该考虑文本是否使用 UTF-8(并且每列可能有多个字节)。如果没有,它将把每个字节计为一列,并且在擦除“最后一个”字符时,可能会执行以下操作:
backspace space space
Run Code Online (Sandbox Code Playgroud)
产生如上图所示的效果。
最后,如果能知道实际使用的终端就好了。例如,rxvt不支持UTF-8;xterm 可以配置有/没有 UTF-8。的值TERM在很大程度上是无关紧要的,因为您的 shell 可能会忽略它而支持内置行为。
| 归档时间: |
|
| 查看次数: |
1239 次 |
| 最近记录: |