0
votes
1answer
13 views

Tried Installing ZSH through cygwin and then trying to use zsh through Cmder

I tried to install Cygwin (64 bit version) on my computer, and it went through hunky-dory until at the very end, autorebase.bat failed with exit code 1. I read through the logs and they weren't too ...
2
votes
2answers
45 views

How do I handle multiple quotes in an alias (for bash or zsh)

I am using zsh, and I am trying to use python as a simple calculator. I'm very familiar with python, but can't seem to get the alias (or function) to work properly. So far I've got: pycalc() { ...
1
vote
3answers
49 views

How do I properly install and organize terminal software on OS X?

I've been learning vim and messing around with installing certain terminal extensions like zsh and tmux. So far I've been installing everything according to their online instructions, and this has ...
0
votes
0answers
19 views

zsh not finding new applications in PATH [duplicate]

In my path, I have rbenv shims followed by /usr/local/bin, then /usr/bin. Whenever I install a new version of ruby using rbenv, applications such as gem and bundle should automatically be find first ...
1
vote
1answer
34 views

What is the ZSH equivalent of 'expr'?

The expr utility evaluates an expression and writes the result on standard output. What is the canonical ZSH way to evaluate an expression, and print the result? Solution: I believe the answer is ...
2
votes
1answer
175 views

What's the ZSH equivalent of BASH's $PROMPT_COMMAND?

BASH supports a $PROMPT_COMMAND environment variable that defines a command to be executed before any first-level interactive prompt. I'm looking for a ZSH equilvalent of that. The documentation says ...
0
votes
2answers
41 views

Zsh: how to auto complete after a command?

everyone. It's a little difficult to explain what I want to do. I want to create a script 'example', which can input long commands for you after you run it with short parameters. For example, $ ...
2
votes
2answers
78 views

env -i zsh | How is this magic possible?

I'm currently working, for school, on a home-made shell, therefore I'm kind of curious nowadays about how shell vars are set. Yes, this can be really exciting ! Anyway, we obviously have to deal with ...
0
votes
1answer
105 views

zsh (or maybe oh-my-zsh) history gets confused with multi-line commands

if I use the up arrow in a zsh session, as you'd expect I get previous commands, from newest to oldest. Now (whether it's zsh or oh-my-zsh doing this I don't know), but if I type the start of a line ...
0
votes
1answer
121 views

ZSH: Where to place environment variable so that launched application can pick it up?

I need an environment variable KEY="value" made available to a GUI application before starting it. The launcher file (the one that places the icon on the desktop and sidebar in Ubuntu) has a value of ...
2
votes
2answers
42 views

Locating the source of a function in zsh

I have this annoying issue in my zsh shell where a function is being declared somewhere and that function is named "cp" so it's overriding the normal cp behavior. I'm trying to locate the function ...
1
vote
1answer
33 views

Nested substitution in ZSH

I use zsh. Say, for instance, that I want to remove the current directory from cdpath. That means that I need to remove an element based on content, which fits the ${name:#to_be_removed} pattern ...
1
vote
1answer
16 views

Forwarding shell to servers without installing it

is there any way how to forward a shell to a server without installing it on that box? This is what I need to do: I work for company where we admin X boxes and I will probably not be allowed to ...
1
vote
1answer
68 views

When is .zprofile file read?

I am using .zprofile to set up some stuff, and I assume it is evaluated everytime I log in to given user. Am I correct?
0
votes
0answers
174 views

tmux in zsh with vi mode, toggle cursor shape between normal and insert mode

(note: I wrote this question on stackoverflow, but got flagged as offtopic, so I'm re-writing it here) Here's what I want: Consistent behavior (as much as possible) between Vim, MacVim, zsh with ...
1
vote
1answer
50 views

Pre-compiled command line input in zsh

I recently set up a ubuntu 12.04 64 bit machine. I use tmux with many open windows, all of them use zsh as shell, some of them through a chroot environment that uses the same home folder of the normal ...
3
votes
1answer
49 views

Why does `${$(pwd)}` output current working directory in zsh?

In zsh, ${$(pwd)} output the current directory. However, if I run echo ${/path/to/somewhere}, it just shows an empty line. Why does this happen? Thanks!
1
vote
3answers
66 views

Enter a string containing “!!” on a shell without it being interpretted

I'm trying to send a string that contains "!!" in it. However, every time I execute it on zsh, zsh replaces !! with the last command entered. How can I get zsh to not interpret "!!"? I have also ...
3
votes
1answer
91 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
2
votes
1answer
275 views

Does zsh support hash table as a built-in data type?

If supported, which version of zsh should I use to take advantage of this feature? How to declare and use it in code?
1
vote
3answers
685 views

After switching back to bash can't access root

I'm new to Linux and using Debian 7. I was using bash, but tried out zsh by using chsh. Initially probably entered a bad shell name but eventually switched to zsh successfully. Now I switched back to ...
0
votes
3answers
79 views

Temporarily transferring shell settings to remote ssh session?

I am curious, frequently I would like to transfer all of my shell settings (dotfiles) over to a remote session just during my session and then have them reversed when I logout. Even better would be ...
1
vote
3answers
91 views

How to create a series of commands in shell, which will stop execution on error

My usual git workflow for deploying is the following: [while on master branch] git pull git push git checkout production git pull git merge master git push Would it be possible to create a ...
3
votes
3answers
52 views

Can I cycle through the history of shell commands that have only been used from current directory?

So when using arrow up/down to cycle through prior commands, is there any way I can limit those to the commands used from the current directory? This would make my life 10 times easier...
1
vote
1answer
115 views

zsh running a comand but not from the path

My zsh is doing something odd, it is running an executable that is not the first executable on my path. I have a wrapper script for ssh but the wrapper is not being invoked while the real ssh binary ...
3
votes
1answer
165 views

How to benchmark bashrc / zshrc and prompt rendering time?

As im currently experimenting with new stuff in my prompt i need a way to tell what the performance impact is. How can i monitor how long it takes to render my prompt and the time it takes to source ...
1
vote
2answers
203 views

How to merge ls commands colors with the output of find or du?

I have a simple alias to list the size of files&folders in cwd. ( including dotfiles in this case , ignoring zero sizes ) du -sh .[!.]* * | sort -hr | grep -v '^0' which can be achieved ...
0
votes
1answer
209 views

Emacs, Zsh and Ansi-Term — weird chars

My issue is illustrated in the follow images: This is the visual representation I get in my iTerm of my Zsh shell, with the same font as used in Emacs: This my my Emacs output using ansi-term: ...
2
votes
3answers
276 views

How to make zsh completion like bash

I am using zsh. It is a nice shell, especially for the auto completion function. But, when I press tab, it always auto fill with the first completion option. For example, there are two files in my ...
3
votes
2answers
1k views

zsh config - to export or not to export?

When setting variables in my ~/.zshrc I can either use export export PATH=/some/path or not PATH=/some/path How do these differ and which should I use?
0
votes
1answer
67 views

ZSH, colourify & autocompletion

I have zsh with oh-my-zsh, I added an alias to color the make output using alias make="colourify make" but when I use it, make autocompletion does not work anymore. If I use unalias make, the make ...
0
votes
1answer
149 views

Invoke zsh, then *source* another file (while entering interactive mode)

This question is of course related, but different to the one about executing a command. That questions’ solutions involve either starting a subshell – which isn’t possible due to the requirement of ...
0
votes
1answer
210 views

Putting the “canonical” working directory in a zsh prompt on OS X (iTerm 2, if that matters)

I use zsh and oh-my-zsh for my shell environment on OS X, and I'm having a hard time tracking down whether or not the thing that is happening is a result of an oh-my-zsh function or the default ...
4
votes
3answers
1k views

Using wildcards in commands with zsh

Using commands such as rsync and scp with ZSH I've run into trouble. Instead of the (normal) behaviour of giving me all matching files, it won't run and returns: ➜ ~ rsync -azP user@server:~/* ~/ ...
0
votes
0answers
21 views

ZSH not finding commands [duplicate]

I've noticed several times that zsh can't find commands when running pipes, e.g.: ➜ ~ ps aux | grep terminal zsh: command not found:  grep ➜ ~ curl -L ...
4
votes
2answers
161 views

how to make ctrl+p behave exactly like up arrow in zsh?

First of all, I am using zsh and oh-my-zsh with nearly no other customization. In zsh, when I press up-arrow, it brings me the latest commands. And if I typed some characters before I press up-arrow, ...
1
vote
1answer
49 views

ZSH glob expansion without menu

I'm trying to configure zshell in such a way that: $ ls *<TAB> # results in ls a b c d e f g <cursor> where "a, b, .., g" are the files that match the wildcard. Instead it gives me the ...
2
votes
2answers
109 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
0answers
200 views

Can not bring a background running vim to foreground?

If I have a vim running in the background, it seems that I can not bring it back to foreground. Do you have any idea, why?
0
votes
2answers
116 views

How to deal with the shell input before it executed in Bash or zsh? [closed]

everyone. I am a bash/zsh user(Linux). I want to realize the following things. First, input the command in the bash/zsh shell, like: $ wonderful: In fact, a program named `wonderful:' doesn't ...
1
vote
0answers
251 views

zsh - prompt redraw after executing command

I just started using zsh and I'm configuring a few things. I've chosen the vi bindings as I'm more familiar with those. As many people before me, I soon found it would be useful to have some visual ...
1
vote
1answer
250 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 ...
1
vote
1answer
122 views

put in bash or zsh history absolute path to files I working on

I have found that in bash i frequently use something like that: vim ./somefile1 less less ./dir1/dir2/somefile2 cp some_other_relative_path_to_file and so on After that when I trying to find a ...
1
vote
1answer
92 views

How to remove unwanted characters when running command in terminal

I'm using zsh with oh-my-zsh as default shell. When I run a command in guake / gnome-terminal / konsole, a string with format (special-char|command-name|%) appears as the first line of output in ...
1
vote
1answer
402 views

In tmux, arrow and ctrl+arrow both result in the same code

Ubuntu 12.10, TERM is set to screen-256color in putty and tmux.conf, confirmed when I export both in and out of a tmux session. If I run cat > /dev/null and then press <down> then ...
1
vote
1answer
434 views

How can I list directories first in the terminal with zsh / ls command in Mac OSX?

Most of the similar questions / answers here don't work in Mac/OSX because there is not such a thing as --options. I am using the ZSH shell, I've been trying commands said here: ...
3
votes
2answers
121 views

Do aliases slow down a shell's start?

Sometimes my shell (zsh) takes longer to start than usual (I open the terminal, and it hangs a bit until I can input commands). I have a few aliases on my .zshrc (well, actually they're in a ...
4
votes
3answers
117 views

Transparent usage of temporary files as means of piping

As many of us are surely aware, it's always a good idea to make your program accept stdin input. Very many programs do allow that *nix environments. This lets us do cool things like piping echo "foo" ...
1
vote
2answers
273 views

zsh completion doesn't work under Cygwin for other drives

I'm on Win7 x64, Cygwin 1.7 and zsh (and using oh-my-zsh). Zsh newbie here. I've reviewed zsh autocompletion not working on cygwin and tried the solution there but no luck. My mount table: C: on ...
1
vote
2answers
365 views

Converting bash to zsh: declare function and if statement

I have copied this code from somewhere and am trying to modify it for my needs. It was designed for bash but I am running it under zsh. I always have trouble running bash scripts under zsh, as there ...