I'm running into an issue with autocomplete using git... I am using ubuntu 12.10 and when I perform the following keystrokes
g i t Space Bar Tab
I am presented with the error
Pseudo-terminal will not be allocated because stdin is not a terminal.
and prompted for a password. I am not clear how to go about troubleshooting this error, I have tried uninstalling and reinstalling git to no avail.
Screenshot of terminal with error:
Diff between /root/.bashrc
& ~/.bashrc
3a4
> export JAVA_HOME="/usr/lib/jvm/java-6-sun"
21a23,25
> JAVA_HOME="/usr/lib/jvm/java-6-sun"
> export JAVA_HOME
>
51a56,63
> git_prompt()
> {
> git_branch=$(git branch 2>/dev/null | sed -n '/^\*/s/^\* //p')
> if [ -n "$git_branch" ]; then
> echo "($git_branch)"
> fi
> }
>
53c65
< PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
---
> PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(git_prompt)\$ '
55c67
< PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
---
> PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(git_prompt)\$ '
84a97,100
> # Add an "alert" alias for long running commands. Use like so:
> # sleep 10; alert
> alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
>
97,99c113,115
< #if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
< # . /etc/bash_completion
< #fi
---
> if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
> . /etc/bash_completion
> fi
Pseudo-terminal...
error is nearly always seen in the context ofssh
(if you search Launchpad and Ubuntuforums); perhaps there is something in your environment or in your.bashrc
like an alias, function or some variable that is causing the trouble..bash_aliases
file, as it's not sourced in.bashrc
.~/.bash_aliases
file was the problem I narrowed it down to the alias linealias test="ssh [email protected]"
. Commenting out that line fixes the problem, thank you.