home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20120305.etc.tar.gz / bradford.20120305.etc.tar / etc / profile.d / alias.ash next >
Text File  |  2005-08-18  |  2KB  |  68 lines

  1. # /etc/profile.d/alias.ash for SuSE Linux
  2. #
  3. # The ash shell does not have an alias builtin in
  4. # therefore we use functions here. This is a seperate
  5. # file because other shells may run into trouble
  6. # if they parse this even if they do not expand.
  7. #
  8. suspend () { local -; set +j; kill -TSTP 0; }
  9. #
  10. # A bug? the builtin bltin is missed and mapped
  11. # to the builtin command.
  12. #
  13. bltin () { command ${1+"$@"}; }
  14. pushd () {
  15.     local SAVE=`pwd`
  16.     if test -z "$1" ; then
  17.     if test -z "$DSTACK" ; then
  18.         echo "pushd: directory stack empty." 1>&2
  19.         return 1
  20.     fi
  21.     set $DSTACK
  22.     cd $1 || return
  23.     shift 1
  24.     DSTACK="$@"
  25.     else
  26.     cd $1 > /dev/null || return
  27.     fi
  28.     DSTACK="$SAVE $DSTACK"
  29.     dirs
  30. }
  31. popd () {
  32.     if test -z "$DSTACK"; then
  33.     echo "popd: directory stack empty." 1>&2
  34.     return 1
  35.     fi
  36.     set $DSTACK
  37.     cd $1
  38.     shift 1
  39.     DSTACK="$@"
  40.     dirs
  41. }
  42. dirs () { echo "`pwd` $DSTACK"; return 0; }
  43. ls   () { /bin/ls $LS_OPTIONS ${1+"$@"}; }
  44. dir  () { ls -l   ${1+"$@"}; }
  45. ll   () { ls -l   ${1+"$@"}; }
  46. la   () { ls -la  ${1+"$@"}; }
  47. l    () { ls -alF ${1+"$@"}; }
  48. ls-l () { ls -l   ${1+"$@"}; }
  49.  
  50. #
  51. # Set some generic aliase functions
  52. #
  53. o    () { less    ${1+"$@"}; }
  54. ..   () { cd ../; }
  55. ...  () { cd ../../; }
  56. +    () { pushd .; }
  57. -    () { popd; }
  58. rd   () { rmdir ${1+"$@"}; }
  59. md   () { mkdir -p ${1+"$@"}; }
  60. rehash   () { hash -r ${1+"$@"}; }
  61. you   () { su - -c "yast2 online_update"; }
  62. beep     () { echo -n ' ' | tr ' ' '\007'; }
  63. unmount  () { echo "Error: Try the command: umount" 1>&2; return 1; }
  64.  
  65. #
  66. # End of /etc/profile.d/alias.ash
  67. #
  68.