Skip to content

Tag: zsh

Pipe in ZSH is stripping colors from Git log output

I’m trying to utilize GRB’s git helpers (https://github.com/garybernhardt/dotfiles/blob/master/.githelpers) for pretty printing my git log. The git log –graph –pretty=”tformat:${LOG_FORMAT}” command from line #62 works just fine; printing with colors in iTerm. But as soon a…

Show all sourced files in ZSH

I want to see which files got sourced while starting the Z-shell. Does it even keep track and if yes is there a way to list all the files? Answer You could do a at the beginning of the very first file which gets sourced. See man zshoptions.

Exclude directory when grepping with zsh globbing

I have some file structure which contains projects with build folders at various depths. I’m trying to use zsh (extended) globbing to exclude files in build folders. I tried using the following command and many other variants: grep “string” (^build/)# I’m reading this as “Any fol…

command not found in zsh when it is there

I just installed the android SDK and was trying to run the emulator when this happened: emulator seems to be in one of the $PATH directories, but zsh still says that it wasn’t found. What could be the cause? Answer Solved it. The problem was that emulator was a 32-bit ELF binary, and I didn’t have…

Are linux shell pipes pipelined?

Given a file input.txt if I do something like is the output from the first command continuously passed (as soon as it is generated) as input to the second command? Or does the pipe wait until the first command finishes to start running the second command? Answer Yes, they’re pipelined — each compo…

zsh option to generate the recomended options

There is a nice option when setting up zsh on Ubuntu However, on a fresh Arch Linux install the option is missing. Is there a way to have it (or maybe, I am being picky here) ? Answer This happens when you haven’t got a .zshrc and there’s a /etc/zsh/recommended.zshrc. If you say yes, it’ll j…

deactivate:unset:1: no such hash table element: pydoc

I am trying to setup my new laptop’s development environment. After install zsh I am constantly getting error deactivate:unset:1: no such hash table element: pydoc Please help. I have following simple aliases in my zshrc: Answer You can see virtualenv pr on github. or you can change deactivate () functi…