44cf303cca84551dbff14aa8732f4312dcf770c4
[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 # common aliases for feisty_meow are located here.
13 # most of these should work in any bash environment...
14 # although some may require more than bash, like the aliases
15 # that invoke perl scripts.
16
17 ##############
18
19 # repurposes certain commands that feisty meow does a little differently.
20 alias cls='clear_colormap; clear'
21 alias copy='\cp -i -v '
22 alias cp='\cp -i -v '
23 alias cvs='perl $FEISTY_MEOW_SCRIPTS/rev_control/cvs_fix.pl'
24 alias del='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
25 alias deltree='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
26 alias df='\df -mh'
27 alias dir='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl'
28 alias du='\du -h'
29 alias erase='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
30 # elaborate replacement for explorer command, which we shorten to exp.
31 if [ "$OS" != "Windows_NT" ]; then
32   if [ -n "$IS_DARWIN" ]; then
33     # case for mac os x.
34     alias exp='open'
35   elif [ ! -z "$(which nautilus)" ]; then
36     # we prefer nautilus if available.
37     alias exp='nautilus'
38   else
39     # last ditch is konqueror browser.
40     alias exp='konqueror'
41   fi
42 else
43   # windows gets routed to our helpful script instead.
44   alias exp="bash $FEISTY_MEOW_SCRIPTS/winders/exploder.sh"
45 fi
46 # re-use work we did on 'exp' macro for longer command.
47 alias explorer=exp
48 alias l='\ls -hFC $color_add'
49 alias ls='\ls -hFC $color_add'
50 alias lsd='ls -hl'
51 alias md='mkdir'
52 alias more='less'
53 alias move='mv -i -v '
54 alias mv='\mv -i -v '
55 alias notepad='gedit'
56 alias pwd="/bin/pwd|sed -e 's/^\/home\/$USER/~/'"
57 alias rd='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl'
58 alias ren='\mv -v -i '
59 alias rm='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
60 alias rmdir='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl'
61 alias path='echo $PATH'
62 alias whence=which
63
64 ##############
65
66 # some aliases that are just generally nice to have.
67 alias aliases=alias
68 alias calc='kcalc'
69 alias cd..='\cd ..'
70 alias cd...='\cd ../..'
71 alias cd....='\cd ../../..'
72 alias cd.....='\cd ../../../..'
73 alias mo='less'
74 alias np='gvim'
75 alias up='cd ..'
76
77 ##############
78
79 # extended aliases for meta-operations.
80 alias dvd_rip='vobcopy -m'
81 alias blu_rip='echo "what would this command be?"'
82 alias mplayer='\mplayer -ao arts'
83 alias play='bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh'
84
85 ##############
86
87 # some really eccentric feisty meow aliases...
88
89 # says goodbye when leaving a shell.
90 alias bye='. $FEISTY_MEOW_SCRIPTS/users/goodbye.sh'
91 alias cputemp='acpi -t'
92 # redoes fred's set of custom scripts.
93 alias recustomize='regenerate >/dev/null; echo "copying custom overrides for fred..."; cpdiff $FEISTY_MEOW_DIR/customizing/fred $FEISTY_MEOW_GENERATED/custom; regenerate'
94 # makes root user's home directory's permissions right.
95 alias reroot='chown -R root:root /root'
96 # yes, these are really helpful...
97 alias whereami='echo whoa dude, try not to think about it...'
98 alias why='echo just because.'
99
100 # done with loading up regular aliases now...
101
102 ##############
103
104 # call the generated aliases file, if it exists.
105 if [ -f "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh" ]; then 
106   if [ ! -z "$SHELL_DEBUG" ]; then echo loading script aliases...; fi
107   source "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh"
108   if [ ! -z "$SHELL_DEBUG" ]; then echo done loading script aliases.; fi
109 fi
110
111 ##############
112
113 # remove the fredization macro if it was defined, helping to avoid running
114 # the shell scripts twice for users like root that don't always load this
115 # stuff.
116 unalias fredme &>/dev/null
117
118 ##############
119