Apple open source code that is available to everyone. How I installed the zsh shell on Fedora 19 from source code.

Posted: August 3, 2013. At: 8:40 PM. This was 4 years ago. Post ID: 6070 There is a good selection of open-source code here that Apple is using on their machines. I downloaded the tarball of the zsh shell here:

This was compiled very easily after I installed the ncurses-devel RPM from this location for Fedora 19:

Then I was able to complete the checks run by ./configure and then I typed make -j4 and then su -c “make install” to copy the compiled shell and its files to their proper locations.

I then added this ~/.zshrc file to the folder and I got the proper zsh shell I was after. Very good indeed.

My awesome .zshrc file.

#.zshrc file for zsh(1).

export MAIL=/var/spool/mail/$USERNAME
export LESS=-cex3M
export EDITOR=vim
export HELPDIR=/usr/local/lib/zsh/help  # directory for run-help function to find docs
manpath=($X11HOME/man /usr/man /usr/lang/man /usr/local/man)
export WINDOWMANAGER=wmaker
manpath=($X11HOME/man /usr/man /usr/lang/man /usr/local/man:/usr/share/man)
# Adding /usr/share/man to the search path for Mepis GNU/Linux.
export MANPATH
# Misc colors.
export NORMAL=" \e[0m"
export GREEN=" \e[1;32m"
export YELLOW=" \e[1;33m"
export WHITE=" \e[1;37m"
export CYAN=" \e[1;36m"


eval `dircolors -b`

# Use hard limits, except for a smaller stack and no core dumps
limit stack 8192
limit core 0
limit -s

umask 022

# Set up aliases
alias mv='nocorrect mv'       # no spelling correction on mv
alias cp='nocorrect cp'       # no spelling correction on cp
alias mkdir='nocorrect mkdir' # no spelling correction on mkdir
alias j=jobs
alias pu=pushd
alias po=popd
alias d='dirs -v'
alias h=history
alias grep=egrep
alias ll='ls -l'
alias la='ls -a'
alias cls='clear'
alias lu='ls -hula'
# More useful Aliases.
alias tarunpack='tar -zxvf'
alias bz2unpack='tar -jxvf'

# List only directories and symbolic
# links that point to directories
alias lsd='ls -ld *(-/DN)'

# List only file beginning with "."
alias lsa='ls -ld .*'

# This code courtesy of Emacs ;).
# Not everyone has finger(1).
if [ -x /usr/bin/finger ] ; then
	INFO=$(finger -lmps $LOGNAME | fgrep On )
	alias userlist='finger -lmps'
	INFO=$(uname -msov)
	alias userlist='users'

# Shell functions
	typeset -x "${1}${1:+=}${(@)argv[2,$#]}"
}  # csh compatibility
	while (( $# )); do; unfunction $1; autoload -U $1; shift; done

# These following functions from
function my_ip() # get IP adresses. Bracket on next line C style...
    MY_IP=$(/sbin/ifconfig ppp0 | awk '/inet/ { print $2 } ' | sed -e s/addr://)
    MY_ISP=$(/sbin/ifconfig ppp0 | awk '/P-t-P/ { print $3 } ' | sed -e s/P-t-P://)

function lowercase()  # move filenames to lowercase.
    for file ; do
        case "$filename" in
        */*) dirname==${file%/*} ;;
        *) dirname=.;;
        nf=$(echo $filename | tr A-Z a-z)
        if [ "$nf" != "$filename" ]; then
            mv "$file" "$newname"
            echo "lowercase: $file --> $newname"
            echo "lowercase: $file not changed."

# Where to look for autoloaded function definitions
fpath=($fpath ~/.zfunc)


echo -e "${YELLOW}"
echo -e "${INFO}"
echo -e "$NORMAL"

autoload -U compinit
autoload -U promptinit; promptinit
prompt clint

No comments have been made. Use this form to start the conversation :)

Leave a Reply