X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Fcommon.alias;h=9d4049e5d253fade8e7cd2a325a24c5b94004d18;hb=b387a9ea45d480b8addb10258cf19aa671b3671d;hp=54f0e95519c4292bd69c9a922c55fd3e05bd2497;hpb=59c7011aceee4a122495f92de0dc191fbb4f8293;p=feisty_meow.git diff --git a/scripts/core/common.alias b/scripts/core/common.alias index 54f0e955..9d4049e5 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -1,91 +1,141 @@ -# common aliases for feisty_meow are located here. -# most of these should work in any bash environment... -# although some may require more than bash, like the aliases -# that invoke perl scripts. +#!/bin/bash +############## +# Name : common.alias +# Author : Chris Koeritz +# Rights : Copyright (C) 1988-$now by Author +############## +# This script is free software; you can modify/redistribute it under the terms +# of the GNU General Public License. [ http://www.gnu.org/licenses/gpl.html ] +# Feel free to send updates to: [ fred@gruntose.com ] +############## + +# a list of core aliases for feisty meow codebase. # repurposes certain commands that feisty meow does a little differently. -alias cls='clear_colormap; clear' -alias copy='\cp -i -v ' -alias cp='\cp -i -v ' -alias cvs='perl $FEISTY_MEOW_SCRIPTS/rev_control/cvs_fix.pl' -alias del='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl' -alias deltree='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl' -alias df='\df -m' -alias dir='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl' -alias du='\du -h' -alias erase='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl' -alias l='\ls -FC $color_add' -alias ls='\ls -FC $color_add' -alias lsd='ls -l' -alias md='mkdir' -alias more='less' -alias move='mv -i -v ' -alias mv='\mv -i -v ' -alias rd='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl' -alias ren='\mv -v -i ' -alias rm='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl' -alias rmdir='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl' -alias path='echo $PATH' -alias whence=which +define_yeti_alias cls='clear_colormap; clear' +define_yeti_alias copy='\cp -i -v' +define_yeti_alias cp='\cp -i -v' +define_yeti_alias del='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl' +define_yeti_alias deltree='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl' +define_yeti_alias df='\df -mh' +define_yeti_alias dir='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl' +define_yeti_alias du='\du -h' +define_yeti_alias erase='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl' +# elaborate replacement for filesystem explorer command, which we have +# shortened to "exp". +if [ "$OS" != "Windows_NT" ]; then + if [ -n "$IS_DARWIN" ]; then + # case for mac os x. + define_yeti_alias exp='open' + elif [ ! -z "$(which nautilus 2>/dev/null)" ]; then + # we prefer nautilus if available. + define_yeti_alias exp='nautilus' + else + # last ditch is konqueror browser. + define_yeti_alias exp='konqueror' + fi +else + # windows gets routed to our helpful script instead. + define_yeti_alias exp="bash $FEISTY_MEOW_SCRIPTS/files/exploder.sh" +fi +# re-use work we did on 'exp' macro for the longer windows command. +define_yeti_alias explorer=exp +define_yeti_alias fix_ssh_perms='chmod 700 $HOME/.ssh ; chmod 600 $HOME/.ssh/*' +define_yeti_alias halt='sudo shutdown -h now' +define_yeti_alias i=inventory +define_yeti_alias l='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl' +define_yeti_alias ls='ls -HhFC $color_add' +define_yeti_alias lsd='ls -hl' +define_yeti_alias md='mkdir' +define_yeti_alias move='mv -i -v' +define_yeti_alias mv='\mv -i -v' +define_yeti_alias netcp='rsync -avz' +define_yeti_alias notepad='gedit' +define_yeti_alias pwd="/bin/pwd|sed -e 's/^\/home\/$USER/~/'" +define_yeti_alias rd='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl' +define_yeti_alias ren='\mv -v -i' +define_yeti_alias rm='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl' +define_yeti_alias rmdir='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl' +define_yeti_alias s='echo "##############"' +define_yeti_alias path='echo $PATH' +define_yeti_alias whence=which + +define_yeti_alias less='lesser' +define_yeti_alias mo='lesser' +define_yeti_alias more='lesser' +define_yeti_alias lesser='bash $FEISTY_MEOW_SCRIPTS/files/lesser.sh' + +############## # some aliases that are just generally nice to have. -alias aliases=alias -alias calc='kcalc' -alias cd..='\cd ..' -alias cd...='\cd ../..' -alias cd....='\cd ../../..' -alias cd.....='\cd ../../../..' -alias mo='less' -alias np='gvim' -alias up='cd ..' +define_yeti_alias aliases=alias +define_yeti_alias calc='kcalc' +define_yeti_alias cd..='\cd ..' +define_yeti_alias cd...='\cd ../..' +define_yeti_alias cd....='\cd ../../..' +define_yeti_alias cd.....='\cd ../../../..' +define_yeti_alias np='gvim' +define_yeti_alias up='cd ..' + +############## + +# some information about the feisty meow codebase itself. + +define_yeti_alias feisty_branch='pushd $FEISTY_MEOW_APEX ; git branch ; popd' + +############## + +# some important retreads on aliases that provide a sudo-ized version of other scripts. + +define_yeti_alias standup="bash \"$FEISTY_MEOW_SCRIPTS/site_avenger/standup.sh\"" + +#hmmm: some magma intrusions from the fred customizations... +define_yeti_alias revamp_web_permissions="bash \"$FEISTY_MEOW_SCRIPTS/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh" + +############## # extended aliases for meta-operations. -alias dvd_rip='vobcopy -m' -alias mplayer='\mplayer -ao arts' -alias play='bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh' +define_yeti_alias dvd_rip='vobcopy -m' +define_yeti_alias blu_rip='echo "what would this command be?"' +define_yeti_alias mplayer='\mplayer -ao arts' +define_yeti_alias play='bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh' -# some really eccentric feisty meow aliases... +############## -alias bye='. $FEISTY_MEOW_SCRIPTS/users/goodbye.sh' +# some really eccentric feisty meow aliases... -# redoes fred's set of custom scripts. -alias recustomize='cpdiff $FEISTY_MEOW_DIR/examples/custom_overrides/fred $FEISTY_MEOW_GENERATED/custom' +# says goodbye when leaving a shell. +define_yeti_alias bye='. $FEISTY_MEOW_SCRIPTS/processes/goodbye.sh' +define_yeti_alias cputemp='acpi -t' # makes root user's home directory's permissions right. -alias reroot='chown -R root:root /root' +define_yeti_alias reroot='chown -R root:root /root' +# yes, these are really helpful... +define_yeti_alias whoareyou='echo -e "Hello, I am a computer named $(hostname)\nand I'\''m very pleased to meet you."' +define_yeti_alias whereami='echo whoa dude, try not to think about it...' +define_yeti_alias why='echo We all wonder what the point of the universe is at times. If you figure it all out, please write us.' -#hmmm: move these to the custom area? -if [ "$OS" != "Windows_NT" ]; then - if [ -n "$IS_DARWIN" ]; then - # case for mac os x. - alias exp='open' - elif [ ! -z "$(which nautilus)" ]; then - alias exp='nautilus' - else -#check if konqueror exists also? fall back to uhhh midnight cmdr? - alias exp='konqueror' - fi -else - alias explorer="bash $FEISTY_MEOW_SCRIPTS/winders/exploder.sh" - alias exp="bash $FEISTY_MEOW_SCRIPTS/winders/exploder.sh" -fi -alias pwd="/bin/pwd|sed -e 's/^\/home\/$USER/~/'" -alias notepad='gedit' -if [ "$OS" = "Windows_NT" ]; then - # aliases we only use on the winders side. - alias vi='gvim' -fi -alias whereami='echo whoa dude, try not to think about it...' -alias why='echo just because.' +# done with loading up regular aliases now... + +############## # call the generated aliases file, if it exists. -if [ -f "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh" ]; then - if [ ! -z "$SHELL_DEBUG" ]; then echo launching generated aliases.; fi - source "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh" - if [ ! -z "$SHELL_DEBUG" ]; then echo done with generated aliases.; fi +if [ -f "$FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh" ]; then + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo loading script aliases...; fi + source "$FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh" + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo done loading script aliases.; fi fi +############## + # remove the fredization macro if it was defined, helping to avoid running # the shell scripts twice for users like root that don't always load this # stuff. -unalias fredme >/dev/null 2>&1 +unalias fredme &>/dev/null + +############## + +# set the sentinel alias that says this file was handled. +alias CORE_ALIASES_LOADED=true + +##############