Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: src/bin/bash/config-top.h
- ===================================================================
- --- src/bin/bash/config-top.h (revision 28736)
- +++ src/bin/bash/config-top.h (working copy)
- @@ -73,7 +73,7 @@
- #define KSH_COMPATIBLE_SELECT
- /* System-wide .bashrc file for interactive shells. */
- -/* #define SYS_BASHRC "/etc/bash.bashrc" */
- +#define SYS_BASHRC "/etc/bashrc"
- /* System-wide .bash_logout for login shells. */
- /* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
- Index: src/bin/bash/pathnames.h
- ===================================================================
- --- src/bin/bash/pathnames.h (revision 28736)
- +++ src/bin/bash/pathnames.h (working copy)
- @@ -25,6 +25,6 @@
- #define DEFAULT_HOSTS_FILE "/etc/hosts"
- /* The default login shell startup file. */
- -#define SYS_PROFILE "/etc/profile"
- +#define SYS_PROFILE "/etc/bash_profile"
- #endif /* _PATHNAMES_H */
- Index: data/etc/profile
- ===================================================================
- --- data/etc/profile (revision 28736)
- +++ data/etc/profile (working copy)
- @@ -1,6 +1,6 @@
- #
- -# Administrative startup for /bin/sh
- -# Place user customizations in /.profile
- +# Administrative startup for shells
- +# Place user customizations in ~/.profile
- #
- echo -e "\nWelcome to the Haiku shell.\n"
- @@ -10,83 +10,3 @@
- export PS1="\w> "
- export HISTFILESIZE=50
- -
- -alias ls="ls --color"
- -alias ll="ls -lA"
- -alias la="ls -A"
- -alias m="more"
- -
- -#
- -# and now we include a few useful things...
- -#
- -
- -#
- -# An almost-ksh compatible `whence' command. This is as hairy as it is
- -# because of the desire to exactly mimic ksh.
- -#
- -# This depends somewhat on knowing the format of the output of the bash
- -# `builtin type' command.
- -#
- -# Chet Ramey
- -# chet@ins.CWRU.Edu
- -#
- -whence()
- -{
- - local vflag= path=
- -
- - if [ "$#" = "0" ] ; then
- - echo "whence: argument expected"
- - return 1
- - fi
- - case "$1" in
- - -v) vflag=1
- - shift 1
- - ;;
- - -*) echo "whence: bad option: $1"
- - return 1
- - ;;
- - *) ;;
- - esac
- -
- - if [ "$#" = "0" ] ; then
- - echo "whence: bad argument count"
- - return 1
- - fi
- -
- - returnValue=0
- -
- - for cmd
- - do
- - if [ "$vflag" ] ; then
- - echo $(builtin type $cmd | sed 1q)
- - else
- - path=$(builtin type -path $cmd)
- - if [ "$path" ] ; then
- - echo $path
- - else
- - case "$cmd" in
- - */*) if [ -x "$cmd" ]; then
- - echo "$cmd"
- - else
- - returnValue=1
- - fi
- - ;;
- - *) case "$(builtin type -type $cmd)" in
- - "") returnValue=1
- - ;;
- - *) echo "$cmd"
- - ;;
- - esac
- - ;;
- - esac
- - fi
- - fi
- - done
- - return $returnValue
- -}
- -
- -alias which='whence'
- -
- -function dir {
- - ls -lF "$@";
- -}
- Index: data/etc/bashrc
- ===================================================================
- --- data/etc/bashrc (revision 0)
- +++ data/etc/bashrc (revision 0)
- @@ -0,0 +1,81 @@
- +alias ls="ls --color"
- +alias ll="ls -lA"
- +alias la="ls -A"
- +alias m="more"
- +
- +#
- +# and now we include a few useful things...
- +#
- +
- +#
- +# An almost-ksh compatible `whence' command. This is as hairy as it is
- +# because of the desire to exactly mimic ksh.
- +#
- +# This depends somewhat on knowing the format of the output of the bash
- +# `builtin type' command.
- +#
- +# Chet Ramey
- +# chet@ins.CWRU.Edu
- +#
- +whence()
- +{
- + local vflag= path=
- +
- + if [ "$#" = "0" ] ; then
- + echo "whence: argument expected"
- + return 1
- + fi
- + case "$1" in
- + -v) vflag=1
- + shift 1
- + ;;
- + -*) echo "whence: bad option: $1"
- + return 1
- + ;;
- + *) ;;
- + esac
- +
- + if [ "$#" = "0" ] ; then
- + echo "whence: bad argument count"
- + return 1
- + fi
- +
- + returnValue=0
- +
- + for cmd
- + do
- + if [ "$vflag" ] ; then
- + echo $(builtin type $cmd | sed 1q)
- + else
- + path=$(builtin type -path $cmd)
- + if [ "$path" ] ; then
- + echo $path
- + else
- + case "$cmd" in
- + */*) if [ -x "$cmd" ]; then
- + echo "$cmd"
- + else
- + returnValue=1
- + fi
- + ;;
- + *) case "$(builtin type -type $cmd)" in
- + "") returnValue=1
- + ;;
- + *) echo "$cmd"
- + ;;
- + esac
- + ;;
- + esac
- + fi
- + fi
- + done
- + return $returnValue
- +}
- +
- +alias which='whence'
- +
- +function dir {
- + ls -lF "$@";
- +}
- +
- +shopt -s checkwinsize
- Index: data/etc/bash_profile
- ===================================================================
- --- data/etc/bash_profile (revision 0)
- +++ data/etc/bash_profile (revision 0)
- @@ -0,0 +1,7 @@
- +#
- +# Administrative startup for Bash
- +# Place user customizations in ~/.bash_profile
- +#
- +
- +source /etc/profile
- +source /etc/bashrc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement