Questions tagged [zshrc]

The .zshrc file is the configuration file for zsh.

Zsh is a feature rich shell, with many of the features of bash, tsch, csh, and ksh. The .zshrc file is the configuration file for that shell, and it allows zsh to be configured to the user's needs.

616 questions
0
votes
1 answer

how to convert an csh to zsh alias that requires arguments

When using csh I use this alias: alias s autossh -M 0 -t \!:1 \"tmux -2 attach -t $USER\!:2 -d \|\| tmux -2 new -s $USER\!:2 \" That can help me to ssh to a remote server by using something like: s 10.11.12.3 X Where X is the suffix $USERX of the…
nbari
  • 25,603
  • 10
  • 76
  • 131
0
votes
1 answer

Getting value from function, use that value to get colored output in shell

(Using zsh) I am just trying to get random color output whenever I open a new tab in my terminal. To achieve this I wrote the following shell script, but it is not working as expected: #Standard Colors red='\033[0;31m' NC='\033[0m' # No…
0x6773
  • 1,116
  • 1
  • 14
  • 33
0
votes
1 answer

Why doesn't incremental history search work in zsh?

I'm trying to get rid of Oh-my-zsh and currently my biggest challenge is getting incremental history search working. I've acked and grepped my way through the code and there's no clues in site. I get this error : No such widget…
Jonathan
  • 539
  • 4
  • 15
0
votes
0 answers

long(ish) running task in zshrc

tldr i'd like to run an export command in zshrc that takes a while to run. i don't need the env variable immediately but would like to have my command prompt available right away. is there a way to start this command in the…
hackerhasid
  • 11,699
  • 10
  • 42
  • 60
0
votes
1 answer

what is the matching strategy of commands in shell like bash and zsh?

I am now using zsh shell, but I assume that its matching strategy of commands is the same as bash. Here is the thing: I want to make an alias command, which create a new .cpp file using a template file and take the first argument as the new file…
luochenhuan
  • 1,057
  • 11
  • 17
0
votes
1 answer

Adding AppleScript/osascript to PATH

Very noob question, but couldn't find a decent answer. Working with a command line plugin that requires adding AppleScript to my path, but honestly not sure what the right format is. I know where the script is on my system. $ which…
mhartington
  • 6,905
  • 4
  • 40
  • 75
0
votes
1 answer

escape % character in zsh

I am trying to add a battery blugin to my prompt https://github.com/Goles/Battery. PROMPT="╭─${user_host} ${current_dir} ${git_branch} `battery` ╰─%B$%b " RPS1="${return_code}" I need to escape the percent sign, which can be done by getting the…
applejuiceteaching
  • 1,473
  • 3
  • 13
  • 25
0
votes
0 answers

Ubuntu not recognizing rails after successfull installation, using zshrc

I'm using ubuntu, zshrc, and after installing rails, using gem rvm all do gem install rails and getting a successful install, i'm getting a zsh: command not found: rails I'm guessing this has to do with my ~/.zshrc file I have this at the end of…
eden
  • 1,979
  • 3
  • 16
  • 13
0
votes
1 answer

Passing Directory name into Ruby run statement

I'm using rerun and sinatra enough that I wanted a nice alias so I could execute rerun ruby X.rb where X was the current directory (ie: /Users/David/Documents/Projects/sample=>rerun ruby sample.rb). The command I'm using (adapted from this…
xavdid
  • 5,092
  • 3
  • 20
  • 32
0
votes
1 answer

aliasing sudo with zshrc - gets "aliased to nocorrect sudo"

I've checked this answer first: My question still is: If I put these lines to my ~.zshrc file : JAVA_HOME="/user/lib/jvm/java-7-openjdk-amd64" export JAVA_HOME alias sudo="sudo env JAVA_HOME=$JAVA_HOME" Then do logout. Then try : > sudo…
ses
  • 13,174
  • 31
  • 123
  • 226
0
votes
1 answer

zsh prompt does not seem to work even when setting prompt_subst

I'm having some issues with my prompt (https://gist.github.com/zackp30/ccf91d6e476f1b6b8ec4), it only displays "anothertest", but it should toggle on every command, and, if this helps, $PS1 is set to "anothertest", and not the _zprompt_init…
Xack
  • 55
  • 6
0
votes
1 answer

setting .zshrc for arq jena

I'm trying to set my .zshrc file to export ARQROOT for ARQ (jena) on a mac (mavericks), similar to what is shown on http://jena.sourceforge.net/ARQ/Tutorial/query1.html for windows and linux tried all sorts of combinations with paths, quotes and…
0
votes
1 answer

zsh-bindings: noremap on vi mode

I want to bind 'dd' in the zsh's vicmd into something like 'ddi', If i use: bindkey -M vicmd -s dd 'ddi' It will give me this output: zsh: string inserting another one too many times
Ary Purnomoz
  • 131
  • 2
  • 9
0
votes
2 answers

Set up PATH correctly for zsh and RVM

I just switched to ZSH and are having issues with RVM. I believe it is related to my PATH. One issue that I have is when I start a new tab in iTerm2, the ruby version switches to 1.9.3 even though the default is 2.0.0. Here is my .zshrc file. export…
oky_sabeni
  • 7,672
  • 15
  • 65
  • 89
0
votes
1 answer

how can I make an alias pointing to a link in zsh-shell (on mac)

I'm trying to make this in my .zshrc-file: alias fer='/Documents/hej' But I'm getting this when I run the alias cd:cd:13: no such file or directory: /Users/yoniPacheko/Documents/hej it seems like syntax is wrong right?
YoniGeek
  • 4,053
  • 7
  • 27
  • 30