openssl utility functions
[dotfiles] / .bashrc
1 #!/bin/sh
2
3 alias get_aftv="wget --mirror -r ftp://www.africafilms.tv:6382765847@hebergement12.thalix.com --reject '*.sql' --reject '*.gz' --reject '*.back' --reject '*.f4v' --reject '*.metadata' --reject '*.txt' --reject '*.jpg' --reject '*.jpeg' --reject '*.png' --reject '*.gif' --reject '*.swf' --reject '*.xml' --reject '*.flv' --reject '*.wmv' --reject '*.mov' --reject '*.pdf' --reject '*.log*' --reject '*.mp4' --reject '*.svn-base'"
4
5 # python setup.py --command-packages=stdeb.command sdist_dsc
6
7 # dns servers 80.67.169.12 || 2001:910:800::12
8
9 # unicode characters https://en.wikipedia.org/wiki/List_of_Unicode_characters
10
11 # ~/.bashrc: executed by bash(1) for non-login shells.
12 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
13 # for examples
14
15 # vcprompt & other things
16 export PATH=$PATH:$HOME/bin
17
18 # nim lang
19 export PATH=$PATH:$HOME/bin/nim-0.10.2/bin
20
21 # If not running interactively, don't do anything
22 case $- in
23 *i*) ;;
24 *) return;;
25 esac
26
27
28 # make less more friendly for non-text input files, see lesspipe(1)
29 #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
30
31 # set variable identifying the chroot you work in (used in the prompt below)
32 if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
33 debian_chroot=$(cat /etc/debian_chroot)
34 fi
35
36 # set a fancy prompt (non-color, unless we know we "want" color)
37 case "$TERM" in
38 xterm-color) color_prompt=yes;;
39 esac
40
41 # uncomment for a colored prompt, if the terminal has the capability; turned
42 # off by default to not distract the user: the focus in a terminal window
43 # should be on the output of commands, not on the prompt
44 force_color_prompt=yes
45
46 if [ -n "$force_color_prompt" ]; then
47 if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
48 # We have color support; assume it's compliant with Ecma-48
49 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
50 # a case would tend to support setf rather than setaf.)
51 color_prompt=yes
52 else
53 color_prompt=
54 fi
55 fi
56
57 # export command for coloring
58 # '\e[x;ym $PS1 \e[m' or [\033[x;ym\] $PS1 [\033[00m\] x;y being the color pair to use
59
60 if [ "$color_prompt" = yes ]; then
61 #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] $(__git_ps1 "[%s]") \$ '
62 #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] $(vcprompt -f %b%a%m%u) > '
63 if [ $USER='nsukami' ]; then
64 #PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]\h\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] > '
65 #PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]k\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n > '
66 #PS1='${debian_chroot:+($debian_chroot)}\[\033[31m\]\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n '
67 #PS1=$'\u03c6 \w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n '
68 PS1=$'\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n\u21D2 '
69 else
70 PS1='${debian_chroot:+($debian_chroot)}\u@\[\033[31m\]\h\[\033[00m\]:\w \[\033[1;33m\]$(vcprompt -f %b%a%m%u)\[\033[0m\] \n > '
71 fi
72 else
73 #PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w $(__git_ps1 "[%s]") \$ '
74 if [ $USER='nsukami']; then
75 #PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]\h\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) > '
76 PS1='${debian_chroot:+($debian_chroot)}5@\[\033[31m\]k\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) \n > '
77 else
78 PS1='${debian_chroot:+($debian_chroot)}\u@\[\033[31m\]\h\[\033[00m\]:\w $(vcprompt -f %b%a%m%u) \n > '
79 fi
80
81 fi
82 unset color_prompt force_color_prompt
83
84 # If this is an xterm set the title to user@host:dir
85 case "$TERM" in
86 xterm*|rxvt*)
87 PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w $(vcprompt -f %b%a%m%u) \a\]$PS1"
88 ;;
89 *)
90 ;;
91 esac
92
93 # enable color support of ls
94 if [ -x /usr/bin/dircolors ]; then
95 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
96 alias ls='ls --color=auto'
97 fi
98
99
100
101 # enable programmable completion features (you don't need to enable
102 # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
103 # sources /etc/bash.bashrc).
104 if ! shopt -oq posix; then
105 if [ -f /usr/share/bash-completion/bash_completion ]; then
106 . /usr/share/bash-completion/bash_completion
107 elif [ -f /etc/bash_completion ]; then
108 . /etc/bash_completion
109 fi
110 fi
111
112 # start gpg agent
113 # be sure to have done apt install gpg-agent pinentry-curses first
114 eval `gpg-agent --daemon`
115
116 # print available tmux sessions if available
117 tmux list-sessions 2> /dev/null
118
119 # always put prompt at bottom
120 # PS1="\[$(tput cup "$LINES")\]"$PS1
121
122 # Hook for desk activation
123 [ -n "$DESK_ENV" ] && source "$DESK_ENV"
124
125 # Alias definitions.
126 # You may want to put all your additions into a separate file like
127 # ~/.bash_aliases, instead of adding them here directly.
128 # See /usr/share/doc/bash-doc/examples in the bash-doc package.
129 [[ -f ~/.bash_aliases ]] && . ~/.bash_aliases
130
131 # git completion
132 [[ -f ~/.git_completion ]] && . ~/.git_completion
133
134 # personal customization
135 [[ -f ~/.bash_customization ]] && . ~/.bash_customization
136
137 # personal functions
138 [[ -f ~/.bash_function ]] && . ~/.bash_function
139
140 # personal export
141 [[ -f ~/.bash_export ]] && . ~/.bash_export
142
143 # personal color
144 [[ -f ~/.bash_color ]] && . ~/.bash_color
145
146 # personal shopt
147 [[ -f ~/.bash_shopt ]] && . ~/.bash_shopt
148
149 # git completion
150 [[ -f ~/.git_completion ]] && . ~/.git_completion
151
152 # is or is not
153 [[ -f ~/.bash_is ]] && . ~/.bash_is
154
155 # jump to directories
156 [[ -f ~/.bash_marks ]] && . ~/.bash_marks
157
158 # tmux completion script
159 [[ -f ~/.bash_tmux ]] && . ~/.bash_tmux
160
161 # jump completion script
162 [[ -f ~/.bash_compl ]] && . ~/.bash_compl
163
164 # jump completion script
165 [[ -f ~/.bash_base64 ]] && . ~/.bash_base64
166
167 # emacs launcher script
168 [[ -f ~/.bash_emacs ]] && . ~/.bash_emacs
169
170 # memo
171 [[ -f ~/.bash_memo ]] && . ~/.bash_memo
172
173 # custom bindings
174 [[ -f ~/.bash_bind ]] && . ~/.bash_bind
175
176 # custom filters
177 [[ -f ~/.bash_filters ]] && . ~/.bash_filters
178
179 # openssl
180 [[ -f ~/.bash_openssl ]] && . ~/.bash_openssl