我?在我的zsh主题中使用字符来提示。但是在 tmux 中,我的提示表现得很奇怪,显示了额外的空格,如下所示:
? ~ I can type from here
? ~ Instead of here like in zsh, and sometimes when I do stuff like cd
? ~ cd ~
? ~ cdcd /
? ~ ^^These 2 chars just show up but are not actually part of command and not delete-able
Run Code Online (Sandbox Code Playgroud)
我最近发现我可以通过 .tmux 将 tmux 编码设置为 utf8 set-window-option -g utf8 on。这样做,空间问题消失了,但?字符变为_. 我怎样才能?回来tmux?
我的 zsh 主题:
PROMPT='%{$fg_bold[cyan]%} …Run Code Online (Sandbox Code Playgroud) 我是双启动 Ubuntu 和 Win 8。
安装Ubuntu的时候忘记格式化90GB的分区了。
现在,当我尝试创建分区(在 gparted 中)时,出现此错误
不能创建超过 4 个主分区
如果你想要更多的分区,你应该首先创建一个扩展分区。这样的分区可以包含其他分区。由于扩展分区也是主分区,因此可能需要先删除主分区。
这是一个屏幕截图:

sda1是 windows 喜欢创建的小空间,原因我不清楚
sda2和sda4是 windows 8 驱动器 C: 和 E:
sda3是我的 linux 驱动器
最后一个未分配的 10.2MB?我不知道这是从哪里来的。
但是为什么 Ubuntu 将 Window 的驱动器视为主要驱动器?
但更重要的是,我怎样才能恢复那 90GB,Win8 磁盘管理也给出了一些错误:(
我开始Update information is outdated警觉了。我试过sudo apt-get update并得到这些错误:
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/Release.gpg Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://repository.spotify.com/dists/stable/Release.gpg Something wicked happened resolving 'repository.spotify.com:http' (-11 - System error)
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/i18n/Translation-en_IN Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/i18n/Translation-en Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect …Run Code Online (Sandbox Code Playgroud) 如何停止我的本地 apache 服务器?
/etc/init.d/apache2并且service apache2只给出 3 个选项 -- restart,start和status
我重新启动了我的系统,现在sudo /etc/inid.d/apache stop可以工作,但没有提供stop选项TAB
httpd丢失了所以我做了sudo ln -s /usr/sbin/apachectl /etc/init.d/httpd- 在某个论坛上阅读
httpd 服务现在提供start和status选项(再次,没有stop)
做sudo /etc/init.d/httpd status说
Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://localhost/server-status
'www-browser -dump http://localhost:80/server-status' failed.
Maybe you need to install a package providing www-browser or …Run Code Online (Sandbox Code Playgroud) 如何重命名我的计算机?重命名它/etc/hosts并/etc/hostname做一些奇怪的事情。在重命名之前,我可以使用 sublime 打开这些文件
sudo subl /etc/hosts
Run Code Online (Sandbox Code Playgroud)
但是当我重命名我的计算机(使用 nano)并使用打开任何这些文件时subl,我收到以下消息:
No protocol specified
(sublime_text:20071): Gtk-WARNING **: cannot open display: :0.0
Run Code Online (Sandbox Code Playgroud)
所以我想在上述文件中重命名并不是我唯一要做的事情。
PS:如果我使用 sublime 重命名,在重命名其中一个文件后,当我尝试打开其他文件时会收到相同的消息
我只是alias rm="rm -I"为了防止意外rm命令而创建的。
-I prompt once before removing more than three files, or when removing recursively.
Less intrusive than -i, while still giving protection against most mistakes
Run Code Online (Sandbox Code Playgroud)
但它不起作用。我在使用时没有得到任何提示rm -rf
我使用 zsh 主题intheloops。当没有虚拟环境时,主题看起来像这样。活跃
-- an empty line --
[sourabh@skynet] ~/Code/django_apps/cope (master) ?
?
Run Code Online (Sandbox Code Playgroud)
当一个环境。活跃,
(env name)
[sourabh@skynet] ~/Code/django_apps/cope (master) ?
?
Run Code Online (Sandbox Code Playgroud)
当某些 virtualenv 处于活动状态时,我可以使它看起来像这样吗
-- empty line --
(env name) [sourabh@skynet] ~/Code/django_apps/cope (master) ?
?
Run Code Online (Sandbox Code Playgroud)
.zsh-theme 文件
local return_status="%{$fg[red]%}%(?..?)%{$reset_color%}"
local host_color="green"
if [ -n "$SSH_CLIENT" ]; then
local host_color="red"
fi
PROMPT='
%{$fg_bold[grey]%}[%{$reset_color%}%{$fg_bold[${host_color}]%}%n@%m%{$reset_color%}%{$fg_bold[grey]%}]%{$reset_color%} %{$fg_bold[blue]%}%10c%{$reset_color%} $(git_prompt_info) $(git_remote_status)
%{$fg_bold[cyan]%}?%{$reset_color%} '
RPROMPT='${return_status}%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}(%{$fg[yellow]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}) %{$fg[pink]%}?%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[grey]%})"
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="%{$fg_bold[magenta]%}?%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE="%{$fg_bold[magenta]%}?%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="%{$fg_bold[magenta]%}?%{$reset_color%}"
Run Code Online (Sandbox Code Playgroud) 我的蓝牙在 Ubuntu 13.04 中不起作用。我无法打开它,而且蓝牙图标没有显示在顶部栏中。
我在#ubuntu IRC 上询问了这个问题,他们说我缺少它的专有驱动程序。没有什么在其他驱动程序在软件和更新
当我从 DVD/USB 启动 Ubuntu 时,蓝牙确实可以“尝试 Ubuntu 模式”。
如何获得所需的驱动程序?