터미널에서 더블탭(자동완성/목록나열)이 작동하지 않습니다

우분투 11.04로 업데이트 한 이후로 터미널을 사용할 때 로컬 위치에서는 탭 키를 누르면 자동완성이 되지만, apt-get 등을 사용할 때에는 (전과 다르게) 자동완성이나 목록나열 안 됩니다. 무슨 문제가 있는 걸까요?

중간데 필요한 명령어가 빠진게 있었던게 아닐까요.

가끔 sudo apt-get 까지만 처놓고 패키지 이름을 쓸 때가 있었거든요.

[quote="floor":2q6qhk1d]중간데 필요한 명령어가 빠진게 있었던게 아닐까요.

가끔 sudo apt-get 까지만 처놓고 패키지 이름을 쓸 때가 있었거든요.[/quote:2q6qhk1d]

다른 문제로 보이네요. apt-get 다음에 오는 명령어도 원래 자동완성으로 보여줘야 합니다.

[quote="floor":3m0lnabf]중간데 필요한 명령어가 빠진게 있었던게 아닐까요.

가끔 sudo apt-get 까지만 처놓고 패키지 이름을 쓸 때가 있었거든요.[/quote:3m0lnabf]
예를 들어, stellarium을 설치한다면, sudo apt-get install st 까지 입력하고 탭을 두 번 눌러도 아무런 목록이 나타나지 않습니다. :cry:

[quote="uanonym":r1rrlw6e]우분투 11.04로 업데이트 한 이후로 터미널을 사용할 때 로컬 위치에서는 탭 키를 누르면 자동완성이 되지만, apt-get 등을 사용할 때에는 (전과 다르게) 자동완성이나 목록나열 안 됩니다. 무슨 문제가 있는 걸까요?[/quote:r1rrlw6e]

혹시 업데이트 하면서 .bashrc 파일을 지운 것이 아닐까 싶은데요… 터미널이 좀 촌스러워지지는 않았나요?? 홈 디렉토리에서 .bashrc 파일이 존재 하는 가를 확인하시고요…

만약 없으시다면 요걸 사용해 보세요… 이게 최신 버전 인지는 모르겠지만… 저도 .bashrc 파일 날려 먹고
인터넷에서 찾은 거라 서요…

[code:r1rrlw6e]# ~/.bashrc: executed by bash(1) for non-login shells.

see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)

for examples

If not running interactively, don’t do anything

[ -z "$PS1" ] && return

don’t put duplicate lines in the history. See bash(1) for more options

export HISTCONTROL=ignoredups

check the window size after each command and, if necessary,

update the values of LINES and COLUMNS.

shopt -s checkwinsize

make less more friendly for non-text input files, see lesspipe(1)

[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"

set variable identifying the chroot you work in (used in the prompt below)

if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

set a fancy prompt (non-color, unless we know we "want" color)

case "$TERM" in
xterm-color)
PS1=‘${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]$ ’
;;
*)
PS1=’${debian_chroot:+($debian_chroot)}\u@\h:\w$ ’
;;
esac

Comment in the above and uncomment this below for a color prompt

#PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]$ ’

If this is an xterm set the title to user@host:dir

case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND=‘echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"’
;;
*)
;;
esac

Alias definitions.

You may want to put all your additions into a separate file like

~/.bash_aliases, instead of adding them here directly.

See /usr/share/doc/bash-doc/examples in the bash-doc package.

#if [ -f ~/.bash_aliases ]; then

. ~/.bash_aliases

#fi

enable color support of ls and also add handy aliases

if [ "$TERM" != "dumb" ]; then
eval "dircolors -b"
alias ls=‘ls --color=auto’
#alias dir=‘ls --color=auto --format=vertical’
#alias vdir=‘ls --color=auto --format=long’
fi

some more ls aliases

#alias ll=‘ls -l’
#alias la=‘ls -A’
#alias l=‘ls -CF’

enable programmable completion features (you don’t need to enable

this, if it’s already enabled in /etc/bash.bashrc and /etc/profile

sources /etc/bash.bashrc).

if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi[/code:r1rrlw6e]

[quote="sibulamy":22tt98ei]혹시 업데이트 하면서 .bashrc 파일을 지운 것이 아닐까 싶은데요… 터미널이 좀 촌스러워지지는 않았나요?? 홈 디렉토리에서 .bashrc 파일이 존재 하는 가를 확인하시고요…[/quote:22tt98ei]
덕분에 해결했습니다. 고맙습니다. 10.10에서 11.04로 이전하면서 /home 파티션의 숨김파일을 삭제한 뒤 플래그만 재지정했는데, 그 과정에서 .bashrc가 함께 지워진 것이 원인인 것 같습니다.