zsh

Worth switching to zsh for casual use? [closed]

两盒软妹~` 提交于 2019-12-04 07:38:43
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 years ago . The default shell in Mac OS X is bash , which I'm generally happy to be using. I just take it for granted. It would be really nice if it auto-completed more stuff , though, and I've heard good things about zsh in this regard. But I don't really have the inclination to spend hours fiddling with settings to

Setting environment variable in ZSH gives number expected

99封情书 提交于 2019-12-04 07:34:47
I'm trying to set an array in ZSH (configured using oh-my-zsh). export AR=(localhost:1919 localhost:1918) but I'm getting an error like such: zsh: number expected If I don't add the export command, it's just fine. I'm not typing the above in a *rc file, just in the zsh prompt. What could be the problem? You can't export an array in zsh. For more info: http://zsh.sourceforge.net/Guide/zshguide02.html Note that you can't export arrays. If you export a parameter, then assign an array to it, nothing will appear in the environment; you can use the external command printenv VARNAME' (again no $'

Looking for ALT+LeftArrowKey solution in zsh

断了今生、忘了曾经 提交于 2019-12-04 07:22:11
问题 I just recently switched from bash to zsh, however I miss my Alt + LeftArrowKey and Alt + RightArrowKey to go back and forth a word at a time. Right now, if I press Alt + LeftArrowKey I go back a couple of letters and then I'm stuck. I won't go any further backwards and it won't back to the end of the line with Alt + RightArrowKey as I would expect. I can't even use the arrow keys to go to the end of the line, only to the second to last. Can't input new chars on the line either or indeed

Switching from zsh to bash on OSX, and back again?

巧了我就是萌 提交于 2019-12-04 07:19:23
问题 So Im learning to develop in Rails, and have discovered the power of zsh. However, for some of my other tasks, I wish to use normal Bash. Although they are the same, I just feel comfortable with the lay out of bash in some situations. How do I switch back and forth, or turn zsh on and off? Thanks! 回答1: You can just use exec to replace your current shell with a new shell: Switch to bash : exec bash Switch to zsh : exec zsh This won't affect new terminal windows or anything, but it's convenient

ZSH print '%' automatically after the result of the C program [closed]

十年热恋 提交于 2019-12-04 07:01:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . This is a simple C program: This is the result of that program -- note the % at the end. 回答1: zsh prints a % (by default for a normal user) when the last line does not end with a newline character. This partial line could be erased by the prompt otherwise. Add a newline to properly terminate the last line ( \n ):

filter file content to sorted tables

拟墨画扇 提交于 2019-12-04 06:43:49
问题 I have a file that contains the following lines of code. here the file displays a schedules which are sorted one by one . at 12:00 the schedule of james version1 is : first_task:eating:nothing second_task:rest:onehour third_task:watching:nothing at 12:00 the schedule of james version2 is : first_task:eating:fruits second_task:rest:twohour third_task:watching:manga at 12:00 the schedule of alex version1 is : first_task:eating:fruit second_task:rest:halfhour third_task:watching:horrorfilm at 12

Linux更换默认Shell

五迷三道 提交于 2019-12-04 06:25:45
Linux 更改默认 Shell 首先查看系统支持的shell cat /etc/shells 或者 chsh -l 得到结果: /bin/sh /bin/bash /bin/zsh /sbin/nologin /usr/bin/sh /usr/bin/bash /usr/bin/zsh /usr/sbin/nologin 更换默认的Shell为zsh(需要输入管理员密码) sudo chsh -s /usr/bin/zsh 查看更换是否成功 grep 你的用户名 /etc/passwd 消息中最后一项是当前用户使用的shell类型usr/bin/zsh 参考: https://blog.csdn.net/liubenq/article/details/78446648 来源: https://www.cnblogs.com/geepair/p/11837387.html

高效macbook工作环境配置

不羁岁月 提交于 2019-12-04 06:04:50
工欲善其事,必先利其器,工具永远都是用来解决问题的,没必要为了工具而工具,一切工具都是为了能快速准确的完成工作和学习任务而服务。 本文记录 MacBook 整个配置过程,供新入手MacBook和觉得MacBook比较难用的同学参考。 本文转载概况: 已被众多公众号及伯乐在线、开发者头条等多家技术类门户网站转载 伯乐在线 已被收录进入 2015微信公众号热传100+经典技术文章 1. 硬件提升 笔记本电脑的特点是携带方便,缺点是屏幕太小,因此你首先需要再申请领用一个外接显示器,多一个屏幕会大大减少你切换应用程序的次数,显著提升你的工作效率,别忘了同时申请一个Mini DP转VGA的转接头用于连接显示器。为了配合多显示器,后面会推荐一个软件来管理多显示器窗口。 如果你资金宽裕,可以买个机械键盘和无线鼠标,进一步提升工作效率。 2. 系统设置 2.1 将功能键(F1-F12)设置为标准的功能键 MacBook键盘最上面一排的功能键(F1-F12)默认是系统亮度和声音之类的快捷设置,当MacBook作为你的娱乐电脑时,这样的默认设置是非常方便的,但是对于将MacBook作为工作电脑而且需要频繁使用功能键(F1-F12)的人,最好将功能键(F1-F12)的行为设置为标准的功能键。 首先打开 System Preferences ,点击 Keyboard 图标,勾选上 Use all F1,

RVM set ruby default, when open new terminal erase the RVM setting, go back to system ruby

China☆狼群 提交于 2019-12-04 05:49:09
I just got a new MacBook Pro and tried to setup the RVM in the system. I installed RVM and set the default to ➜ rvm list default Default Ruby (for new shells) ruby-1.9.3-p194 [ x86_64 ] My RVM version is ➜ rvm --version rvm 1.16.8 (master) by Wayne E. Seguin , Michal Papis [https://rvm.io/] I have put [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. at the bottom of the .bashrc_profile . When I open the new Terminal window, I have done rvm default every time to reset from system ruby to rvm installed ruby. I have done 3 hours research

Is there any established order for 'ls' arguments?

谁说胖子不能爱 提交于 2019-12-04 03:55:26
问题 I'm a student and as part of my cursus I must recode the ls command and reproduce its behaviour the best possible. On Mac (El Capitan 10.11.6), using the terminal iTerm 2(zsh), I get: user> ls . -R ls: -R: No such file or directory And on Arch (latest version), using the default text interface(bash) I get: user> ls . -R <current directory content> Although I'd rather trust Arch, is it correct for ls to refuse its option after a directory has been specified ? And is there any documentation