Browse code

Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh

Claus Witt authored on 26/01/2011 at 10:07:25
Showing 5 changed files
... ...
@@ -21,3 +21,5 @@ alias ll='ls -l'
21 21
 alias sl=ls # often screw this up
22 22
 
23 23
 alias afind='ack-grep -il'
24
+
25
+alias x=extract
... ...
@@ -34,5 +34,3 @@ ZSH_THEME_GIT_PROMPT_CLEAN=""               # Text to display if the branch is c
34 34
 # Setup the prompt with pretty colors
35 35
 setopt prompt_subst
36 36
 
37
-# Load the theme
38
-source "$ZSH/themes/$ZSH_THEME.zsh-theme"
39 37
\ No newline at end of file
... ...
@@ -37,3 +37,39 @@ function take() {
37 37
   mkdir -p $1
38 38
   cd $1
39 39
 }
40
+
41
+function extract() {
42
+    unset REMOVE_ARCHIVE
43
+    
44
+    if test "$1" = "-r"; then
45
+        REMOVE=1
46
+        shift
47
+    fi
48
+  if [[ -f $1 ]]; then
49
+    case $1 in
50
+      *.tar.bz2) tar xvjf $1;;
51
+      *.tar.gz) tar xvzf $1;;
52
+      *.tar.xz) tar xvJf $1;;
53
+      *.tar.lzma) tar --lzma -xvf $1;;
54
+      *.bz2) bunzip $1;;
55
+      *.rar) unrar $1;;
56
+      *.gz) gunzip $1;;
57
+      *.tar) tar xvf $1;;
58
+      *.tbz2) tar xvjf $1;;
59
+      *.tgz) tar xvzf $1;;
60
+      *.zip) unzip $1;;
61
+      *.Z) uncompress $1;;
62
+      *.7z) 7z x $1;;
63
+      *) echo "'$1' cannot be extracted via >extract<";;
64
+    esac
65
+
66
+    if [[ $REMOVE_ARCHIVE -eq 1 ]]; then
67
+        echo removing "$1";
68
+        /bin/rm "$1";
69
+    fi
70
+
71
+  else
72
+    echo "'$1' is not a valid file"
73
+  fi
74
+}
75
+
... ...
@@ -14,6 +14,9 @@ for config_file ($ZSH/custom/*.zsh) source $config_file
14 14
 plugin=${plugin:=()}
15 15
 for plugin ($plugins) source $ZSH/plugins/$plugin/$plugin.plugin.zsh
16 16
 
17
+# Load the theme
18
+source "$ZSH/themes/$ZSH_THEME.zsh-theme"
19
+
17 20
 # Check for updates on initial load...
18 21
 if [ "$DISABLE_AUTO_UPDATE" = "true" ]
19 22
 then
... ...
@@ -1,6 +1,16 @@
1
-# Comment 
1
+# Comment
2 2
 
3
-ZSH_THEME_GIT_PROMPT_PREFIX=' (git:'
4
-ZSH_THEME_GIT_PROMPT_SUFFIX=')'
3
+PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}'
5 4
 
6
-PROMPT='%{$fg[magenta]%}[%c]$(git_prompt_info) $ %{$reset_color%}'
7 5
\ No newline at end of file
6
+RPROMPT='%{$fg[magenta]%}$(git_prompt_info)%{$reset_color%} $(git_prompt_status)%{$reset_color%}'
7
+
8
+ZSH_THEME_GIT_PROMPT_PREFIX=""
9
+ZSH_THEME_GIT_PROMPT_SUFFIX=""
10
+ZSH_THEME_GIT_PROMPT_DIRTY=""
11
+ZSH_THEME_GIT_PROMPT_CLEAN=""
12
+ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈"
13
+ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭"
14
+ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗"
15
+ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦"
16
+ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂"
17
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱"
8 18
\ No newline at end of file