Snippets

Giuliano Ribeiro Terminal

Created by Giuliano Ribeiro last modified
alias dps="docker ps"
alias dlogs="docker logs --tail 100"
alias dstart="docker start"
alias dstop="docker stop"

iTerm 2, it's a pain to skip between words.

Here's how you can configure iTerm 2 on OSX to allow you to use ⌥ ← and ⌥→ to do just that.

First you need to set your left ⌥ key to act as an escape character.

Second you need to either locate the current shortcut for ⌥ ← or create a new one, in the Profile Shortcut Keys, with the following settings:

Keyboard Shortcut: ⌥←
Action: Send Escape Sequence
Esc+: b

Third, repeat for the ⌥→ keyboard shortcut with the following settings:

Keyboard Shortcut: ⌥→
Action: Send Escape Sequence
Esc+: f

You're done! Now you can skip entire words on the command line by holding down the left ⌥ key and hitting ← or →

To make this work for the right option key you need to set the key modifier to act as an Escape Sequence, a la the first step.

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH=/Users/gribeiro/.oh-my-zsh

# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
#ZSH_THEME="agnoster"
ZSH_THEME="powerlevel9k/powerlevel9k"
plugins=(git docker scala mercurial sbt)

source $ZSH/oh-my-zsh.sh

alias ls='ls -GFh'
alias ll="ls -lh"
alias gcloud-ilegra="gcloud config configurations activate ilegra"
alias gcloud-gmail="gcloud config configurations activate gmail"
alias gcloud-ancar="gcloud config configurations activate ancar"
alias setmvn="export PATH=$PATH:~/dev/tools/maven35/bin"

source ~/.kube/completion.zsh.inc

# The next line updates PATH for the Google Cloud SDK.
source '/Users/gribeiro/dev/google-cloud-sdk/path.zsh.inc'
# The next line enables shell command completion for gcloud.
autoload -U compinit compdef
compinit
source '/Users/gribeiro/dev/google-cloud-sdk/completion.zsh.inc'

# Setting PATH for Python 3.5
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH

# Disable the shared historic mode from many tabs
unsetopt share_history

# POWERLEVEL9K_MODE='awesome-fontconfig'
# POWERLEVEL9K_MODE='nerdfont-complete'
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon root_indicator dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs load time)
#POWERLEVEL9K_MODE='awesome-patched'

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.