From: Chris Koeritz Date: Sat, 28 Jan 2012 19:59:12 +0000 (-0500) Subject: moving towards better ending for alias files. X-Git-Tag: 2.140.90~1656^2~11 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=59b77297ccc18200384ec402bb8d4383386b8141;hp=557963342697ab57c0af379a39a5e87ade7ab3cc;p=feisty_meow.git moving towards better ending for alias files. --- diff --git a/scripts/core/common.alias b/scripts/core/common.alias new file mode 100644 index 00000000..b3b738ef --- /dev/null +++ b/scripts/core/common.alias @@ -0,0 +1,83 @@ +# common aliases for feisty_meow are located here. +# most should work in any bash environment. + +alias aliases=alias +#alias arch='if [ -f /bin/arch ]; then /bin/arch; else uname -m; fi' +alias cd..='\cd ..' +alias cd...='\cd ../..' +alias cd....='\cd ../../..' +alias cd.....='\cd ../../../..' +alias copy='\cp -i -v ' +alias cp='\cp -i -v ' +alias cvs='perl $SHELLDIR/rev_control/cvs_fix.pl' +alias del='perl $SHELLDIR/files/safedel.pl' +alias deltree='perl $SHELLDIR/files/safedel.pl' +alias df='\df -m' +alias dir='perl $SHELLDIR/files/summing_dir.pl' +alias du='\du -h' +alias dvd_rip='vobcopy -m' +alias erase='perl $SHELLDIR/files/safedel.pl' +alias l='\ls -FC $color_add' +alias ls='\ls -FC $color_add' +alias lsd='ls -l' +alias md='mkdir' +alias mo='less' +alias more='less' +alias move='mv -i -v ' +alias mplayer='\mplayer -ao arts' +alias mv='\mv -i -v ' +alias np='gvim' +alias path='echo $PATH' +alias play='bash $SHELLDIR/multimedia/sound_play.sh' +alias rmdir='perl $SHELLDIR/files/zapdirs.pl' +alias rd='perl $SHELLDIR/files/zapdirs.pl' +#regen-- this might be better as a function. +alias regenerate='bash $SHELLDIR/core/bootstrap_shells.sh ; perl $SHELLDIR/core/generate_aliases.pl ; echo ; nechung' +alias reroot='chown -R root:root /root' +alias rm='perl $SHELLDIR/files/safedel.pl' +alias ren='\mv -v -i ' +alias up='cd ..' +alias whence=which +alias xterm='xterm $myxtermflags' +alias xtroff='xtroff $myxflags' + +#hmmm: move these to the custom area? +# Standard CAK aliases that add to or extend Unix commands. +alias bye='. $SHELLDIR/core/goodbye.sh' +alias calc='kcalc' +alias cls='clear_colormap; clear' +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 $SHELLDIR/winders/exploder.sh" + alias exp="bash $SHELLDIR/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.' + +# call the generated aliases file, if it exists. +if [ -f "$GENERADIR/p_alias.sh" ]; then + if [ ! -z "$SHELL_DEBUG" ]; then echo launching generated aliases.; fi + source $GENERADIR/p_alias.sh + if [ ! -z "$SHELL_DEBUG" ]; then echo done with generated 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 + diff --git a/scripts/core/common_aliases.txt b/scripts/core/common_aliases.txt deleted file mode 100644 index b3b738ef..00000000 --- a/scripts/core/common_aliases.txt +++ /dev/null @@ -1,83 +0,0 @@ -# common aliases for feisty_meow are located here. -# most should work in any bash environment. - -alias aliases=alias -#alias arch='if [ -f /bin/arch ]; then /bin/arch; else uname -m; fi' -alias cd..='\cd ..' -alias cd...='\cd ../..' -alias cd....='\cd ../../..' -alias cd.....='\cd ../../../..' -alias copy='\cp -i -v ' -alias cp='\cp -i -v ' -alias cvs='perl $SHELLDIR/rev_control/cvs_fix.pl' -alias del='perl $SHELLDIR/files/safedel.pl' -alias deltree='perl $SHELLDIR/files/safedel.pl' -alias df='\df -m' -alias dir='perl $SHELLDIR/files/summing_dir.pl' -alias du='\du -h' -alias dvd_rip='vobcopy -m' -alias erase='perl $SHELLDIR/files/safedel.pl' -alias l='\ls -FC $color_add' -alias ls='\ls -FC $color_add' -alias lsd='ls -l' -alias md='mkdir' -alias mo='less' -alias more='less' -alias move='mv -i -v ' -alias mplayer='\mplayer -ao arts' -alias mv='\mv -i -v ' -alias np='gvim' -alias path='echo $PATH' -alias play='bash $SHELLDIR/multimedia/sound_play.sh' -alias rmdir='perl $SHELLDIR/files/zapdirs.pl' -alias rd='perl $SHELLDIR/files/zapdirs.pl' -#regen-- this might be better as a function. -alias regenerate='bash $SHELLDIR/core/bootstrap_shells.sh ; perl $SHELLDIR/core/generate_aliases.pl ; echo ; nechung' -alias reroot='chown -R root:root /root' -alias rm='perl $SHELLDIR/files/safedel.pl' -alias ren='\mv -v -i ' -alias up='cd ..' -alias whence=which -alias xterm='xterm $myxtermflags' -alias xtroff='xtroff $myxflags' - -#hmmm: move these to the custom area? -# Standard CAK aliases that add to or extend Unix commands. -alias bye='. $SHELLDIR/core/goodbye.sh' -alias calc='kcalc' -alias cls='clear_colormap; clear' -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 $SHELLDIR/winders/exploder.sh" - alias exp="bash $SHELLDIR/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.' - -# call the generated aliases file, if it exists. -if [ -f "$GENERADIR/p_alias.sh" ]; then - if [ ! -z "$SHELL_DEBUG" ]; then echo launching generated aliases.; fi - source $GENERADIR/p_alias.sh - if [ ! -z "$SHELL_DEBUG" ]; then echo done with generated 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 - diff --git a/scripts/core/unter_alia.sh b/scripts/core/unter_alia.sh index ed3e32eb..644ca298 100644 --- a/scripts/core/unter_alia.sh +++ b/scripts/core/unter_alia.sh @@ -3,7 +3,7 @@ # generates alias files for different operating systems and shell scripts. # # This script generates command alias definitions for a variety of different -# shells. The "common_aliases.txt" file is used in all of the generated +# shells. The "common.alias" file is used in all of the generated # files as a base set of generally useful aliases. Then the appropriate # shell's specific aliases are added in; these are named after the shell that # they support, e.g. "sh_aliases.txt" is used with the sh and bash shells. diff --git a/scripts/examples/custom_overrides/fred/c_common_aliases.txt b/scripts/examples/custom_overrides/fred/c_common_aliases.txt deleted file mode 100644 index 94fbaf1a..00000000 --- a/scripts/examples/custom_overrides/fred/c_common_aliases.txt +++ /dev/null @@ -1,10 +0,0 @@ - -# some aliases that i don't expect very many people to ever want. they are -# based on some of the mount configurations available at home or abroad. - -alias moo='check_mount /z/stuffing ; check_mount /z/walrus ; check_mount /z/chunky ' -alias unmoo='umount /z/stuffing ; umount /z/walrus ; umount /z/chunky ' - -alias refred='(chown -R fred:fred /home/fred /usr/local/games /home/archives /fatty /clutterato /var/spool/mail/fred ; normal_perm /var/log )' - - diff --git a/scripts/examples/custom_overrides/fred/fred_common.aliases b/scripts/examples/custom_overrides/fred/fred_common.aliases new file mode 100644 index 00000000..94fbaf1a --- /dev/null +++ b/scripts/examples/custom_overrides/fred/fred_common.aliases @@ -0,0 +1,10 @@ + +# some aliases that i don't expect very many people to ever want. they are +# based on some of the mount configurations available at home or abroad. + +alias moo='check_mount /z/stuffing ; check_mount /z/walrus ; check_mount /z/chunky ' +alias unmoo='umount /z/stuffing ; umount /z/walrus ; umount /z/chunky ' + +alias refred='(chown -R fred:fred /home/fred /usr/local/games /home/archives /fatty /clutterato /var/spool/mail/fred ; normal_perm /var/log )' + +