zsh

Mac Java 开发环境搭建清单(不断更新中)

故事扮演 提交于 2019-11-27 07:07:15
一、系统设置 在任何的操作系统中,首先你需要做一件事就是更新系统,点击窗口左上角的  > 关于本机 > 软件更新 。此外,如果这是一部新的电脑,你还需要到系统设置进行一些适当调整。如何调整,取决于个人喜好。 触控板 系统设置 > 触控板 (1)光标与点击 ✓ 轻拍来点按 ✓ 辅助点按 ✓ 查找 ✓ 三指拖移 (2)滚动缩放 ✓ 默认全选 (3)更多手势 ✓ 默认全选 Dock 置于屏幕上的位置:左边 设置 Dock 图标更小(大小随个人喜好) ✓ 自动显示和隐藏 Dock Finder (1)Finder > 显示 显示标签页栏 显示路径栏 显示状态栏 自定工具栏 > 去除所有按钮,仅剩搜索栏 (2)Finder > 偏好设置 通用 开启新 Finder 窗口时打开:HOME「用户名」目录 边栏 添加 HOME「用户名」目录 和 创建代码文件目录 将 共享的(shared) 和 标记(tags) 目录去掉 菜单栏 去掉蓝牙等无需经常使用的图标 将电池显示设置为百分比 Spotlight 去掉字体和书签与历史记录等不需要的内容 设置合适的快捷键 互联网帐户 添加 iCloud 用户,同步日历,联系人和 Find my mac 等等 二、XCode 从 App store 或苹果开发者网站安装 Xcode 。 紧接着,安装 Xcode command line tools,运行:

Where to place $PATH variable assertions in zsh?

£可爱£侵袭症+ 提交于 2019-11-27 05:56:49
I love zsh , but I am not sure where to place my $PATH and other variable assertions? I find that they are scattered between the files .zshrc .zprofile .bashrc .bash_profile , and sometimes doubled. I realize that having anything inside the bash files doesn't make much sense seeing as I'm using zsh , but where exactly should I be placing my rvm , python , node etc additions to my $PATH ? Is there a specific file I should be using (i.e. .zshenv which does not currently exist in my installation), one of the ones I am currently using, or does it even matter? simont tl;dr version: use ~/.zshrc And

What does “export” do in shell programming? [duplicate]

萝らか妹 提交于 2019-11-27 02:55:15
This question already has an answer here: Defining a variable with or without export 14 answers As far as I can tell, variable assignment is the same whether it is or is not preceded by "export". What's it for? Exported variables such as $HOME and $PATH are available to (inherited by) other programs run by the shell that exports them (and the programs run by those other programs, and so on) as environment variables. Regular (non-exported) variables are not available to other programs. $ env | grep '^variable=' $ # No environment variable called variable $ variable=Hello # Create local (non

Variable expansion is different in zsh from that in bash

陌路散爱 提交于 2019-11-27 02:42:58
问题 The following is a simple test case for what I want to illustrate. In bash, # define the function f f () { ls $args; } # Runs the command `ls` f # Runs the fommand `ls -a` args="-a" f # Runs the command `ls -a -l` args="-a -l" f But in zsh # define the function f f () { ls $args } # Runs the command `ls` f # Runs the fommand `ls -a` args="-a" f # I expect it to run `ls -a -l`, instead it gives me an error args="-a -l" f The last line in the zsh on above, gives me the following error ls:

zsh-Ubuntu更实用终端

元气小坏坏 提交于 2019-11-27 02:28:58
以前看过别人的视频中,有使用zsh作为默认终端的,但当时不知道是什么软件 安装zsh Ubuntu 安装: $ sudo apt-get install -y zsh 先启动看看: 安装好了,但是连高亮都没有,所以接下来就是美化了 安装oh-my-zsh oh-my-zsh 中整理了常用的zsh扩展和主题,所以先安装oh-my-zsh 使用 curl 安装 : sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 使用 wget 安装 : sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" 安装好之后是这样的: 安装主题 这儿 列出了 zsh 的主题列表,选一个自己喜欢的吧 个人比较喜欢 agnoster 这个主题 安装: 在安装之前先保证自己电脑上有 powerline font ,因为该主题会使用到这些特殊的字符,使用下面语句检测是否存在该主题需要的特殊字符 $ echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699" 正确的输出应该是这样: 如果没有,就安装该 字体库

Adding a new entry to the PATH variable in ZSH

泪湿孤枕 提交于 2019-11-26 23:49:06
问题 I'm using zsh and I'm trying to add a new entry ( /home/david/pear/bin ) to the PATH variable but I don't know how. The thing that confuses me the most is that there's not a single reference to a PATH variable in my ~/.zshrc file, but doing echo $PATH returns: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games So a PATH variable is being set somewhere. 回答1: Here: export PATH=/home/david/pear/bin:$PATH EDIT : This does work, but ony's answer below

zsh

匆匆过客 提交于 2019-11-26 23:06:08
快速安装 # 使用 curl $ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # 或者使用 wget $ sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" 配置主题 从官网中可以预览各种主题,见 https://github.com/robbyrussell/oh-my-zsh/wiki/Themes。配置主题只需按一下步骤 : # 1)修改 ZSH_THEME 值为想要设置的主题,允许无主题 $ vim ~/.zshrc # 2)使配置生效 $ source ~/.zshrc 禁止粘贴命令时自动对特殊字符进行转义 (1)编辑 misc.zsh 文件 vim ~/.oh-my-zsh/lib/misc.zsh (2)注释掉 url-quote-magic #if [[ $ZSH_VERSION != 5.1.1 ]]; then # for d in $fpath; do # if [[ -e "$d/url-quote-magic" ]]; then # if is

Can I alias a subcommand? (shortening the output of `docker ps`)

孤人 提交于 2019-11-26 22:47:28
The docker command has a ps sub-command that emits very long lines: $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6e8ec8a16da4 waisbrot/wait:latest "/wait" 4 minutes ago Exited (0) 4 minutes ago wait-for-janus-test 9dbf0739561f whoop/downsampler:master "./run.bash" 4 minutes ago Up 4 minutes 0.0.0.0:32855->4369/tcp, 0.0.0.0:32854->9100/tcp, 0.0.0.0:32853->9101/tcp, 0.0.0.0:32852->9102/tcp, 0.0.0.0:32851->9103/tcp, 0.0.0.0:32850->9104/tcp, 0.0.0.0:32849->9105/tcp, 0.0.0.0:32848->9106/tcp, 0.0.0.0:32847->9107/tcp, 0.0.0.0:32846->9108/tcp, 0.0.0.0:32845->9109/tcp, 0.0.0.0

pip fails to install anything, error: invalid command 'egg_info'

こ雲淡風輕ζ 提交于 2019-11-26 21:19:58
问题 I recently downloaded python from their website in addition to the Python version that already comes with Mac OSX. This is when I began to have problems installing packages with pip. sudo pip install -vvv pygoogle Will output the following: The directory '/Users/robot/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag

Git branch command behaves like 'less'

北城余情 提交于 2019-11-26 21:17:58
When I use the git branch command to list all branches, I see the output of git branch | less . The command git branch is supposed to show a list of branches, like ls does for files. This is the output I get: How I get the default behaviour of git branch ? What causes the paged output? I am using ZSH with oh_my_zsh (nothing for Git in there), and my .gitconfig looks like this: [user] email = myemail@mail.com name = Dennis Haegler [push] default = simple [merge] tool = vimdiff [core] editor = nvim excludesfile = /Users/dennish/.gitignore_global [color] ui = true [alias] br = branch ci = commit