#!/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 ] ############## # this file provides a list of core aliases for feisty meow codebase. ############## # make our functions available to the aliases. #hmmm: should this be necessary? will it even work? source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" ############## # call the generated aliases file, if it exists. # we do this first so that our core aliases get a chance to override the aliases # based on scripts. 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 ############## # repurposes certain commands that feisty meow does a little differently. 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 dolphin 2>/dev/null)" ]; then # we prefer dolphin if available. define_yeti_alias exp='screen -L -S dolphin-$RANDOM -d -m dolphin ' #--select elif [ ! -z "$(which nautilus 2>/dev/null)" ]; then # launch 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 get_feisty='rpuffer $FEISTY_MEOW_APEX; regenerate' 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 ll='ls_dot_add=-a 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. define_yeti_alias aliases=alias define_yeti_alias calc='galculator' 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 snarf_linux_config="sudo -E PERLLIB=\$PERLLIB perl \$FEISTY_MEOW_SCRIPTS/archival/snarf_linux_config.pl" define_yeti_alias add_domain="sudo bash \$FEISTY_MEOW_SCRIPTS/system/add_domain.sh" define_yeti_alias remove_domain="sudo bash \$FEISTY_MEOW_SCRIPTS/system/remove_domain.sh" define_yeti_alias add_apache_site="sudo bash \$FEISTY_MEOW_SCRIPTS/system/add_apache_site.sh" define_yeti_alias remove_apache_site="sudo bash \$FEISTY_MEOW_SCRIPTS/system/remove_apache_site.sh" define_yeti_alias add_swap_mount="sudo bash \$FEISTY_MEOW_SCRIPTS/system/add_swap_mount.sh" ############## # extended aliases for meta-operations. 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... # 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. define_yeti_alias reroot='chown -R root:root /root' # space 'em all fixes naming for all of the files of the appropriate types in the current directory. define_yeti_alias spacemall="find . -maxdepth 1 -mindepth 1 -type f \( $(echo pdf png jpg jpeg odt ods docx m4a mp3 eml html mov pptx xlsx | sed -e 's/\([a-z0-9][a-z0-9]*\)/-iname \"*.\1\" -o /g') -iname \"*.txt\" \) -exec bash "$FEISTY_MEOW_SCRIPTS/files/spacem.sh" \"{}\" \; " #2>> ~/.tmp/zz_spacem.log' # yes, these what/who/why functions are really helpful... define_yeti_alias whoareyou='echo -e "Hello, I am a computer named $(hostname)\nand I am 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.' # done with loading up regular aliases now... ############## # remove the "fredization" or "feistymeowization" macros if they're defined, # which reduces the chance of loading the shell environment twice for users # like root that don't load feisty meow automatically. unalias fredme feistyme &>/dev/null ##############