zsh

Zsh detects insecure completion-dependent directories

泄露秘密 提交于 2021-02-15 11:24:42
问题 I get the following error messages when I open my terminal, Hyper: [oh-my-zsh] Insecure completion-dependent directories detected: drwxrwxr-x 7 dwaynethe2nd admin 224 Apr 25 15:00 /usr/local/share/zsh drwxrwxr-x 4 dwaynethe2nd admin 128 Apr 25 14:53 /usr/local/share/zsh/site-functions 回答1: This is an issue with ZSH, your shell, not Hyper, your terminal. I actually had the same issue earlier today. There are some solutions in this issue on Github, and I will quote some of them here but I

ZSH 自动读取 macOS 系统代理配置并设置环境变量

假如想象 提交于 2021-02-12 08:43:53
更多奇技淫巧欢迎订阅博客:https://fuckcloudnative.io 前言 和其它 Linux 的 DE 一样,macOS 也支持在“系统偏好设置”中设置 HTTP 代理、HTTPS 代理,但是 macOS 并不会在终端(Terminal、iTerm)的 shell 中自动生效系统代理配置。为了方便日常使用,我决定好好研究一下 macOS 的系统代理。 1. macOS 系统代理的行为 和 Linux 和 Windows 只有一种系统代理配置不同,macOS 为每一种网络设备(Wi-Fi、Ethernet、Bluetooth PAN 等)维护了独立的网络配置,包括代理配置在内。因此当切换网络设备时,macOS 会使用不同的代理配置;如果同时连接了多个网络设备,则操作系统会优先采用在 和大部分 Linux 桌面环境一样,系统偏好设置中的代理设置在 shell session 中是不会生效的,在终端中使用代理、需要手动提供 HTTP_PROXY 、 HTTPS_PROXY 和 ALL_PROXY 环境变量。 2. 在终端获取 macOS 系统代理配置 macOS 内置了许多实用的命令行工具,如 xcode-select 用于安装命令行工具和配置 Xcode、 build_webkit 用于编译 WebKit、 softwareupdate 用于获取系统更新等

zsh & tree & macOS

佐手、 提交于 2021-02-11 20:34:16
zsh & tree & macOS https://unix.stackexchange.com/questions/22803/counting-files-in-leaves-of-directory-tree bug $ tree zsh: command not found: tree solutions https://blog.csdn.net/science_Lee/article/details/79565931 $ brew install tree https://blog.csdn.net/u011781521/article/details/53868616 $ vim .bash_profile # 增加 # export PATH=/bin:/usr/bin:/usr/local/bin:$PATH $ source .bash_profile # .zshrc 中添加一行 # source ~/.bash_profile http://yijiebuyi.com/blog/c0defa3a47d16e675d58195adc35514b.html https://zhuanlan.zhihu.com/p/43704296 https://www.cnblogs.com/xgqfrms/p/9491946.html # all $ tree #

Check domain availability — avoiding front running — using wildcards or regex

我是研究僧i 提交于 2021-02-08 11:58:27
问题 I can check for the availability of a an individual domain via whois abc123.com . I can't figure out how to check the availability of a whole set of domains that match criteria , like XXX YYY . Z . where X is any 3 of the same letters, Y is any 3 of the same numbers, and Z is any of com, org, or io. Like aaa111.org That's just an example case, but you get the idea - I'd like to specify strings, patterns, and endings, and see what's available. I can do this kind of string matching with Regex,

zmv - do not change case if there are more than one consecutive uppercase letters

混江龙づ霸主 提交于 2021-02-08 03:01:21
问题 I am using the following command zmv -n -Q '(**/)(*[[:upper:]]*)(/)' '${1}${(L)${2//(#b)([[:upper:]])/-$match[1]}#-}' to transform % tree . ├── EmptyFile.txt ├── FirstDirectoryName │ ├── FourthDirectoryName │ ├── secondDirectoryName │ └── thirdDirectoryName ├── FourthDirectoryName ├── secondDirectoryName └── thirdDirectoryName To % tree . ├── EmptyFile.txt ├── first-directory-name │ ├── fourth-directory-name │ ├── second-directory-name │ └── third-directory-name ├── fourth-directory-name ├──

zmv - do not change case if there are more than one consecutive uppercase letters

可紊 提交于 2021-02-08 03:00:54
问题 I am using the following command zmv -n -Q '(**/)(*[[:upper:]]*)(/)' '${1}${(L)${2//(#b)([[:upper:]])/-$match[1]}#-}' to transform % tree . ├── EmptyFile.txt ├── FirstDirectoryName │ ├── FourthDirectoryName │ ├── secondDirectoryName │ └── thirdDirectoryName ├── FourthDirectoryName ├── secondDirectoryName └── thirdDirectoryName To % tree . ├── EmptyFile.txt ├── first-directory-name │ ├── fourth-directory-name │ ├── second-directory-name │ └── third-directory-name ├── fourth-directory-name ├──

gcc raises “unrecognized command line option” error with pkg-config

▼魔方 西西 提交于 2021-02-07 10:24:43
问题 I am trying to compile a gtk program using the tutorial here. When I issue the command gcc -o tut tut.c $(pkg-config --cflags --libs gtk+-2.0 gmodule-2.0) I get the following error: gcc: error: unrecognized command line option ‘-pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86

gcc raises “unrecognized command line option” error with pkg-config

冷暖自知 提交于 2021-02-07 10:24:25
问题 I am trying to compile a gtk program using the tutorial here. When I issue the command gcc -o tut tut.c $(pkg-config --cflags --libs gtk+-2.0 gmodule-2.0) I get the following error: gcc: error: unrecognized command line option ‘-pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86

PATH variable in .zshenv or .zshrc

纵饮孤独 提交于 2021-02-07 05:15:15
问题 My setup is zsh 5.0.5 in arch linux I have set the PATH variable as below in .zshenv typeset -U path path=(~/bin $path) DW=$HOME/Downloads but it didn't work. print $PATH shows only /usr/local/bin:/usr/bin:/usr/bin/vendor_perl:/usr/bin/core_perl .zshenv was read, because I could see DW variable is set. Only PATH variable isn't set. And what I don't understand is, after rename the .zshenv to .zshrc, PATH variable just works as intended. Need any special treatment setting environment variables

Zsh : command not found : ng on new Mac OS Catalina

自闭症网瘾萝莉.ら 提交于 2021-02-06 10:43:12
问题 I have download the new Mac OS Version Beta of Catalina. Now I should start to use Zsh. But when I want to run a Angular project in Atom, I receveid this message : "The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh . For more details, please visit https://support.apple.com/kb/HT208050." I'am already using zsh Terminal but he doesn't found the ng commands. 回答1: I also lost access to my commands after moving over to zsh following the