Código
#!/bin/ksh ################################################# # Environment by ZafNat - izafnat@icloud.com # ################################################# if [ -z "$VISUAL" -a -z "$EDITOR" ]; then set -o emacs fi alias h='fc -l' alias j=jobs alias m=$PAGER alias ll='ls -laFo' alias l='ls -l' alias ls='ls -G' alias vi='vim' # Configuracion de teclas (Solo para editor modo emacs) keybd_trap () { case ${.sh.edchar} in $'\f') .sh.edchar=$'\e\f';; # Limpiar pantalla $'\e[1~') .sh.edchar=$'\001';; # Inicio $'\e[F') .sh.edchar=$'\005';; # Fin $'\e[5~') .sh.edchar=$'\e>';; # PgUp $'\e[6~') .sh.edchar=$'\e<';; # PgDn $'\e[3~') .sh.edchar=$'\004';; # Suprimir esac } trap keybd_trap KEYBD # setup prompt # # Modificar el prompt a: "username@hostname >" PS1='$(print -n "\033[31m${USER}\033[00m ";if [[ "${PWD#$HOME}" != "$PWD" ]] then; print -n "\033[36m~${PWD#$HOME}\033[00m "; else; print -n "$PWD";fi;)' case `id -u` in 0) PS1="${PS1}$(print "\033[31m# \033[00m")";; *) PS1="${PS1}$(print "\033[31m> \033[00m")";; esac
Saludos!!!!