zsh

NVM cannot load default node with default alias set

删除回忆录丶 提交于 2019-12-06 16:17:53
My problem is almost the same as this one but i already set the default alias. Once i open a new console nvm does not load the default node, this problem is also present with some SublimeText3 plugins (eslint, jscs for example). The only way to make it work is to add nvm use default after loading nvm but i thik i am doing something wrong. How can i make it work without the hack? My configuration brew 0.9.5 nvm 0.26.0 (installed using brew) zsh (with oh-my-zsh) I have nvm sourced in .zshenv with th following config: export NVM_DIR=~/.nvm source $(brew --prefix nvm)/nvm.sh # nvm use default # <-

How much history will be saved in iTerm2 Shell Integration's Toolbelt?

喜夏-厌秋 提交于 2019-12-06 14:49:24
Background : I installed shell integration in iTerm2 and enabled saving all command history to disk so it persists between sessions (Preferences > General > Save copy/paste and command history to disk). Questions : A) Is there is a limit to how much history will be stored? Does it follow the value assigned to the HISTFILESIZE environment variable, or is it controlled some other way, or limited by default? B) The history in the toolbelt contains additional information like the working directory at the time the command was executed (printed on the cli when you option+double click the history

tmux: how to open file under cursor

无人久伴 提交于 2019-12-06 09:30:24
i am a vim user and got used to the gf command, which opens the file under the cursor. Now i wanted to ask, if there is something like that for tmux. I can navigate through a tmux-pane and it happens often that there is a file-path under the cursor. Now i like to have the possibility to open that file under the cursor with vim. A: in the current window B: in another window which includes and opened vim Maybe there is a possibility to run a sh-script in that navigation-mode when invoking a special key-combination? that would make it possible to write my own scripts like i got used to in vim

zsh: permission denied: gam

佐手、 提交于 2019-12-06 08:26:45
I am using ZSH on macOS 10.12 with Oh My ZSH installed. I recently installed GAM on my computer using the provided install script bash <(curl -s -S -L https://git.io/install-gam) The script installs the command line tool gam to ~/bin/gam/gam , which is in my PATH . However, when trying to execute any gam command in ZSH, I get the following: ➜ ~ gam info user zsh: permission denied: gam However, when executing the same (or any) command in bash, the tool works as expected. I have been able to get the command to work by placing alias gam="~/bin/gam/gam" in my .zshrc , but this causes some

Could an existing fd always be duplicated both as input and output?

*爱你&永不变心* 提交于 2019-12-06 08:23:59
问题 In bash, once a fd is in use (either as input or output): exec 7>AFile It seems that that fd number could be duplicated, both as input or output: true <&7; echo $? true >&7; echo $? The tests could be repeated for a variable as: fd=7 rco="$(true >&${fd} 2>/dev/null; echo $?)" rci="$(true <&${fd} 2>/dev/null; echo $?)" And both exit values joined in one word as: [[ "$rco$rci" = "11" ]] && echo "The fd number $fd is free" The question is: Under which conditions will the exit value of "$rco$rci"

Ubuntu 19.10 安装 美化 优化 conky Docker

守給你的承諾、 提交于 2019-12-06 07:48:04
本文提供了ubuntu19.10版本的安装,美化,优化,开发环境的搭建,各种软件的安装教程 Ubuntu19.10 安装 美化 优化 conky Docker Ubuntu19.10比以前版本的变化 基于 Linux 5.3 kernel 新主题 Yaru GTK 和新壁纸 GNOME 3.34 Ubuntu19.10也将比以前的版本的启动更快 在Intel硬件上,它提供了一种“flicker-free boot”的体验 安装部分: 1 下载镜像文件 获取下载链接: 选择版本 清华开源镜像网站: https://mirrors.tuna.tsinghua.edu.cn/# 也可以去阿里云的: https://opsx.alibaba.com/mirror 2 制作启动盘: 安装etcher(linux or windows)或者rufus(windows) 插入一个没有文件的U盘:选择下载的镜像写入就行了。 需要进bios修改U盘启动项,选择U盘启动关闭secret boot 不然驱动可能打不上wifi不能使用等问题 进去后就是启动安装程序,可以最小安装,与windows并存等等按照推荐的,设置用户名密码等等 这都是基本了,不会的去其他地方找懒得写了。 美化部分 附上我的截图: 1.主题 首先不得不吐槽一下中文字体优化的确实不咋地,所以我就用了英文的桌面。。。。。 1.1

How can I (from a script) add something to the zsh command history?

半世苍凉 提交于 2019-12-06 07:18:07
问题 I'd like to be able to look through my command history and know the context from which I issued various commands--in other words, "what directory was I in?" There are various ways I could achieve this, but all of them (that I can think of) would require manipulating the zsh history to add (for instance) a commented line with the result of $(pwd). (I could create functions named cd & pushd & popd etc, or I could use zsh's preexec() function and maybe its periodic() function to add the comment

Perl command inside GNU parallel?

牧云@^-^@ 提交于 2019-12-06 04:36:15
I am trying to run this in parallel: parallel perl -pe '!/^step/ && s/(\S+)/sprintf("%.2e", $1)/ge' {} > {}.fix ::: * That is, I want to execute the perl command on all files in the current directory, in parallel. This is not working, but I have no idea why. Comment: The perl command is fixing floating-point numbers in tables. See Replacing precision of floating point numbers in existing file . In Bash you can make a function: doit() { perl -pe '!/^step/ && s/(\S+)/sprintf("%.2e", $1)/ge' "$1" > "$2" } export -f doit parallel doit {} {}.fix ::: * Exporting functions in Zsh requires using a

Unable to find a substitute command for Bash's complete in Zsh

♀尐吖头ヾ 提交于 2019-12-06 03:47:04
I put the newest git-completion.bash to my .zshrc and I get /Users/Masi/bin/shells/git/git-completion.bash:2116: command not found: complete /Users/Masi/bin/shells/git/git-completion.bash:2118: command not found: complete The lines are complete -o bashdefault -o default -o nospace -F _git git 2>/dev/null \ || complete -o default -o nospace -F _git git complete -o bashdefault -o default -o nospace -F _gitk gitk 2>/dev/null \ || complete -o default -o nospace -F _gitk gitk Which command is a substitute for Bash's complete in Zsh? Git's completion script has been updated to work with ZSH too. The

How does one override an existing zsh keyboard completion?

…衆ロ難τιáo~ 提交于 2019-12-05 22:54:00
I would like to enable zsh to autocomplete modules for yast2 (an OpenSuSE control panel), but it seems to already have some things defined. I can run compctl -k "(hello world)" nonexistantprogram just fine, but compctl -k "(hello world)" yast2 doesn't work at all. Some things for yast2 seem to be already defined, namely the "-" options: --fullscreen, --geometry, --list [submodules], etc. Even if for those who don't use OpenSuSE: Are there any flags to compctl to make it override previous settings ? Thanks very much in advance. Most likely, your system is using the newer compsys system rather