En algún momento, he notado un comportamiento extraño en la aplicación Terminal. Ahora, al abrir una nueva ventana, obtengo esto normalmente:
Last login: Tue Nov 27 11:54:21 on ttys001
pero no puede ver el signo "~" después y el título de la ventana muestra "Terminal - sed - 80x24", lo que significa que se está ejecutando sed. Después de pulsar dos veces la tecla "enter", todo va normal, pero ahora, después de cada nuevo comando que ingrese, tengo que pulsar dos veces "enter" después de él. ¡Esto me vuelve loco! No tengo idea de lo que pasó. Tal vez hay algún script de configuración de inicio para terminal / bash? He comprobado .bash_profile que se ve bien como solía ser.
Aquí está mi archivo .bash_profile:
export DOCUMENTS=~/Documents
alias twrangler="open -a TextWrangler"
alias countloc="find -f . '(' -name '*.m' -or -name '*.mm' ')' -print | xargs wc -l"
# Terminal colours (after installing GNU coreutils)
# NM="\[3[0;38m\]" #means no background and white lines
# HI="\[3[0;37m\]" #change this for letter colors
# HII="\[3[0;31m\]" #change this for letter colors
# SI="\[3[0;33m\]" #this is for the current directory
# IN="\[3[0m\]"
# export PS1="$NM[$SI\w$NM] $IN"
export HISTCONTROL=ignoredups # Ignores dupes in the history
shopt -s checkwinsize # After each command, checks the windows size and changes lines and columns
# bash completion settings (actually, these are readline settings)
bind "set completion-ignore-case on" # note: bind is used instead of setting these in .inputrc. This ignores case in bash completion
bind "set bell-style none" # No bell, because it's damn annoying
bind "set show-all-if-ambiguous On" # this allows you to automatically show completion without double tab-ing
# Turn on advanced bash completion if the file exists (get it here: http://www.caliban.org/bash/index.shtml#completion)
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
# Useful aliases
alias ls='ls $LS_OPTIONS -hF'
alias ll='ls $LS_OPTIONS -lhF'
alias l='ls $LS_OPTIONS -lAhF'
alias g='grep -i' #case insensitive grep
alias f='find . -iname'
alias ducks='du -cks * | sort -rn|head -11' # Lists the size of all the folders and files
alias top='top -o cpu'
alias systail='tail -f /var/log/system.log'
alias cd..="cd .."
alias c="clear"
alias e="exit"
alias ssh="ssh -X"
alias ..="cd .."
#alias mysqlstart='sudo /opt/local/bin/mysqld_safe5 &'
#alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -p shutdown'
#alias remount='sudo ~/scripts/remount.rb'
#alias ffman='/Applications/Firefox.app/Contents/MacOS/firefox -ProfileManager'
#alias ffdev='/Applications/Firefox.app/Contents/MacOS/firefox -P rainbow' #' -chrome chrome://chromebug/content/chromebug.xul -firefox'
#alias fft1='/Applications/Firefox.app/Contents/MacOS/firefox -P test1'
#alias ffxr='/Applications/Minefield.app/Contents/MacOS/firefox -P xrefresh-dev' #' -chrome chrome://chromebug/content/chromebug.xul -firefox'
#alias ffxr2='/Applications/Minefield.app/Contents/MacOS/firefox -P xr2' #' -chrome chrome://chromebug/content/chromebug.xul -firefox'
#alias ff13='/Applications/Minefield.app/Contents/MacOS/firefox -P fb13' #' -chrome chrome://chromebug/content/chromebug.xul -firefox'
#alias ffhed='/Applications/Firefox.app/Contents/MacOS/firefox -P hed' #' -chrome chrome://chromebug/content/chromebug.xul -firefox'
#alias ffgae='/Applications/Minefield.app/Contents/MacOS/firefox -P gae' #' -chrome chrome://chromebug/content/chromebug.xul -firefox'
#alias ffgae2='/Applications/Firefox.app/Contents/MacOS/firefox -P gae' #' -chrome chrome://chromebug/content/chromebug.xul -firefox'
#alias runsvn='/usr/bin/sudo -u www /opt/local/bin/svnserve -d -r /var/svn'
#alias spotbuild='sudo mdutil -E /'
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
COLOR_YELLOW="\[\e[33;10m\]"
COLOR_RED="\[\e[31;10m\]"
COLOR_GREEN="\[\e[32;10m\]"
COLOR_BLUE="\[\e[34;10m\]"
COLOR_NONE="\[\e[0m\]"
COLOR_NONEP="\[\e[38;0m\]"
git_dirty_flag() {
git status 2> /dev/null | grep -c : | awk '{if ($1 > 0) print "‚ö°"}'
}
parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ /'
}
prompt_func() {
previous_return_value=$?;
prompt="${COLOR_BLUE}\w${COLOR_GREEN}$(parse_git_branch)${COLOR_YELLOW}$(git_dirty_flag)${COLOR_NONEP}"
if test $previous_return_value -eq 0
then
PS1="${prompt}${COLOR_NONEP}${COLOR_NONE} "
else
PS1="${prompt}${COLOR_RED}${COLOR_NONE} "
fi
}
PROMPT_COMMAND=prompt_func
# MacPorts Installer addition on 2011-11-02_at_22:46:11: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.