LINUX.ORG.RU

Список команд по двойному ТАБу.

 ,


0

1

В SystemRescueCD есть такая фитча: bash-completion или то, что выводит список команд по двойному табу, делает это не как обычно - выводя список и затем новый промпт, а выводит список после промпта, но промпт остается прежним.

Короче, так: screenshot.

Кака такое в генте сделать? Уж больно удобно...

осильте уже наконец zsh

JFreeM ★★★☆
()

Генту ни разу не видел, но то что приведено на скриншоте помоему это дефолтное поведение в bash. Я думаю это все правится в .bashrc

beer_and_linux
()
Ответ на: комментарий от tyakos

Я имел ввиду не сам факт вывода команд, а расположение списка и поведение промпта.

ubiquitine
() автор топика
Ответ на: комментарий от ubiquitine

Проверьте. Скорее всего, нужно ковырять. Почитайте их ~/.zshrc.

AITap ★★★★★
()
Ответ на: комментарий от ubiquitine

И что, там это по умолчанию? или надо конфиги ковырять?

По дефолту обычно нет, сужу по сусе
Но есть почти в любом zshrc. Тысячи их в интернетах.
Крутить надо опции zstyle ':completion:*' и setopt MENUCOMPLETE

zolden ★★★★★
()
Ответ на: комментарий от ubiquitine

И что, там это по умолчанию? или надо конфиги ковырять?

У меня в Генте такое поведение zsh было сразу после установки, ЕМНИП. Даже с пустым ~/.zshrc.

Но если я и ковырял конфиги, то только скопировал в них то, что предлагалось в сообщениях после установки пакета, а остальное настраивал при помощи настройки, которая запускалась при первом запуске zsh. Но там вроде бы ничего с этим связанного не было.

proud_anon ★★★★★
()
Ответ на: комментарий от Kroz
 $cat /etc/zsh/zshrc :

# 
# This file is based on the configuration written by
# Bruno Bonfils, <asyd@debian-fr.org> 
# Written since summer 2001

#
# My functions (don't forget to modify fpath before call compinit !!)
fpath=(/etc/zsh/zshrc.d/functions $fpath)

# colors
eval `dircolors /etc/zsh/zshrc.d/colors`

autoload -U zutil
autoload -U compinit
autoload -U complist
autoload -Uz promptinit
promptinit
prompt gentoo
bindkey '\e[A' history-search-backward
bindkey '\e[B' history-search-forward
bindkey '^K' kill-whole-line
bindkey "\e[H" beginning-of-line        # Home (xorg)
bindkey "\e[1~" beginning-of-line       # Home (console)
bindkey "\e[4~" end-of-line             # End (console)
bindkey "\e[F" end-of-line              # End (xorg)
bindkey "\e[2~" overwrite-mode          # Ins
bindkey "\e[3~" delete-char             # Delete
bindkey '\eOH' beginning-of-line
bindkey '\eOF' end-of-line

# Activation
compinit

# Resource files
for file in /etc/zsh/zshrc.d/rc/*.rc; do
        source $file
done

export HISTSIZE=1000
export SAVEHIST=1000
export HISTFILE=~/.zhistory
setopt inc_append_history
setopt correctall
setopt autocd
setopt auto_resume
setopt PROMPT_SUBST
setopt AUTO_LIST 
setopt COMPLETE_IN_WORD


#exec 2>>(while read line; do
#  print '\e[91m'${(q)line}'\e[0m' > /dev/tty; print -n $'\0'; done &)

unsetopt equals 

#command hilite zsh

export AUTO_CD
export CD_ABLE_VARS
export PATH=$PATH:$HOME/bin


# The following lines were added by compinstall

zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' completions 1
zstyle ':completion:*' file-sort name
zstyle ':completion:*' glob 1
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' max-errors 2
zstyle ':completion:*' original true
zstyle ':completion:*' prompt 'correction: %e '
zstyle ':completion:*' squeeze-slashes true
zstyle ':completion:*' substitute 1


autoload -U compinit
compinit





RPROMPT='[%* / %D]'

файл с цветами:

COLOR tty

# Extra command line options for ls go here.
# Basically these ones are:
#  -F = show '/' for dirs, '*' for executables, etc.
#  -T 0 = don't trust tab spacing when formatting ls output.
OPTIONS -F -T 0

# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM screen
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM xterm
TERM rxvt
TERM vt100
TERM Eterm

# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1

# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes: 
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00       # global default, although everything should be something.
FILE 00         # normal file
DIR 01;34       # directory
LINK 01;35      # symbolic link
FIFO 40;33      # pipe
SOCK 01;35      # socket
BLK 40;33;01    # block device driver
CHR 40;33;01    # character device driver

# This is for files with execute permission:
EXEC 01;32 

# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')

# Archives
.btm 01;32
.tar 01;31
.tgz 01;31
.arj 01;31
.gz  01;31
.bz2 01;31
.zip 01;31
.rar 01;31
.7z 01;31
.ace 01;31
.dar 01;31
.lzo 01;31
.tbz2 01;31

# Packages
.deb 01;35
.rpm 01;35

# Web
.htm 01;36
.php 01;36
.php3 01;36
.html 01;36

# Sources
.c 04;43;30
.cpp 04;43;30
.h 00;43;30
.hpp 00;43;30
ubiquitine
() автор топика

1). systemresquecd это гента

2). там zsh

3). это zsh-completion

4). оттуда можно взять и конфиг

qnikst ★★★★★
()
Ответ на: комментарий от ubiquitine

У меня раньше тоже такой винегрет в zshrc был пока не открыл для себя oh-my-zsh.

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.