0
votes
1answer
20 views

Switch from ZSH to default OS X

http://stackoverflow.com/questions/13476232/make-iterm2-launch-with-zsh I used chsh -s /bin/zsh as described above to set zsh as default. I'd like to switch back to default standard terminal that ...
1
vote
2answers
37 views

How do I unset (undo) unix set -C in zsh?

This works as expected $ echo "foo" > foo $ cat foo # foo $ echo "updated" > foo $ cat foo # updated From man set -C If set, bash does not overwrite an ...
0
votes
0answers
34 views

Zsh prompt produces an error

I have the default prompt for oh-my-zsh, which is great when I have a git repo, but if there is no git repo its actually failing instead of putting nothing. I trapped an ascii image to err just for ...
1
vote
4answers
66 views

Remove all folders that does not contain a specific name in UNIX

I'm trying to figure out my old skill in *nix. What I'm trying to achieve is to remove every folders that does not contain a specific word. This is the listing ➜ myfolder: pwd /user/myfolder ➜ ...
3
votes
1answer
90 views

Setting the $SHELL environment variable

For some reason, when I run chsh -s /bin/zsh, my $SHELL environment variable isn't getting set. When I run: echo $SHELL It outputs: /bin/bash
0
votes
0answers
38 views

Can I highlight the line at which a command was issued in zshell?

I am using zsh and oh-my-zsh and would like to easily find the start of a i.e. ack or find by changing the color of the line the command started. Is it possible to change the line color as soon as the ...
2
votes
2answers
108 views

How to look at the past directory history the shell was in?

Sometimes I like to look back in the command history to figure out what I was doing. Sometimes it would help to know what the cwd was for each command. So, I'm wondering if there's some way to track ...
0
votes
2answers
121 views

Silent cd using cdpath with zsh?

When using cd to navigate to a path found by cdpath that is not located relative to ., the resulting path gets echoed. For example, assuming a directory structure like ~/parent/child and a cdpath like ...
1
vote
1answer
247 views

Remove path until slash when typing in terminal

For instance, when I type a path in terminal cd project/example/one I can press Ctrl+W and remove the entire "word" project/example/one. Sometimes it's not very useful. Are there any shortcuts for ...
0
votes
1answer
410 views

How do I set the Android bash path in ZSH?

Looking through the Cordova Android docs, I see this line You need to add the path to your Android SDK platform-tools and tools directory. In my example I will use ...
3
votes
2answers
290 views

Unix environment variables with arguments

I'm trying to set my $EDITOR variable to be emacs with no window, so the command to call it would be emacs -nw. However if I set it like this: export ...
5
votes
4answers
1k views

How to rename a file inside a folder using a shell command?

I have a file at some/long/path/to/file/myfiel.txt. I want to rename it to some/long/path/to/file/myfile.txt. Currently I do it by mv some/long/path/to/file/myfiel.txt ...
7
votes
1answer
1k views

ZSH tab completion of git commands is very slow. How can I turn it off?

If I type: rm <TAB> I'll see possible completions almost instantly. However, if I type: git rm <TAB> It'll hang for several seconds if it's in a git repo, or fail to show any ...
0
votes
1answer
934 views

Oh My ZSH plugins do not load on startup

Using iTerm2 or Terminal.app I have to run su $USER in order for my plugins to load or display in my prompt (e.g. the RVM plugin). Any reason why this would be?
1
vote
1answer
100 views

how can I invoke the last 3 commands in shell history

Lets say my last 3 commands were: % rm foo.out % myprog > foo.out % cat foo.out I will like to invoke the last 3 with one stroke of the enter key, i.e. do some shell history commands which ...
0
votes
1answer
360 views

Colors in zshell prompt cause odd behavior

I'm running OSX Lion 10.7.3, zsh version 4.3.11. I've found that if I have color escape codes in my prompt, it royally screws things up. For instance, if I scroll forward through the command history ...
2
votes
1answer
2k views

Where can I find my (current shell process') PID?

I'm on OS X using ZSH (have lots of homebrew stuff, too). I'd like to know the PID of my current terminal. (I'm learning more about process management on *nix systems, pstree and the like, and so ...
1
vote
1answer
275 views

Alter bash tab completion to make it more like zsh

I'm on a Mac and the cp and mv commands are killing me due to them copying the contents of a directory if a trailing slash is present. It has bitten me more than once when I use tab completion to ...
1
vote
1answer
156 views

Disable users from completing after a ~ in zsh

I like to use zsh's named directories feature to move about my file system quickly (e.g. so I can use ~src to switch to my source code directory). I also like zsh's auto-completion features. ...
2
votes
5answers
5k views

How to set permissions for folder in Unix/Linux Ubuntu

This is not necessarily direct computer science question but its closely related. Is there any way to do this. I am using Z Shell zsh. I want to set up so whenever i am in folder ~/blah ...
2
votes
2answers
108 views

How can I fix typing a command name twice in zsh?

So I have this (bad) habit of typing git , pausing for a sec to glance at the output of the git status command I just typed, then typing git add ... afterwards, resulting in the rather unsuccessful ...