Browse code

bashrc - v1.2 - see Versions section for details

Fred authored on06/07/2014 18:18:23
Showing1 changed files
... ...
@@ -1,8 +1,8 @@
1 1
 # Title: .bashrc
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 1.1
3
+# Version: 1.2
4 4
 # Created in: 2012-05-26
5
-# Modified in: 2014-07-02
5
+# Modified in: 2014-07-06
6 6
 
7 7
 
8 8
 
... ...
@@ -10,9 +10,8 @@
10 10
 # Comments #
11 11
 #==========#
12 12
 
13
-# ~/.bashrc: executed by bash(1) for non-login shells.
14
-# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
15
-# for examples
13
+# ~/.bashrc: executed by bash(1) for non-login shells
14
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) for examples
16 15
 
17 16
 
18 17
 
... ...
@@ -20,6 +19,7 @@
20 19
 # Versions #
21 20
 #==========#
22 21
 
22
+# v1.2 - 2014-07-06: h and t aliases corrected / m alias added / quit function added / R env variables added
23 23
 # v1.1 - 2014-07-02: bug corrections in trash function and EDITOR set up / exit and diff aliases added
24 24
 # v1.0 - 2014-06-22: file reorganization / aliases added
25 25
 # v0.0 - 2012-05-26: creation
... ...
@@ -215,8 +215,9 @@ alias du="du -h"
215 215
 # Misc short aliases
216 216
 alias c="cat"
217 217
 alias g="grep"
218
-alias h="head -15"
219
-alias t="tail -15"
218
+alias h="head"
219
+alias t="tail"
220
+alias m="more"
220 221
 alias bye="exit"
221 222
 
222 223
 
... ...
@@ -329,7 +330,6 @@ else
329 330
 fi
330 331
 
331 332
 
332
-
333 333
 # Backup function
334 334
 function bk {
335 335
 	if [[ -f "$1" || -d "$1" ]]
... ...
@@ -342,6 +342,20 @@ function bk {
342 342
 }
343 343
 
344 344
 
345
+# Quit function
346
+function q {
347
+    read -a ans -p "Do you want to exit [Y/n]? "
348
+
349
+    if [[ -z $ans ]] ; then ans=Y ; fi
350
+
351
+    case $ans in
352
+        Y|y|yes ) exit ;;
353
+        N|n|no  ) ;;
354
+        *       ) echo "Wrong choice" ;;
355
+    esac
356
+}
357
+
358
+
345 359
 
346 360
 #================================================#
347 361
 # User specific environment and startup programs #
... ...
@@ -361,4 +375,9 @@ export PATH="$HOME/.local/bin:$PATH"
361 375
 
362 376
 
363 377
 # LaTeX environment
364
-export TEXMFHOME=$HOME/.texmf
378
+export TEXMFHOME="$HOME/.texmf"
379
+
380
+
381
+# R environment
382
+export R_HISTFILE="$HOME/.Rhistory"
383
+export R_HISTSIZE=$HISTSIZE