FAQ Database Discussion Community


In zsh how do I bind a keyboard shortcut to run the last command?

keyboard-shortcuts,zsh,oh-my-zsh
I frequently find myself wanting to repeat a command, and while !! is useful, I'd like to bind that to ctrl-w or something like that. Is there a way to do that? EDIT: I'm aware that the up arrow does what I want, however I would rather not have to...

In OSX with oh-my-zsh installed, how to highlight the output of `ls` in oh-my-zsh with Solarized theme installed

osx,ls,oh-my-zsh
I recently configured my terminal according to this blog. After followed it step by step, everything is OK but the colour of ls's outputs are grey. I googled this problem and found this. It says that adding export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD to the .bash_profile will resolve this problem. BUT, I use zsh...

zsh “cd..” command stopped working without space (cd..)

zsh,oh-my-zsh
"cd.." stopped working without space. I used to type "cd.." but since the last update only "cd .." works it throws: zsh: command not found: cd.. how can I get it back? thank you....

ZSH Agnoster Theme showing machine name

shell,ubuntu,zsh,digital-ocean,oh-my-zsh
I have a development server hosted on Digital Ocean, using Ubuntu 14.04. I switched my shell to ZSH and decided to go with the Agnoster theme. In order to get [email protected] to stop showing, I set the DEFAULT_USER in my .zshrc file. For some reason on the ubuntu server, that's...

oh-my-zsh error after upgrade: ~/.oh-my-zsh/lib/misc.zsh:3: parse error near `then'

shell,zsh,zshrc,oh-my-zsh
today I upgrade my oh-my-zsh and then start this error: ~/.oh-my-zsh/lib/misc.zsh:3: parse error near `then' Inside this file there is this shell loop... ## Load smart urls if available for d in $fpath; do if [[ -e "$url/d-quote-magic"]]; then autoload -U url-quote-magic zle -N self-insert url-quote-magic fi done I think...

Oh My Zsh - how to use GitHub plugin?

plugins,github,zsh,zshrc,oh-my-zsh
Just enabled github plugin in .zshrc: plugins=(… guthub …) After this autocomplete works fine, when I press tab I see: But then, if, I try to run actual command, e.g. github create test-repo I'm getting zsh: command not found: github Until now I used simple plugins only with aliases and...

oh-my-zsh installation returns non zero code

docker,oh-my-zsh
I'm trying to install oh-my-zsh as part of a Docker build (using a Dockerfile). Here's the dockerfile line in question: RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh and the error I get is: The command [/bin/sh -c wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh] returned a non-zero code: 1 Full error...

Modify the `edit` binary in os x to a different editor

sublimetext,oh-my-zsh,launch-services
On the command line, I can type edit <folder/file name> and it will open in TextWrangler, which I haven't used in ages. I'm not sure how the edit binary got there — I use oh-my-zsh, potentially relevant. I wanted to change subl to edit (nicer to type) and discovered it...

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

shell,sh,zsh,zshrc,oh-my-zsh
(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 Color black='\033[0;30m' blue='\033[0;34m' green='\033[0;32m' cyan='\033[0;36m' purple='\033[0;35m' yellow='\033[1;33m' lgreen='\033[1;32m'...