Date: Tue, 28 Mar 2006 15:49:03 +0200 From: Vaaf <vaaf@broadpark.no> To: Glenn Dawson <glenn@antimatter.net>, "Rodrigo G. Tavares de Souza" <rodrigo@sensorsistemas.com.br>, freebsd-questions@freebsd.org Subject: Re: Changing prompt Message-ID: <7.0.1.0.2.20060328154830.02418a58@broadpark.no> In-Reply-To: <7.0.1.0.2.20060328023508.082da6b8@antimatter.net> References: <44290EC5.7080101@sensorsistemas.com.br> <7.0.1.0.2.20060328122638.023a4578@broadpark.no> <7.0.1.0.2.20060328023508.082da6b8@antimatter.net>
next in thread | previous in thread | raw e-mail | index | archive | help
At 12:57 28.03.2006, Glenn Dawson wrote: >At 02:29 AM 3/28/2006, Vaaf wrote: >>At 12:24 28.03.2006, Rodrigo G. Tavares de Souza wrote: >>>Hi, >>> >>> How could I show the path on prompt or see colored files when I >>> make a ls command? >>> >>>Best Regards, >>>Rodrigo Souza >>>Sao Paulo - Brazil >>>_______________________________________________ >>>freebsd-questions@freebsd.org mailing list >>>http://lists.freebsd.org/mailman/listinfo/freebsd-questions >>>To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >> >>Try to install /usr/ports/shells/zsh, and use this as your /etc/zshrc: >> >>### BEGIN >> >>umask 022 >> >>alias vi='vim' >>alias j='jobs -l' >>alias h='history' >>alias ls='ls -G' >>alias cd..='cd ..' >>alias cd...='cd ../..' >>alias cd....='cd ../../..' >>alias cd.....='cd ../../../..' >>alias cd......='cd ../../../../..' >>alias cd/='cd /' >>alias wf='w -f' >>alias ws='w -s' >>alias df='df -h' >>alias ftp='lftp' >>alias pfdump='tcpdump -n -e -ttt -r /var/log/pflog' >>alias pfmonitor='tcpdump -n -e -ttt -i pflog0' >>alias pfreload='pfctl -F all && pfctl -f /etc/pf.conf' >>alias pfshow='pfctl -vvsr' >> >>autoload -U compinit >>compinit -C >> >>zstyle ':completion:*' completer _complete _prefix >>zstyle ':completion::prefix-1:*' completer _complete >>zstyle ':completion:incremental:*' completer _complete _correct >>zstyle ':completion:predict:*' completer _complete >>zstyle ':completion::complete:*' use-cache 1 >>zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST >>zstyle ':completion:*' expand 'yes' >>zstyle ':completion:*' squeeze-slashes 'yes' >>zstyle ':completion::complete:*' '\' >>zstyle ':completion::complete:*:tar:directories' file-patterns '*~.*(-/)' >>zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~' >>zstyle ':completion:*:matches' group 'yes' >>zstyle ':completion:*:options' description 'yes' >>zstyle ':completion:*:options' auto-description '%d' >>zstyle ':completion:*:history-words' stop verbose >>zstyle ':completion:*:history-words' remove-all-dups yes >>zstyle ':completion:*:history-words' list false >>zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} >> >>PROMPT=$'%{\e[01;36m%}(%{\e[22;36m%}%n%{\e[01;30m%}@' >>PROMPT+=$'%{\e[22;36m%}%m%{\e[01;36m%})%{\e[01;36m%}%{\e[01;36m%}(' >>PROMPT+=$'%{\e[22;36m%}%D{%H:%M}%{\e[01;30m%}+%{\e[22;36m%}%D{%m/%d/%y}' >>PROMPT+=$'%{\e[01;36m%})%{\e[01;30m\e[00m%}\n%{\e[01;36m%}(' >>PROMPT+=$'%{\e[22;36m%}%#%{\e[01;30m%}:%{\e[22;36m%}%~%{\e[01;36m%})' >>PROMPT+=$'%{\e[01;30m\e[00m%} ' >> >>if [[ `whoami` = root ]] then >> PROMPT=$'%{\e[01;31m%}(%{\e[22;31m%}%n%{\e[01;30m%}@' >> PROMPT+=$'%{\e[22;31m%}%m%{\e[01;31m%})%{\e[01;31m%}%{\e[01;31m%}(' >>PROMPT+=$'%{\e[22;31m%}%D{%H:%M}%{\e[01;30m%}+%{\e[22;31m%}%D{%m/%d/%y}' >> PROMPT+=$'%{\e[01;31m%})%{\e[01;30m\e[00m%}\n%{\e[01;31m%}(' >> >>PROMPT+=$'%{\e[22;31m%}%#%{\e[01;30m%}:%{\e[22;31m%}%~%{\e[01;31m%})' >> PROMPT+=$'%{\e[01;30m\e[00m%} ' >>fi >> >>### END >> >>This is truly a beautiful prompt. > >Yikes. > >If you're using /bin/csh that comes with FreeBSD, the following will >do what you asked about: > >set prompt="%/ " >setenv CLICOLOR > >For more info, see the prompt variable in the csh(1) man page, and >the environment section of the ls(1) man page. > >-Glenn > > >>Enjoy, >>Vaaf >> >>_______________________________________________ >>freebsd-questions@freebsd.org mailing list >>http://lists.freebsd.org/mailman/listinfo/freebsd-questions >>To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" Yeah but I'm sure Mr Souza appreciates some good design also? -- Vaaf
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7.0.1.0.2.20060328154830.02418a58>