zsh

Manjaro折腾记

笑着哭i 提交于 2019-12-01 05:08:22
本菜货复活了(雾 前段时间因为中考,导致LYOI二队的大多数成员博客都半死不活了 当然也包括我的 扯回正题 最近在折腾Manjaro 然后自闭了 这篇文章主要记录下自己踩的坑 省的以后再重装又得费事(雾 重装了大概三四次 第一次是手贱改了HOME目录下的目录名还没改配置文件,登陆界面卡住进不去了 第二次是语言选成英文结果换中文还提示更新系统,懒得折腾 第三次说来话长 因为要用VSCode,所以装了个electron,然后发现有个 libicu***.so.64 文件找不到 然后直接上 archive.archlinux.org 下了个icu-64在根目录解压了 code 也能用了 但是软件包更新的时候提示错误,说是在目录下找到了那几个文件,所以无法更新(鬼畜设定 于是就想着删那几个文件 本来应该是 1 (/usr/bin) mv ./*.64 ~/Tmp/ 不慎手滑, 1 (/usr/bin) mv ./* ~/Tmp/ 遂卒 不要用Ultra ISO 用Rufus,选DD模式 其他的按照默认来就好 安装 进启动界面 用方向键把焦点移到 lang=en_US 上,按回车,找到最后的 zh_CN ,按2次回车 driver 选 nonfree (闭源硬件驱动)更好 移到 Boot ,回车 进系统后,把那个向导关上,联网,单击左上角的 Install Manjaro ,选好语言

Are 'US/Eastern' and 'US/Central' and 'US/Pacific' deprecated for strftime or just PHP?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 03:57:00
I have a shell script (zsh, to be precise) which uses strftime "%I:%M %p %Z (%a, %b %d)" "$EPOCHSECONDS" to generate a "current time" such as "02:45 PM CST (Thu, Mar 01)" This needs to be able to display the time in several different USA timezones, and so I have been using 'US/Eastern', 'US/Central', and 'US/Pacific' like so: export TZ='US/Eastern' strftime "%I:%M %p %Z (%a, %b %d)" "$EPOCHSECONDS" That seems to work just fine, and I prefer it to using TZ='America/CityName' because it doesn't require me to know which city is in which TZ, I just need to tell it which TZ I want. However, I

Bash (or other shell): wrap all commands with function/script

喜欢而已 提交于 2019-12-01 03:47:11
Edit: This question was originally bash specific. I'd still rather have a bash solution, but if there's a good way to do this in another shell then that would be useful to know as well! Okay, top level description of the problem. I would like to be able to add a hook to bash such that, when a user enters, for example $cat foo | sort -n | less , this is intercepted and translated into wrapper 'cat foo | sort -n | less' . I've seen ways to run commands before and after each command (using DEBUG traps or PROMPT_COMMAND or similar), but nothing about how to intercept each command and allow it to

Alt+number+dot and Alt+comma in Zsh and Bash

你说的曾经没有我的故事 提交于 2019-12-01 02:51:20
问题 In Bash, we can use Alt + number + . to select the n th argument of previous commands, and Alt + , to select the previous commands. They cycles through the history. For example: $ ls 1 2 $ echo 10 20 Now press and hold Alt, and press 0 then dot, it will show "echo". Without releasing Alt , press . again, it will show "ls". Use 1 in the same operation will show 10 and 1, etc. Pressing Alt and comma shows the whole command line in the history. Also Alt and . show the last argument of the

oh-my-zsh config file not loading

泄露秘密 提交于 2019-12-01 02:16:10
I am trying to get ZSH config working correctly on Mac OSX. I installed it using curl: curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh . Then I modified my zshrc file to fit my needs. It works only after I run source ~/.zshrc . But then if I come back and open a new tab or new terminal I have to do source ~/.zshrc to get the config settings to work again. Has anybody ran into this issue? I believe there is a way to make it so I don't have to do source ~/.zshrc with every new tab. I figured this out. It was due to my config file. The part of the zsh config

zsh: /usr/local/bin/pod: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: no such file or directory

百般思念 提交于 2019-12-01 01:31:42
系统升级为 macOS Catalina 发现 CocoaPods 不管用了。 解决方法: 打开 iTerm2 sudo gem update --system 输入电脑密码,然后 sudo gem install cocoapods -n/usr/local/bin 搞定 来源: https://www.cnblogs.com/BK-12345/p/11645856.html

Are 'US/Eastern' and 'US/Central' and 'US/Pacific' deprecated for strftime or just PHP?

别说谁变了你拦得住时间么 提交于 2019-12-01 00:59:27
问题 I have a shell script (zsh, to be precise) which uses strftime "%I:%M %p %Z (%a, %b %d)" "$EPOCHSECONDS" to generate a "current time" such as "02:45 PM CST (Thu, Mar 01)" This needs to be able to display the time in several different USA timezones, and so I have been using 'US/Eastern', 'US/Central', and 'US/Pacific' like so: export TZ='US/Eastern' strftime "%I:%M %p %Z (%a, %b %d)" "$EPOCHSECONDS" That seems to work just fine, and I prefer it to using TZ='America/CityName' because it doesn't

Bash (or other shell): wrap all commands with function/script

孤街醉人 提交于 2019-12-01 00:55:03
问题 Edit: This question was originally bash specific. I'd still rather have a bash solution, but if there's a good way to do this in another shell then that would be useful to know as well! Okay, top level description of the problem. I would like to be able to add a hook to bash such that, when a user enters, for example $cat foo | sort -n | less , this is intercepted and translated into wrapper 'cat foo | sort -n | less' . I've seen ways to run commands before and after each command (using DEBUG

Mac 利器:brew、brew cask、zsh

痞子三分冷 提交于 2019-11-30 21:12:00
#mac 学习记录 ###brew(也叫 Homebrew) 参考链接 安装 brew 的官网: http://brew.sh/index_zh-cn.html 有对此详细描述 安装方法:打开terminal,输入命令: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" 使用brew安装软件 一个命令搞定,比如安装git brew install git 使用brew卸载软件 brew uninstall wget 使用brew查询软件 brew search /wge*/ /wge*/是个正则表达式,需要包含在/中 其它brew命令 brew list 列出已安装的软件 brew update 更新brew brew home 用浏览器打开brew的官网 brew info 显示软件的信息 brew deps 显示包依赖 ###Homebrew-cask 参考链接 homebrew-cask, 官网传送 , 是一套建立在homebrew基础上的Mac软件安装命令行工具。与brew的区别就是,后者侧重于软件套件和软件环境的配置安装,而前者是mac平台软件。 安装步骤 安装Xcode(Mac App Store 免费一键下载) 安装homebrew(上面介绍的一行命令搞定) 安装homebrew-cask

How can I have term.el (ansi-term) track directories if using anyhting other than bash

孤街浪徒 提交于 2019-11-30 21:00:18
When using eshell or ansi-term and bash emacs changes the default-directory variable depending on what directory you are in. So if I move to /home/user/code/project and then use ido-find-file to open a file it starts ido with the CWD. If I use ksh (my normal shell) or zsh (tried for testing) it doesnt work. Is there a setting or is this just supported under bash? Thanks Put this in your .zshrc: chpwd() { print -P "\033AnSiTc %d" } print -P "\033AnSiTu %n" print -P "\033AnSiTc %d" The chpwd() function is run every time the pwd changes. The line ending in %d is the one that allows you to track