File tree Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ if  [ " $0 " ==  " $BASH_SOURCE " ;  then 
3+  echo  >&2  " Setup script has to be sourced, not run with sh. Aborting..." 
4+  exit  1
5+ fi 
6+ if  [ !  -e  ~ /.sp ] ;  then 
7+  touch ~ /.sp
8+ fi 
9+ if  [ $( uname -o) ==  " Cygwin" ;  then 
10+  (set -o igncr) 2> /dev/null &&  set  -o igncr; 
11+ fi 
12+ echo  " 
13+ ################################################################################ 
14+ #Hide user name and host in terminal  
15+ #export PS1="  \w $ " 
16+ #Make ls every time a terminal opens 
17+ ls 
18+ #cd + ls 
19+ function cs () { 
20+  cd \$ 1 
21+  ls -a 
22+ } 
23+ #transfer path: save the current path to a hidden file 
24+ function tp () { 
25+  pwd > ~/.sp 
26+ } 
27+ #goto transfer path: goes where the previously saved tp points 
28+ function gtp () { 
29+  cs \` cat ~/.sp\`  
30+ } 
31+ #cat with color 
32+ function ccat () { 
33+  source-highlight -fesc -i \$ 1 
34+ } 
35+ #Remove trash from terminal and runs program in background 
36+ function evince () { 
37+  /usr/bin/evince \$ * 2> /dev/null & disown 
38+ } 
39+ function gedit (){ 
40+  /usr/bin/gedit \$ * 2> /dev/null & disown 
41+ } 
42+ # up N: moves N times upwards (cd ../../../{N}) 
43+ function up () { 
44+  LIMIT=\$ 1 
45+  P=\$ PWD 
46+  for ((i=1; i <= LIMIT; i++)) 
47+  do 
48+  P=\$ P/.. 
49+  done 
50+  cs \$ P 
51+  export MPWD=\$ P 
52+ } 
53+ " >>  ~ /.bashrc
54+ source  ~ /.bashrc
55+ if  [ $( uname -o) ==  " Cygwin" ;  then 
56+  if  [ command  -v dos2unix > /dev/null 2>&1  ];  then 
57+  dos2unix $INTENDED_BASH_PATH 
58+  fi 
59+ fi 
60+ if  [ !  -f  ~ /.bash_profile ];  then 
61+  echo  " .bash_profile not found. Creating..." 
62+  echo  " 
63+ # include .bashrc if it exists 
64+ if [ -f "  \$ HOME/.bashrc"  ]; then
65+ . "  \$ HOME/.bashrc" 
66+ fi 
67+  "   >  ~ /.bash_profile
68+ fi 
69+ echo  " .bashrc updated!" 
                         You can’t perform that action at this time. 
           
                  
0 commit comments