Strona 1 z 1

[+] autouzupełnienie w konsoli

: 14 marca 2008, 17:05
autor: krzemyk
Jak włączyć autouzupełnienie w konsoli, chodzi o aptitiude ins[TAB] nic nie daje, a kiedyś działało.

O to mój plik /etc/bash.bashrc

Kod: Zaznacz cały

# System-wide .bashrc file for interactive bash(1) shells.

# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# 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, overwrite the one in /etc/profile)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
# 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}\007"'
#    ;;
#*)
#    ;;
#esac

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

: 14 marca 2008, 17:12
autor: thalcave
[quote="krzemyk"]# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]]
a masz ten plik?
jak nie to pakiecik bash-completion zainstaluj

: 14 marca 2008, 19:06
autor: Gość
thalcave pisze:a masz ten plik?
jak nie to pakiecik bash-completion zainstaluj
No to zabłysnąłeś :mrgreen:

Jak byś nie wiedział to plik bash_completion należy do paczki bash

Kod: Zaznacz cały

Debian  [pts/1]  [19:02:55]  [ ~ ]
 >>  apt-cache search bash-completion
bash - The GNU Bourne Again SHell
python-optcomplete - provide bash-completion for Python programs

Debian  [pts/1]  [19:03:04]  [ ~ ]
 >>  dpkg -L bash | grep complet
/etc/bash_completion
Pozdrawiam

: 14 marca 2008, 21:23
autor: krzemyk

Kod: Zaznacz cały

# dpkg -L bash | grep complet
Nic nie wyświetla - ale ,,cukierek''.

: 14 marca 2008, 21:42
autor: Gość
krzemyk pisze:

Kod: Zaznacz cały

# dpkg -L bash | grep complet
nic nie wyświetla - ale ,,cukierek''
Przeinstaluj basha :

Kod: Zaznacz cały

apt-get install --reinstall bash
A jak to nie pomoże, to ściągnij "ręcznie" paczkę z ftpa - rozpakuj i skopiuj sobie ten pliczek do /etc

Pozdrawiam

: 14 marca 2008, 22:13
autor: zuczek126p
Mam ten sam problem i niestety tego pliku nie ma w debie z repo (aptitude download bash). Czy pobrać go z innego miejsca?

: 14 marca 2008, 22:21
autor: krzemyk

Kod: Zaznacz cały

http://packages.debian.org/sid/bash-completion
stąd pobrałem wszystkie pliki tj
bash
ucf
bash-completion
dpkg -i *.deb
restart i voila - działa :-)

: 14 marca 2008, 22:24
autor: zuczek126p
Thank you very much!! Już działa (ale wystarczylo tylko jeden plik pobrać). Ciekawe czemu nie ma go w repo?