zsh

How to make a permanent zsh alias in command-line?

我们两清 提交于 2021-02-20 04:09:05
问题 I want to permanently store zsh aliases. When I make an alias and shut down ITerm and reopen and it's gone! alias mkcd="function _mkcd(){mkdir "$1"; cd "$1"} _mkcd" mkcd Ken zsh: command not found: mkcd How can I make it permanent? 回答1: Create a file .zshrc in your home directory if it does not exist already and add the alias to the file. Next time when you open the terminal. It will be available. To use it in the same session, just source the .zshrc file by running the command . .zshrc from

How to make a permanent zsh alias in command-line?

会有一股神秘感。 提交于 2021-02-20 04:08:10
问题 I want to permanently store zsh aliases. When I make an alias and shut down ITerm and reopen and it's gone! alias mkcd="function _mkcd(){mkdir "$1"; cd "$1"} _mkcd" mkcd Ken zsh: command not found: mkcd How can I make it permanent? 回答1: Create a file .zshrc in your home directory if it does not exist already and add the alias to the file. Next time when you open the terminal. It will be available. To use it in the same session, just source the .zshrc file by running the command . .zshrc from

Linux安装nslookup命令

徘徊边缘 提交于 2021-02-19 05:00:19
做DNS的人都知道nslookup命令是做什么用的,windows系统自带的。但是linux系统是不自带这个命令的,需要人手动安装。如果您不记得这是哪个软件包提供这个命令的话,那您还真会有些麻烦了。下面教您如何找到这个命令的软件包。 命令 yum provides */nslookup 就可以找到提供nslookup命令的软件包了。 [root@localhost ~]# yum provides */nslookup Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * epel: mirror01.idc.hinet.net * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com base/7/x86_64/filelists_db | 7.1 MB 00:00:01 https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/repodata/7d047e4875dc539bff4e1d0c80773d751fae85c440394eb0a5f3ab65ae55cc1a-filelists.sqlite.bz2: [Errno

Problems using zsh with Catalina, Python/Python3, pip/pip3, PATH, zshrc, etc

早过忘川 提交于 2021-02-17 21:30:06
问题 I recently updated to Catalina and the default zsh. I probably messed up paths during the transition, and I'm currently trying to sort out the locations of Python3.7, pip3, the command-line PATH and my zshrc file. It looks as if there are potentially redundant files contained within /usr/bin, /usr/local/bin, /usr/local/Cellar/python and /Users/[user]/.local/bin The following are reproductions of commands: $ which python3 /usr/bin/python3 $ which python /usr/bin/python $ which pip pip not

Problems using zsh with Catalina, Python/Python3, pip/pip3, PATH, zshrc, etc

笑着哭i 提交于 2021-02-17 21:29:18
问题 I recently updated to Catalina and the default zsh. I probably messed up paths during the transition, and I'm currently trying to sort out the locations of Python3.7, pip3, the command-line PATH and my zshrc file. It looks as if there are potentially redundant files contained within /usr/bin, /usr/local/bin, /usr/local/Cellar/python and /Users/[user]/.local/bin The following are reproductions of commands: $ which python3 /usr/bin/python3 $ which python /usr/bin/python $ which pip pip not

How to enable git file tab completion with zsh compinit?

匆匆过客 提交于 2021-02-17 19:12:06
问题 I have a problem with the zsh tab completion: After running: autoload -U compinit compinit Git tab completion for files does not work any more. For example if I type git add my_f to complete my_file, nothing happens. The zsh git completion only seems to work for git branches and tags. Without the compinit stuff, git file completion works, but of course I'm missing out all the fancy branch completion stuff. So... Is there a way to make git file completion AND git branch completion possible at

How to enable git file tab completion with zsh compinit?

醉酒当歌 提交于 2021-02-17 19:12:05
问题 I have a problem with the zsh tab completion: After running: autoload -U compinit compinit Git tab completion for files does not work any more. For example if I type git add my_f to complete my_file, nothing happens. The zsh git completion only seems to work for git branches and tags. Without the compinit stuff, git file completion works, but of course I'm missing out all the fancy branch completion stuff. So... Is there a way to make git file completion AND git branch completion possible at

How to enable git file tab completion with zsh compinit?

谁说胖子不能爱 提交于 2021-02-17 19:11:53
问题 I have a problem with the zsh tab completion: After running: autoload -U compinit compinit Git tab completion for files does not work any more. For example if I type git add my_f to complete my_file, nothing happens. The zsh git completion only seems to work for git branches and tags. Without the compinit stuff, git file completion works, but of course I'm missing out all the fancy branch completion stuff. So... Is there a way to make git file completion AND git branch completion possible at

weird space before prompt using tmux on Mac OS Lion

ぃ、小莉子 提交于 2021-02-17 15:15:13
问题 it just happened on my Lion system, I am using zsh with tmux normal in the zsh shell double space in tmux screen am I missing some config in zsh or tmux? 回答1: Start tmux with the -u option for unicode functionality. See this issue. From man tmux : -u tmux attempts to guess if the terminal is likely to support UTF-8 by checking the first of the LC_ALL, LC_CTYPE and LANG environment variables to be set for the string "UTF-8". This is not always correct: the -u flag explicitly informs tmux that

weird space before prompt using tmux on Mac OS Lion

∥☆過路亽.° 提交于 2021-02-17 15:14:42
问题 it just happened on my Lion system, I am using zsh with tmux normal in the zsh shell double space in tmux screen am I missing some config in zsh or tmux? 回答1: Start tmux with the -u option for unicode functionality. See this issue. From man tmux : -u tmux attempts to guess if the terminal is likely to support UTF-8 by checking the first of the LC_ALL, LC_CTYPE and LANG environment variables to be set for the string "UTF-8". This is not always correct: the -u flag explicitly informs tmux that