alias reload!='. ~/.zshrc'

function apt-search() {
  apt-cache search $1 | grep $1
}

alias apt-install='sudo apt-get install'

function cdls() {
  \cd $@ && ls --color
}
alias cd=cdls

function tunnel() {
  machine="$1"
  port="$2"
  ssh $machine -N -L "${port}:localhost:${port}"
}

function f() {
  if [[ -z "$2" ]]; then
    $2="./"
  fi

  find "$2" -name "$1";
}

alias hibernate="sudo pm-hibernate"
alias mv='nocorrect mv'
alias ls='ls --color'
alias ll='ls -la'
alias rm='trashit'
alias diff=colordiff

# Leiningen
alias leindeps='lein do deps :tree'
alias leincheck='lein do ancient, ancient :plugins, kibit, bikeshed'
alias leincheck2='lein eastwood'

alias reload!='. ~/.zshrc'

function apt-search() {
  apt-cache search $1 | grep $1
}

alias apt-install='sudo apt-get install'

function cdls() {
  \cd $@ && ls --color
}
alias cd=cdls

function tunnel() {
  machine="$1"
  port="$2"
  ssh $machine -N -L "${port}:localhost:${port}"
}

function tunnel() {
  machine="$1"
  port_local="$2"
  port_remote="$2"

  if [ ! -z "$3" ]; then
    port_remote="$3"
  fi;

  echo "ssh $machine -N -L \"${port_local}:localhost:${port_remote}\""
  ssh $machine -N -L "${port_local}:localhost:${port_remote}"
}

function f() {
  if [[ -z "$2" ]]; then
    $2="./"
  fi

  find "$2" -name "$1";
}

alias hibernate="sudo pm-hibernate"
alias mv='nocorrect mv'
alias ls='ls --color'
alias ll='ls -la'
alias rm='trashit'
alias diff=colordiff

# Leiningen
alias leindeps='lein do deps :tree'
alias leincheck='lein do ancient, ancient :plugins, kibit, bikeshed'
alias leincheck2='lein eastwood'

Update tunnel function to take local and remote ports
ZSH: Update tunnel function to take local and remote ports

Signed-off-by: lsenta <93e2db26c7714cc3fb230d05f2fbedc450bb1db9@gmail.com>
