new fortune.
[feisty_meow.git] / scripts / core / common.alias
1 #!/bin/bash
2 ##############
3 # Name   : common.alias
4 # Author : Chris Koeritz
5 # Rights : Copyright (C) 1988-$now by Author
6 ##############
7 # This script is free software; you can modify/redistribute it under the terms
8 # of the GNU General Public License. [ http://www.gnu.org/licenses/gpl.html ]
9 # Feel free to send updates to: [ fred@gruntose.com ]
10 ##############
11
12 # a list of core aliases for feisty meow codebase.
13
14 # repurposes certain commands that feisty meow does a little differently.
15 alias cls='clear_colormap; clear'
16 alias copy='\cp -i -v '
17 alias cp='\cp -i -v '
18 alias cvs='perl $FEISTY_MEOW_SCRIPTS/rev_control/cvs_fix.pl'
19 alias del='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
20 alias deltree='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
21 alias df='\df -mh'
22 alias dir='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl'
23 alias du='\du -h'
24 alias erase='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
25 # elaborate replacement for explorer command, which we shorten to exp.
26 if [ "$OS" != "Windows_NT" ]; then
27   if [ -n "$IS_DARWIN" ]; then
28     # case for mac os x.
29     alias exp='open'
30   elif [ ! -z "$(which nautilus)" ]; then
31     # we prefer nautilus if available.
32     alias exp='nautilus'
33   else
34     # last ditch is konqueror browser.
35     alias exp='konqueror'
36   fi
37 else
38   # windows gets routed to our helpful script instead.
39   alias exp="bash $FEISTY_MEOW_SCRIPTS/winders/exploder.sh"
40 fi
41 # re-use work we did on 'exp' macro for longer command.
42 alias explorer=exp
43 alias l='\ls -hFC $color_add'
44 alias ls='\ls -hFC $color_add'
45 alias lsd='ls -hl'
46 alias md='mkdir'
47 alias more='less'
48 alias move='mv -i -v '
49 alias mv='\mv -i -v '
50 alias notepad='gedit'
51 alias pwd="/bin/pwd|sed -e 's/^\/home\/$USER/~/'"
52 alias rd='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl'
53 alias ren='\mv -v -i '
54 alias rm='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
55 alias rmdir='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl'
56 alias path='echo $PATH'
57 alias whence=which
58
59 ##############
60
61 # some aliases that are just generally nice to have.
62 alias aliases=alias
63 alias calc='kcalc'
64 alias cd..='\cd ..'
65 alias cd...='\cd ../..'
66 alias cd....='\cd ../../..'
67 alias cd.....='\cd ../../../..'
68 alias mo='less'
69 alias np='gvim'
70 alias up='cd ..'
71
72 ##############
73
74 # extended aliases for meta-operations.
75 alias dvd_rip='vobcopy -m'
76 alias blu_rip='echo "what would this command be?"'
77 alias mplayer='\mplayer -ao arts'
78 alias play='bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh'
79
80 ##############
81
82 # some really eccentric feisty meow aliases...
83
84 # says goodbye when leaving a shell.
85 alias bye='. $FEISTY_MEOW_SCRIPTS/users/goodbye.sh'
86 alias cputemp='acpi -t'
87 # makes root user's home directory's permissions right.
88 alias reroot='chown -R root:root /root'
89 # yes, these are really helpful...
90 alias whereami='echo whoa dude, try not to think about it...'
91 alias why='echo just because.'
92
93 # done with loading up regular aliases now...
94
95 ##############
96
97 # call the generated aliases file, if it exists.
98 if [ -f "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh" ]; then 
99   if [ ! -z "$SHELL_DEBUG" ]; then echo loading script aliases...; fi
100   source "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh"
101   if [ ! -z "$SHELL_DEBUG" ]; then echo done loading script aliases.; fi
102 fi
103
104 ##############
105
106 # remove the fredization macro if it was defined, helping to avoid running
107 # the shell scripts twice for users like root that don't always load this
108 # stuff.
109 unalias fredme &>/dev/null
110
111 ##############
112