From fd669f22a4ff15e401979bb93cb6249b7b2a1557 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 12 Mar 2012 19:49:46 -0400 Subject: [PATCH] Fix open on Linux, close #24 --- alias.zsh | 10 +++++----- environment.zsh | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/alias.zsh b/alias.zsh index 38499d5..5408b9f 100644 --- a/alias.zsh +++ b/alias.zsh @@ -57,8 +57,11 @@ alias scp='nocorrect scp' alias type='type -a' # Mac OS X -if [[ "$OSTYPE" != darwin* ]]; then - alias open='xdg-open' +if [[ "$OSTYPE" == darwin* ]]; then + alias o='open' + alias get='curl --continue-at - --location --progress-bar --remote-name' +else + alias o='xdg-open' alias get='wget --continue --progress=bar' if (( $+commands[xclip] )); then @@ -70,11 +73,8 @@ if [[ "$OSTYPE" != darwin* ]]; then alias pbcopy='xsel --clipboard --input' alias pbpaste='xsel --clipboard --output' fi -else - alias get='curl --continue-at - --location --progress-bar --remote-name' fi -alias o='open' alias pbc='pbcopy' alias pbp='pbpaste' diff --git a/environment.zsh b/environment.zsh index d00d7a5..aaff855 100644 --- a/environment.zsh +++ b/environment.zsh @@ -76,12 +76,12 @@ if zstyle -t ':omz:environment:grep' color; then fi # Browser (Default) -if (( $+commands[xdg-open] )); then - export BROWSER='xdg-open' -fi - -if (( $+commands[open] )); then +if [[ "$OSTYPE" == darwin* ]]; then export BROWSER='open' +else + if (( $+commands[xdg-open] )); then + export BROWSER='xdg-open' + fi fi # Less