zsh

Unaliasing a global alias in zsh

天大地大妈咪最大 提交于 2020-01-23 07:51:34
问题 I had defined a global alias in my zsh shell using "alias -g" . When I am trying to unalias it, the shell throws the following error : "unalias: no such hash table element". Any pointers on how to unalias a globally defined alias? 回答1: You need to escape it while attempting to unalias . Try saying: unalias \aliasname instead of unalias aliasname Since it's a global alias, the shell would substitute it anywhere on the command line unless you escape it. 来源: https://stackoverflow.com/questions

Unaliasing a global alias in zsh

夙愿已清 提交于 2020-01-23 07:51:16
问题 I had defined a global alias in my zsh shell using "alias -g" . When I am trying to unalias it, the shell throws the following error : "unalias: no such hash table element". Any pointers on how to unalias a globally defined alias? 回答1: You need to escape it while attempting to unalias . Try saying: unalias \aliasname instead of unalias aliasname Since it's a global alias, the shell would substitute it anywhere on the command line unless you escape it. 来源: https://stackoverflow.com/questions

Zsh tab completion duplicating command name

南楼画角 提交于 2020-01-22 04:48:13
问题 I'm on OS X Mountain Lion, running the included ZSH shell (4.3.11) with Oh-My-ZSH installed over the top. When using tab completion with commands such as homebrew, when ZSH lists the available commands, it is also duplicating the command. For example: $ brew {tab} will result in: $ brew brew [list of homebrew commands] I'm unsure what is causing this error, as when I resize the terminal window, the first instance of the command name disappears. If I hit backspace when the duplicates are

Zsh tab completion duplicating command name

你离开我真会死。 提交于 2020-01-22 04:48:10
问题 I'm on OS X Mountain Lion, running the included ZSH shell (4.3.11) with Oh-My-ZSH installed over the top. When using tab completion with commands such as homebrew, when ZSH lists the available commands, it is also duplicating the command. For example: $ brew {tab} will result in: $ brew brew [list of homebrew commands] I'm unsure what is causing this error, as when I resize the terminal window, the first instance of the command name disappears. If I hit backspace when the duplicates are

msfvenom基于zsh的自动补全神器oh-my-zsh的安装教程

北战南征 提交于 2020-01-21 04:31:31
msfvenom基于zsh的自动补全神器oh-my-zsh的安装教程 msf的参数和命令很多,各种payload和encoder让人眼花缭乱,让记忆力和英语不好的人非常难受,一位叫 Green_m 的大佬写了一个zsh插件,可以自动补全msdvenom的命令。 安装后的效果: 是不是很棒棒!接下来就是安装教程。 我的环境是kali 201904,因为安装oh-my-zsh的先提条件是得有zsh,但是kali一般都自带了,所以先安装oh-my-zsh。 切换shell为zsh,再重启一下(可能不是必要的,但我是这样做的) chsh -s /bin/zsh reboot 安装oh-my-zsh sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" 接下来下载msfvenom plugin. git clone https://github.com/Green-m/msfvenom-zsh-completion ~/.oh-my-zsh/custom/plugins/msfvenom/ 最后一步,就是配置.zshrc文件,这一步我整了好久才明白··· 安装完oh-myzsh后.zshrc文件默认在root目录下,而且它是隐藏的···

zsh: command not found: flake8 but flake8 is installed

一曲冷凌霜 提交于 2020-01-20 07:04:05
问题 I'm trying to run the flake8 linter on my python code but I am having some issues. running pip install gives me this response: ~ pip install flake8 Requirement already satisfied: flake8 in ./Library/Python/2.7/lib/python/site-packages Requirement already satisfied: enum34; python_version < "3.4" in ./Library/Python/2.7/lib/python/site-packages (from flake8) Requirement already satisfied: configparser; python_version < "3.2" in ./Library/Python/2.7/lib/python/site-packages (from flake8)

ubuntu配置zsh和Oh My Zsh

坚强是说给别人听的谎言 提交于 2020-01-17 06:31:20
工作了一段时间,有了些许积蓄,忍痛买了Macbook Pro,真香…Mac上理所当然的配置了zs,平时工作是在Ubuntu环境下,折腾了一番,终于也在Ubuntu的终端下配置了zsh,再次真像,大大提高工作效率。 1 安装zsh 1.1 安装zsh 对于一般的Ubuntu系统,配置好正确的源之后,就能直接键入以下命令安装: sudo apt-get install zsh 1.2 配置zsh zsh的配置是一门大学问,这里不赘述,直接给出一个配置文件,大家可以下载后放入zsh配置文档直接使用。(我的一个法国朋友手配的,相当顺手) 把.zshrc拷贝到相应用户的home目录即可 (也可以把你的bash的配置文件( /.bash_prorile或者 /.profile等)给拷贝到zsh的配置文件~/.zshrc里,因为zsh兼容bash) 1.3 取代bash,设为默认shell sudo usermod -s /bin/zsh username 或者 chsh -s /bin/zsh chsh -s `which zsh` 如果要切换回去bash: chsh -s /bin/bash 当然你实在不愿意把zsh当成默认的shell, 而又想使用它, 那么你可以每次进入是都使用zsh进入, 而输入exit退出 2 安装oh-my-zsh 2.1 直接用zsh会很蛋疼

ubuntu更改zsh终端主题与配色

不羁岁月 提交于 2020-01-16 20:46:34
0 写在前面 由于ubuntu默认的bash窗口没有zsh好,所以推荐也改为zsh脚本环境,本博客接本人上一个博客 mac终端自定义主题与配色 ,其实同理,下面简要列出。 1 安装zsh 首先输入运行 cat /etc/shells 查看当前的shell脚本环境,一般是没有zsh的。 然后 sudo apt-get install zsh 安装。 将shell配置默认为zsh参考 网页 2 安装oh-my-zsh 同上一个博客,以下命令安装,当然以下方式安装前需要安装curl和git sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 安装好之后路径同样在 ~/.oh-my-zsh/themes/ 下,打开home文件夹 CTRL+H 显示隐藏文件夹,就可以看到了,此后跟 mac终端自定义主题与配色 一样的操作,不过这里没有设置.terminal主题。注意mac open .zshrc 对应ubuntu的 gedit .zshrc 。 注意 source .zshrc 之后可能会出错,这时候就万能重启大法啦。 来源: CSDN 作者: J² 链接: https://blog.csdn.net/JohnJim0/article

傻瓜式在mac上安装rabbitmq

三世轮回 提交于 2020-01-15 22:32:46
这种安装方式不需要自己手动下载任何东西,包括rabbitmq 一、安装Homebrew Homebrew官网:https://brew.sh/index_zh-cn.html 打开终端,输入上面的命令 ypdeMacBook-Air:~ yp$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ==> This script will install: /usr/local/bin/brew /usr/local/share/doc/homebrew /usr/local/share/man/man1/brew.1 /usr/local/share/zsh/site-functions/_brew /usr/local/etc/bash_completion.d/brew /usr/local/Homebrew ==> The following existing directories will be made group writable: /usr/local/bin /usr/local/lib ==> The following existing directories will have their owner set to

Why is this symbolic link created two instances

狂风中的少年 提交于 2020-01-15 06:38:29
问题 I have an install script used for my dotfiles. I am using to create symbolic links of one directory to my home folder. The links execute fine apart but a second symobolic link is created and I cannot reason why. The folder structure in the project looks like this install.sh scripts/ shell.sh shell/ install.sh calls shell.sh and that calls the command ln -s $SCRIPTS_DIR/shell/ $HOME/.shell $SCRIPTS_DIR is a full path So I do get a .shell directory in my home directory linked just fine but now