[Solved] ZSH auto-completion in BASH?

Hi everyone, I'm using BASH but I really like the way ZSH handles auto completion. For instance, in BASH, if I type vi and press [Tab], it shows my possible options but my cursor makes a new line. Therefore, if I press [Tab] again, the same thing will be created over and over. What I like about ZSH auto-completion is that when I press tab, the auto-completion fills the screen, but my cursor doesn't jump to a new line. Therefore, the actual output of the command and the [Tab] auto-completion output occupy the same space. Does anyone know a way I could have BASH perform in a way similar to this?
Thanks!
Last edited by Spara06 (2014-08-30 20:03:52)

jasonwryan wrote:
Not as far as I know: this is all down to zle http://zsh.sourceforge.net/Doc/Release/ … dgets.html
If you want this, just use Zsh (it has all sorts of other advantages as well).
Thanks for your reply jasonwryan.
I'm trying out zsh thus far and I'm liking it. It's rather easy to use and has most of the good features of BASH as well as some other nice ones I didn't have before (including the way it does tab completion and right side prompts).
Thanks!

Similar Messages

  • [solved]zsh history completion not matching after first word?

    Hi!
    I just switched to zsh some days ago and I can't get the history search completion working like it's used to work with bash (history-search-backward /  history-search-forward)
    I installed grml-zsh-config, tried to rewrite most of my .bashrc to work with zsh... read a lot of man pages and changed some settings (and broke some random things... and un-broke most of them again)...
    Now when I enter p.e.:
    $ sudo tes
    ...and press the up/down arrows, it keeps the "sudo" but not the "tes" - it goes trough all commands that I called with sudo. Seems to behave the same way for other commands - keeps the first word, ignores everything else I typed.
    No idea what this is called, what it's good for or how to change it.
    Where do I look for this?
    Last edited by whoops (2012-12-01 19:09:52)

    ^ I've not used that, so I can't say whether or not my solution is better or worse. However, I suggest using "up-line-or-beginning-search"/"down-line-or-beginning-search", as described in zshall:
    up-line-or-beginning-search, down-line-or-beginning-search
    These widgets are similar to the builtin functions up-line-or-search and
    down-line-or-search: if in a multiline buffer they move up or down within the buf‐
    fer, otherwise they search for a history line matching the start of the current
    line. In this case, however, they search for a line which matches the current line
    up to the current cursor position, in the manner of history-beginning-search-back‐
    ward and -forward, rather than the first word on the line.
    From my .zshrc:
    autoload up-line-or-beginning-search
    autoload down-line-or-beginning-search
    zle -N up-line-or-beginning-search
    zle -N down-line-or-beginning-search
    bindkey "\e[A" up-line-or-beginning-search
    bindkey "\e[B" down-line-or-beginning-search

  • [SOLVED]zsh completion config not being loaded but other settings work

    This seems like a slightly odd problem.  I've been using zsh quite happily for a while now and as far as I've been aware, my .zshrc has been loaded consistently and properly.
    Today I decided to add auto-completion for one of my own programs.  It works, BUT I have to manually `source ~/.zshrc` in each new terminal even after logging out and back in.  The `fpath` variable is not being read from the .zshrc when I log in or start a terminal/emulator, but if I manually source .zshrc it works fine.
    Here are the relevant files:
    ~/.zshenv
    #!/bin/zsh
    ZDOTDIR=~/.config/zsh
    typeset -U path
    path=($HOME/bin $HOME/scripts $path)
    export EDITOR=vim
    export DIRB=~/.local/share/DirB
    export LOCAL_PACKAGE_SOURCES=/home/ian/dl
    ~/.config/_zshrc
    # The following lines were added by compinstall
    zstyle ':completion:*' completer _complete _ignored
    zstyle :compinstall filename '/home/ian/.config/zsh/_zshrc'
    autoload -Uz promptinit colors
    colors
    promptinit
    # COMPLETION settings
    fpath=(~/.config/zsh/completion $fpath)
    autoload -Uz compinit
    compinit
    zstyle ':completion:*' menu select=2
    # Lines configured by zsh-newuser-install
    HISTFILE=~/.local/share/zshhistfile
    HISTSIZE=1000
    SAVEHIST=1000
    if ! [[ "${PATH}" =~ "^${HOME}/bin" ]]; then
    export PATH="${HOME}/bin:${PATH}"
    fi
    if ! [[ "${PATH}" =~ "^${HOME}/scripts" ]]; then
    export PATH="${HOME}/scripts:${PATH}"
    fi
    # history options:
    setopt append_history hist_ignore_dups hist_ignore_all_dups hist_ignore_space hist_no_store
    # background jobs:
    setopt notify
    # changing directory:
    setopt auto_cd auto_pushd pushd_silent
    # globbing:
    setopt extended_glob
    # unset:
    unsetopt beep flow_control
    # keymap: emacs
    bindkey -e
    # End of lines configured by zsh-newuser-install
    # make M-f and M-b stop at / in paths:
    export WORDCHARS=''
    source ~/.bash_profile
    source ~/.config/bash/aliases
    source ~/.config/zsh/alias_s
    source ~/.config/zsh/alias_g
    source ~/.config/bash/DirB
    source ~/.config/zsh/functions
    # prompt:
    PS1="%B%{$fg[black]%}::%{$fg[cyan]%}(%b%{$fg[cyan]%}%n@%m%B%{$fg[cyan]%})%{$fg[black]%}-%{$fg[cyan]%}(%b%{$fg[cyan]%}%T%B%{$fg[cyan]%})%{$fg[black]%}-%{$fg[cyan]%}[%b%{$fg[cyan]%}%h%B%{$fg[cyan]%}]%{$fg[black]%}-%{$fg[cyan]%}(%b%{$fg[yellow]%}%2~%B%{$fg[cyan]%})%{$fg[black]%}>%b %{$reset_color%}"
    The only changes I've made are the lines under "COMPLETION."
    Can anyone spot something in there to suggest why everything seems to work except the `fpath=(~/.config/zsh/completion $fpath)` line?
    Last edited by ibrunton (2015-06-09 22:43:24)

    This is what I use (note, different ZSHDOTDIR to you):
    # completions
    # add custom completion scripts
    fpath=(~/.zsh/completion $fpath)
    autoload -Uz compinit
    compinit
    zstyle ':completion:*' completer _complete _correct _approximate
    zstyle ':completion:*' expand prefix suffix
    zstyle ':completion:*' completer _expand_alias _complete _approximate
    zstyle ':completion:*' menu select
    zstyle ':completion:*' file-sort name
    zstyle ':completion:*' ignore-parents pwd
    zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
    zstyle ':completion:*:pacman:*' force-list always
    zstyle ':completion:*:*:pacman:*' menu yes select
    zstyle -e ':completion:*' hosts 'reply=(cent pi sent veles)'
    zstyle :compinstall filename '$HOME/.zsh/zshrc'

  • [SOLVED] Slight issue concerning pacman & bash completion

    Hi all,
    I've come across a small issue when using the -Rs option with pacman.
    The auto completion doesn't appear to be working for the first package name passed after the -Rs option.
    For example, when issuing the command
    pacman -Rs firefox
    and pressing tab twice, it will not show any options or auto-complete. However, if I add another package to be removed:
    pacman -Rs firefox chr
    and hit the tab key twice, autocomplete will work, and it'll autocomplete to chromium.
    Bash-completion (2.0-3) is installed, and the rest of the system is up to date. Am I missing something here, or have I stumbled upon a bug?

    I don't know so much about it, but I'm under the impression that bash-completion for pacman (once enabled in ~/.bashrc by adding "complete -cf pacman") works by default by checking the user's PATH variable, i.e. it will offer to complete pacman commands with the name of any executable in the user's PATH's () as well as the contents of the current directory. ... which means: if firefox isn't installed, it won't find it; if it is, it will offer this completion; if there's a file called firefox in the current directory, it will also offer it.
    but as I said, I'm not an expert on bash-completion

  • Zsh modutils completion (solved & bug report)

    Hi,
    Since last zsh update, I can't get 'modinfo' & 'modprobe' completion, only 'rmmod' & 'modprobe -r' are working actually (easy with '/proc/modules'). It seems that a new caching algorithm was implemented in the last version but I don't understand it . Diff with zsh 4.3.11 _modutils :
    --- Sources/zsh-4.3.11/Completion/Linux/Command/_modutils 2009-07-14 10:57:13.000000000 +0200(B
    +++ /usr/share/zsh/functions/Completion/Linux/_modutils 2011-06-02 13:02:04.000000000 +0200(B
    @@ -1,8 +1,23 @@(B
    #compdef lsmod modinfo modprobe rmmod insmod
    +_modules_caching_policy()(B
    +{(B
    + # Rebuild every week, or if $modules_dir is newer than the cache(B
    + local -a oldp(B
    +(B
    + oldp=( "$1"(Nmw+1) )(B
    + (( $#oldp )) || [[ $modules_dir -nt $1 ]](B
    +}(B
    +(B
    local curcontext="$curcontext" expl state line modules ign args ret=1
    local -r modules_dir=/lib/modules
    +local update_policy(B
    +zstyle -s ":completion:*:*:$service:*" cache-policy update_policy(B
    +if [[ -z "$update_policy" ]]; then(B
    + zstyle ":completion:*:*:$service:*" cache-policy _modules_caching_policy(B
    +fi(B
    +(B
    args=(
    '(-)'{-V,--version}'[print version]'
    '(-)'{-h,--help}'[print help text]'
    @@ -39,6 +54,7 @@(B
    "(-v --verbose $ign)"{-v,--verbose}'[print all commands as executed]' \
    '(-C --config)'{-C,--config}'[specify config file]:config file:_files' \
    "(-r --remove -l --list -t --type -a --all $ign)"{-r,--remove}'[remove module (stacks)]' \
    + "(-l --list -t --type -a --all $ign)"{'-i[ignore install/remove commands in config file]','--ignore-install[ignore install commands in config file]','--ignore-remove[ignore remove commands in config file]'} \(B
    "(* -l --list -r --remove $ign)"{-l,--list}'[list matching modules]' \
    "(-c $ign)1:modules:->loadable_modules" \
    "(-c -l --list -t --type $ign)*:params:->params" && ret=0
    @@ -87,7 +103,13 @@(B
    else
    kver=$(uname -r)
    fi
    - modules=( $modules_dir/$kver/(*~(source|build))/**/*(.:t:r) )(B
    + if [[ -z $modules ]] && ! _cache_invalid modules-$kver && \(B
    + ! _retrieve_cache modules-$kver;(B
    + then (B
    + # 2011-01-02 gi1242: Do we need .o files? Or is .ko enough?(B
    + modules=( $modules_dir/$kver/(*~(source|build))/**/*.(o|ko)(.:t:r) )(B
    + _store_cache modules-$kver modules(B
    + fi(B
    if [[ $state = loadable_modules ]]; then
    modules=( ${modules:#(${(j:|:)~${=loaded_modules//_/-}})} )
    Last edited by Drexya (2011-06-13 01:46:34)

    Wow, thanks it works, but there's a problem, modules appears with *.ko suffix so
    modules=( $modules_dir/$kver/(*~(source|build))/**/*.(o|ko|ko.gz)(.:t:r:r) )
    is even better .
    taken from http://zsh.sourceforge.net/Guide/zshguide05.html :
    print ${p:t:r}
    will work for both arrays and scalars: the :t takes only the tail of the filename, stripping the directories, and the :r removes the suffix. These two operators could have slightly unexpected effects in versions of zsh before 4.0.1, removing `suffixes' which contained directory paths, for example (though this is what the pattern forms taken separately do, too).
    bug report
    Last edited by Drexya (2011-06-13 01:45:45)

  • [SOLVED]ZSH and regular expressions

    Hi
    I am getting into regular expressions and i have noticed that with my .zshrc file i have some problem. In bash this expression works:
    \^\[^#]
    but not also in zsh. I have also noted that regular expression works fine with other zshrc configurations found in archwiki (like grml) but i want to have my configuration. And i really can't find what command make a difference
    My .zshrc file is pulled from this site https://github.com/slashbeast/things/bl … s/DOTzshrc.
    # .zshrc
    # Author: Piotr Karbowski <[email protected]>
    # License: beerware.
    # Basic zsh config.
    umask 077
    ZDOTDIR=${ZDOTDIR:-${HOME}}
    ZSHDDIR="${HOME}/.config/zsh.d"
    HISTFILE="${ZDOTDIR}/.zsh_history"
    HISTSIZE='10000'
    SAVEHIST="${HISTSIZE}"
    export EDITOR="/usr/bin/vim"
    export TMP="$HOME/tmp"
    export TEMP="$TMP"
    export TMPDIR="$TMP"
    export TMPPREFIX="${TMPDIR}/zsh"
    if [ ! -d "${TMP}" ]; then mkdir "${TMP}"; fi
    if ! [[ "${PATH}" =~ "^${HOME}/bin" ]]; then
    export PATH="${HOME}/bin:${PATH}"
    fi
    # Not all servers have terminfo for rxvt-256color. :<
    if [ "${TERM}" = 'rxvt-256color' ] && ! [ -f '/usr/share/terminfo/r/rxvt-256color' ] && ! [ -f '/lib/terminfo/r/rxvt-256color' ] && ! [ -f "${HOME}/.terminfo/r/rxvt-256color" ]; then
    export TERM='rxvt-unicode'
    fi
    # Colors.
    red='\e[0;31m'
    RED='\e[1;31m'
    green='\e[0;32m'
    GREEN='\e[1;32m'
    yellow='\e[0;33m'
    YELLOW='\e[1;33m'
    blue='\e[0;34m'
    BLUE='\e[1;34m'
    purple='\e[0;35m'
    PURPLE='\e[1;35m'
    cyan='\e[0;36m'
    CYAN='\e[1;36m'
    NC='\e[0m'
    # Functions
    if [ -f '/etc/profile.d/prll.sh' ]; then
    . "/etc/profile.d/prll.sh"
    fi
    run_under_tmux() {
    # Run $1 under session or attach if such session already exist.
    # $2 is optional path, if no specified, will use $1 from $PATH.
    # If you need to pass extra variables, use $2 for it as in example below..
    # Example usage:
    # torrent() { run_under_tmux 'rtorrent' '/usr/local/rtorrent-git/bin/rtorrent'; }
    # mutt() { run_under_tmux 'mutt'; }
    # irc() { run_under_tmux 'irssi' "TERM='screen' command irssi"; }
    # There is a bug in linux's libevent...
    # export EVENT_NOEPOLL=1
    command -v tmux >/dev/null 2>&1 || return 1
    if [ -z "$1" ]; then return 1; fi
    local name="$1"
    if [ -n "$2" ]; then
    local file_path="$2"
    else
    local file_path="command ${name}"
    fi
    if tmux has-session -t "${name}" 2>/dev/null; then
    tmux attach -d -t "${name}"
    else
    tmux new-session -s "${name}" "${file_path}" \; set-option status \; set set-titles-string "${name} (tmux@${HOST})"
    fi
    t() { run_under_tmux rtorrent; }
    irc() { run_under_tmux irssi "TERM='screen' command irssi"; }
    over_ssh() {
    if [ -n "${SSH_CLIENT}" ]; then
    return 0
    else
    return 1
    fi
    reload () {
    exec "${SHELL}" "$@"
    confirm() {
    local answer
    echo -ne "zsh: sure you want to run '${YELLOW}$@${NC}' [yN]? "
    read -q answer
    echo
    if [[ "${answer}" =~ ^[Yy]$ ]]; then
    command "${=1}" "${=@:2}"
    else
    return 1
    fi
    confirm_wrapper() {
    if [ "$1" = '--root' ]; then
    local as_root='true'
    shift
    fi
    local runcommand="$1"; shift
    if [ "${as_root}" = 'true' ] && [ "${USER}" != 'root' ]; then
    runcommand="sudo ${runcommand}"
    fi
    confirm "${runcommand}" "$@"
    poweroff() { confirm_wrapper --root $0 "$@"; }
    reboot() { confirm_wrapper --root $0 "$@"; }
    hibernate() { confirm_wrapper --root $0 "$@"; }
    detox() {
    if [ "$#" -ge 1 ]; then
    confirm detox "$@"
    else
    command detox "$@"
    fi
    has() {
    local string="${1}"
    shift
    local element=''
    for element in "$@"; do
    if [ "${string}" = "${element}" ]; then
    return 0
    fi
    done
    return 1
    begin_with() {
    local string="${1}"
    shift
    local element=''
    for element in "$@"; do
    if [[ "${string}" =~ "^${element}" ]]; then
    return 0
    fi
    done
    return 1
    termtitle() {
    case "$TERM" in
    rxvt*|xterm|nxterm|gnome|screen|screen-*)
    local prompt_host="${(%):-%m}"
    local prompt_user="${(%):-%n}"
    local prompt_char="${(%):-%~}"
    case "$1" in
    precmd)
    printf '\e]0;%s@%s: %s\a' "${prompt_user}" "${prompt_host}" "${prompt_char}"
    preexec)
    printf '\e]0;%s [%s@%s: %s]\a' "$2" "${prompt_user}" "${prompt_host}" "${prompt_char}"
    esac
    esac
    git_check_if_worktree() {
    # This function intend to be only executed in chpwd().
    # Check if the current path is in git repo.
    # We would want stop this function, on some big git repos it can take some time to cd into.
    if [ -n "${skip_zsh_git}" ]; then
    git_pwd_is_worktree='false'
    return 1
    fi
    # The : separated list of paths where we will run check for git repo.
    # If not set, then we will do it only for /root and /home.
    if [ "${UID}" = '0' ]; then
    # running 'git' in repo changes owner of git's index files to root, skip prompt git magic if CWD=/home/*
    git_check_if_workdir_path="${git_check_if_workdir_path:-/root:/etc}"
    else
    git_check_if_workdir_path="${git_check_if_workdir_path:-/home}"
    git_check_if_workdir_path_exclude="${git_check_if_workdir_path_exclude:-${HOME}/_sshfs}"
    fi
    if begin_with "${PWD}" ${=git_check_if_workdir_path//:/ }; then
    if ! begin_with "${PWD}" ${=git_check_if_workdir_path_exclude//:/ }; then
    local git_pwd_is_worktree_match='true'
    else
    local git_pwd_is_worktree_match='false'
    fi
    fi
    if ! [ "${git_pwd_is_worktree_match}" = 'true' ]; then
    git_pwd_is_worktree='false'
    return 1
    fi
    # todo: Prevent checking for /.git or /home/.git, if PWD=/home or PWD=/ maybe...
    # damn annoying RBAC messages about Access denied there.
    if [ -d '.git' ] || [ "$(git rev-parse --is-inside-work-tree 2> /dev/null)" = 'true' ]; then
    git_pwd_is_worktree='true'
    git_worktree_is_bare="$(git config core.bare)"
    else
    unset git_branch git_worktree_is_bare
    git_pwd_is_worktree='false'
    fi
    git_branch() {
    git_branch="$(git symbolic-ref HEAD 2>/dev/null)"
    git_branch="${git_branch##*/}"
    git_branch="${git_branch:-no branch}"
    git_dirty() {
    if [ "${git_worktree_is_bare}" = 'false' ] && [ -n "$(git status --untracked-files='no' --porcelain)" ]; then
    git_dirty='%F{green}*'
    else
    unset git_dirty
    fi
    precmd() {
    # Set terminal title.
    termtitle precmd
    if [ "${git_pwd_is_worktree}" = 'true' ]; then
    git_branch
    git_dirty
    git_prompt=" %F{blue}[%F{253}${git_branch}${git_dirty}%F{blue}]"
    else
    unset git_prompt
    fi
    preexec() {
    # Set terminal title along with current executed command pass as second argument
    termtitle preexec "${(V)1}"
    chpwd() {
    git_check_if_worktree
    man() {
    if command -v vimmanpager >/dev/null 2>&1; then
    PAGER="vimmanpager" command man "$@"
    else
    command man "$@"
    fi
    # Are we running under grsecurity's RBAC?
    rbac_auth() {
    local auth_to_role='admin'
    if [ "${USER}" = 'root' ]; then
    if ! grep -qE '^RBAC:' "/proc/self/status" && command -v gradm > /dev/null 2>&1; then
    echo -e "\n${BLUE}*${NC} ${GREEN}RBAC${NC} Authorize to '${auth_to_role}' RBAC role."
    gradm -a "${auth_to_role}"
    fi
    fi
    #rbac_auth
    # Check if we started zsh in git worktree, useful with tmux when your new zsh may spawn in source dir.
    git_check_if_worktree
    if [ "${git_pwd_is_worktree}" = 'true' ]; then
    git_branch
    git_dirty
    git_prompt=" %F{blue}[%F{253}${git_branch}${git_dirty}%F{blue}]"
    else
    unset git_prompt
    fi
    # Le features!
    # extended globbing, awesome!
    setopt extendedGlob
    # zmv - a command for renaming files by means of shell patterns.
    autoload -U zmv
    # zargs, as an alternative to find -exec and xargs.
    autoload -U zargs
    # Turn on command substitution in the prompt (and parameter expansion and arithmetic expansion).
    setopt promptsubst
    # Control-x-e to open current line in $EDITOR, awesome when writting functions or editing multiline commands.
    autoload -U edit-command-line
    zle -N edit-command-line
    bindkey '^x^e' edit-command-line
    # Include user-specified configs.
    if [ ! -d "${ZSHDDIR}" ]; then
    mkdir -p "${ZSHDDIR}" && echo "# Put your user-specified config here." > "${ZSHDDIR}/example.zsh"
    fi
    for zshd in $(ls -A ${HOME}/.config/zsh.d/^*.(z)sh$); do
    . "${zshd}"
    done
    # Completion.
    autoload -Uz compinit
    compinit
    zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
    zstyle ':completion:*' completer _expand _complete _ignored _approximate
    zstyle ':completion:*' menu select=2
    zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
    zstyle ':completion::complete:*' use-cache 1
    zstyle ':completion:*:descriptions' format '%U%F{cyan}%d%f%u'
    # If running as root and nice >0, renice to 0.
    if [ "$USER" = 'root' ] && [ "$(cut -d ' ' -f 19 /proc/$$/stat)" -gt 0 ]; then
    renice -n 0 -p "$$" && echo "# Adjusted nice level for current shell to 0."
    fi
    # Fancy prompt.
    if over_ssh && [ -z "${TMUX}" ]; then
    prompt_is_ssh='%F{blue}[%F{red}SSH%F{blue}] '
    elif over_ssh; then
    prompt_is_ssh='%F{blue}[%F{253}SSH%F{blue}] '
    else
    unset prompt_is_ssh
    fi
    case $USER in
    root)
    PROMPT='%B%F{cyan}%m%k %(?..%F{blue}[%F{253}%?%F{blue}] )${prompt_is_ssh}%B%F{blue}%1~${git_prompt}%F{blue} %# %b%f%k'
    PROMPT='%B%F{blue}%n@%m%k %(?..%F{blue}[%F{253}%?%F{blue}] )${prompt_is_ssh}%B%F{cyan}%1~${git_prompt}%F{cyan} %# %b%f%k'
    esac
    # Ignore lines prefixed with '#'.
    setopt interactivecomments
    # Ignore duplicate in history.
    setopt hist_ignore_dups
    # Prevent record in history entry if preceding them with at least one space
    setopt hist_ignore_space
    # Nobody need flow control anymore. Troublesome feature.
    #stty -ixon
    setopt noflowcontrol
    # Fix for tmux on linux.
    case "$(uname -o)" in
    'GNU/Linux')
    export EVENT_NOEPOLL=1
    esac
    # Aliases
    alias cp='cp -iv'
    alias rcp='rsync -v --progress'
    alias rmv='rsync -v --progress --remove-source-files'
    alias mv='mv -iv'
    alias rm='rm -iv'
    alias rmdir='rmdir -v'
    alias ln='ln -v'
    alias chmod="chmod -c"
    alias chown="chown -c"
    if command -v colordiff > /dev/null 2>&1; then
    alias diff="colordiff -Nuar"
    else
    alias diff="diff -Nuar"
    fi
    alias grep='grep --colour=auto'
    alias egrep='egrep --colour=auto'
    alias ls='ls --color=auto --human-readable --group-directories-first --classify'
    # Keys.
    case $TERM in
    rxvt*|xterm*)
    bindkey "^[[7~" beginning-of-line #Home key
    bindkey "^[[8~" end-of-line #End key
    bindkey "^[[3~" delete-char #Del key
    bindkey "^[[A" history-beginning-search-backward #Up Arrow
    bindkey "^[[B" history-beginning-search-forward #Down Arrow
    bindkey "^[Oc" forward-word # control + right arrow
    bindkey "^[Od" backward-word # control + left arrow
    bindkey "^H" backward-kill-word # control + backspace
    bindkey "^[[3^" kill-word # control + delete
    linux)
    bindkey "^[[1~" beginning-of-line #Home key
    bindkey "^[[4~" end-of-line #End key
    bindkey "^[[3~" delete-char #Del key
    bindkey "^[[A" history-beginning-search-backward
    bindkey "^[[B" history-beginning-search-forward
    screen|screen-*)
    bindkey "^[[1~" beginning-of-line #Home key
    bindkey "^[[4~" end-of-line #End key
    bindkey "^[[3~" delete-char #Del key
    bindkey "^[[A" history-beginning-search-backward #Up Arrow
    bindkey "^[[B" history-beginning-search-forward #Down Arrow
    bindkey "^[Oc" forward-word # control + right arrow
    bindkey "^[Od" backward-word # control + left arrow
    bindkey "^H" backward-kill-word # control + backspace
    bindkey "^[[3^" kill-word # control + delete
    esac
    bindkey "^R" history-incremental-pattern-search-backward
    bindkey "^S" history-incremental-pattern-search-forward
    if [ -f ~/.alert ]; then cat ~/.alert; fi
    Thanks for all the help.
    Last edited by Shark (2013-05-11 22:32:24)

    Raynman wrote:
    "This expression doesn't work", "It doesn't work" ...
    Could you try being a bit more specific?
    Firstly, i am sorry i didn't post the output. I should have know better.
    Secondly, chill out.
    I have used above regex with grep command. Output from terminal is:
    zsh: bad pattern: ^[^#]
    In bash it works perfectly.
    If i issue "setopt re_match_pcre" i have the same ouput as above.
    EDIT: If i issue "unsetopt no_match" it actually works but i have to change the regex from "\^\[^#]" to "\^[^#]" otherwise i get the same output as above. In bash both options work.
    Last edited by Shark (2013-05-11 22:07:21)

  • [SOLVED] zsh command is echoed back in tty

    When I am in a tty and type a command such as "ls" I get:
    $ ls
    lsDirectory/
    $
    instead of
    $ ls
    Directory/
    $
    This is an annoyance. It has something to do with an option in my zshrc but I am not sure which one (I tried removing it to verify and yeah that's it). When I am in a terminal inside of X I do not have this issue. It is also not an issue in bash. Here is my .zshrc file:
    NOPRECMD=1
    function precmd() {
    print -Pn "\e]2;%~\a"
    preexec () {
    print -Pn "\e]2;%~ : $1\a"
    # Auto Completion And Additional Settings
    autoload -U compinit
    compinit
    zstyle ':completion:*' menu select
    export HISTFILE=~/.zsh_history
    export HISTSIZE=50000
    export SAVEHIST=50000
    eval `dircolors -b`
    setopt autopushd pushdminus pushdsilent pushdtohome
    setopt autocd
    setopt cdablevars
    setopt ignoreeof
    setopt interactivecomments
    setopt nobanghist
    #setopt noclobber
    setopt HIST_REDUCE_BLANKS
    setopt HIST_IGNORE_SPACE
    setopt SH_WORD_SPLIT
    setopt nohup
    setopt completealiases
    setopt correct
    #setopt correctall
    #Colored Prompt
    autoload -U promptinit
    promptinit
    #Colors
    autoload -U colors && colors
    zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
    # allow approximate
    zstyle ':completion:*' completer _complete _match _approximate
    zstyle ':completion:*:match:*' original only
    zstyle ':completion:*:approximate:*' max-errors 1 numeric
    #zstyle ':completion:*' special-dirs true
    #zstyle ':completion:*' accept-exact '*(N)'
    zstyle ':completion:*' list-dirs-first true
    #Cache
    zstyle ':completion::complete:*' use-cache 1
    zstyle ':completion::complete:*' cache-path ~/.zsh/cache
    # tab completion for PID :D
    zstyle ':completion:*:*:kill:*' menu yes select
    zstyle ':completion:*:kill:*' force-list always
    #compdef _gnu_generic
    #zstyle ':completion:*:processes-names' command 'ps c -u ${USER} -o command | uniq'
    compdef _pids cpulimit
    compdef _pids ps
    compdef _pids appuptime
    # cd not select parent dir
    zstyle ':completion:*:cd:*' ignore-parents parent pwd
    #Special Keys
    typeset -g -A key
    #bindkey '^[[3' backward-kill-word trying to figure out ctrl+backspace...still
    bindkey "\eOH" beginning-of-line
    bindkey "\eOF" end-of-line
    bindkey "\e[H" beginning-of-line
    bindkey "\e[F" end-of-line
    bindkey '^?' backward-delete-char
    bindkey '^[[1~' beginning-of-line
    bindkey '^[[5~' up-line-or-history
    bindkey '^[[3~' delete-char
    bindkey '^[[4~' end-of-line
    bindkey '^[[6~' down-line-or-history
    bindkey '^[[A' up-line-or-search
    bindkey '^[[D' backward-char
    bindkey '^[[B' down-line-or-search
    bindkey '^[[C' forward-char
    # completion in the middle of a line
    bindkey '^i' expand-or-complete-prefix
    #Directory Colors
    LS_COLORS='rs=0:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:';
    export LS_COLORS
    #History Search
    bindkey "^[[A" history-search-backward
    bindkey "^[[B" history-search-forward
    source /home/dodo3773/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
    #source /home/dodo3773/.zsh/plugins/safe-paste.plugin.zsh
    fpath=( $HOME/.zsh/functions $fpath )
    PATH=$PATH:/home/dodo3773/Documents/Scripts
    DONTSETRPROMPT=1
    if [ ${UID} -ne 0 ]; then
    PS1="%{%F{white}%}%~ %{%F{green}%}>> %{%f%}"
    RPROMPT='%{%F{green}%}[%{%F{red}%}%"%?%{%F{green}%}]'
    else
    PS1="%{%F{red}%}%~ %{%F{green}%}>> %{%f%}"
    RPROMPT='%{%F{green}%}[%{%F{red}%}%"%?%{%F{green}%}]'
    fi
    Last edited by dodo3773 (2013-05-22 19:08:12)

    or `if [[ "$TERM" == "linux" ]];` which has a couple minor advantages.  First it doesn't need to spawn another subprocess, and second, if you ever *do* end up using tmux/screen/fbterm in a tty, then you'll still have the "window" title (tab) set in those envrionments too.
    EDIT: my suggested condition is of the opposite logic, so use an else, !, or not-equal comparison.
    My bashrc has a number of settings in one good size if/then/else/fi block for settings that should differ between virtual terminals and ttys.  I don't know if you can define functions inside conditionals ... I doubt it, but I guess I've never really tried.  If possible, this would be handy so the conditional doesn't have to be evaluated every time the preexec is called.
    Last edited by Trilby (2013-05-22 19:37:44)

  • Auto-complete for the email addresses in the mail app is not working

    Hi, could somebody kindly help, please?
    I have just got a new iphone 5s after my old 5 got broken. When I got the new 5s one I had to restore everything from the back-up copy I had on my ipad or in my icloud, whatever.
    The problem is that in the standard mail app which you have at the bottom of the screen auto-complete for the email addresses is not working on this new iphone. However, it still works on the ipad.
    Can I turn it on somewhere or is it a bug? I remember When my old iohone was new as well as the ipad and ipod, I did not have to turn on anything. The recent email addresses list (appears when one starts to type an address in the address bar when writing a new email message) appeared automatically. And on this phone it doesn't appear at all. It doesn't suggest me any recent or whichever email addresses and I am really lazy to type an address each time.
    Could this be solved?
    Many thanks in advance for the eventual help.
    Olia

    I am also getting same problem...................anybody please help.

  • Can't disable Web Address Auto-complete in Safari nor Firefox

    Hi there,
    I am trying to disable the web address auto-complete in order to access my Intranet Server. I tried configuration inside Web Browser (firefox) but doesn't work. Seems to be system configuration since is the same with Safari. If I enter the address http://myserver:8080 always autocompletes to http://www.myserver.com:8080 and can't access the Intranet web server...
    Thanks in advance for the help.
    Pepe
    Mac OSX 10.6.2

    Safari and Firefox, both have a configuration utility to solve this. In Firefox, writing about:config in the address bar and look for the features that contains the prefix www and the suffix .com, clear those two fields and that's it.
    So, the problem was browser related, not system related.
    Thanks

  • Problem using  auto-complete SQL Developer

    Hi everyone ...
    I'm having a problem using the SQL Developer 3.2.20.09 87 ... when I try to use auto-complete in a 'SELECT' clause at a specific table (EX: clients.cod_client), if I have more tables in my 'FROM' clause, the program shows all columns from all tables. Even if I have specified the table I want to show the columns (like the exemple: clients.<columns>) ...
    I've tryed to change the properties at preferences->insight ... but there's no option to change it there.
    So, if anyone have faced this problem and solved, please help me ;)

    Hi,
    There is a specific forum for this kind of question which are not related to PL/SQL: {forum:id=260}
    Please mark this question as answered and post your question there.
    Regards.
    Al

  • The URL does not auto complete nor does the favicon display

    When I type in a partial URL, such as apple, it used to be completed to the full URL and display the Apple favicon.  It now goes to the website, but the typed word, apple, remains without completing the URL.  The favicon remains as a blue dot.
    I have reinstalled Lion, to solve other issues which have been resolved.  The Safari issue is not resolved.  I cannot download a new Safari copy for the only Safari 5.1 available in support > downloads is for Snow Leopard.
    I know many don't like the auto complete URL feature, but I like to know the full address.

    Go to ~/Library/Safari.
    Move the WebpageIcons.db and the LastSesssion.plist files from the Safari folder to the Trash.
    Now go to ~/Library/Caches/com.apple.Safari.
    Move the Cache.db file from the com.apple.Safari folder to the Trash.
    ~ (Tilde) represents the Home folder.
    For LIon:   To find the Home folder in OS X Lion, open the Finder, hold the Option key, and choose Go > Library
    Unfortunately, the only way to reinstall Safari if necessary is to use Lion Recovery.

  • Auto Complete Text

    How do I turn off the auto complete in texting?  It is a nuisance.  Thanks. 

    No, the 8330 doesn't.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to remove entries from the new auto-complete ?

    Firefox 33 came with a new auto-complete for forms. Unfortunately I cannot seem to delete the auto-complete suggestions once they have been stored. This is necessary functionality for things like mis-spelled words, where you want to get rid of the old (bad) auto-complete entry, or where username was changed on a form, etc. With the older versions, you could just press delete key on highlighted auto-complete suggestion and it would be removed, but this functionality does not work with the new auto-complete. The only workaround I have been able to find so far is to clear the browser history for the last 1 hour, but that wipes out good history as well as the error.

    Hello,
    Can you '''try Firefox Safe Mode''' and see if you have the same problem there? [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • ADF: auto complete in tutorial does not work

    Hi all,
    I'm studying ADF tutorials. Developing Rich Web Applications with Oracle ADF tutorial has a sample of Auto-complete property. I followed the tutorial from the first step but cannot go further because At Part 3, Step 3 it is not possible to drag an Autocomplete Behaviour onto Combobox. Futhermore in the screenshots, it seems possible to type into Combobox which i never see such an example before.
    This is the link of the Step that i'm talking about:
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_55/jdtut_11r2_55_3.html
    Thanks in advance,

    I finally found a way to correct it. When you drag and drop the whole view, JobID is type of Combo Box but it should be Input List of Values (Combo Box). To solve this you need to only delete that combo box (not the whole structure) and drag and drop the Job ID again. This time select List Of Values so it becomes a combo box with editable area. This part is not mentioned in the tutorial makes the confusion.
    Edit: I just see your edit, the forum link points out the same problem. This is the workaround. Unfortunately one of the basic tutorials of Oracle ADF is confusing.
    Edited by: elmariachi on Jan 4, 2013 12:22 PM

  • Auto Complete feature in input field

    Hi,
    I had a requirement like user gives the data in input field in the screen. If he start typing the data in input field the list of possible values should display automatically for Eg in google if we type 'A' the list of values will come. The  same thing is possible in Screen or not. I have searched SDN. For web applications it is available. Please help to solve the issue.
    Regards,
    Venkatesh.

    Hey, cor-rel thanks for your time but that didn't work for me.if you some programming solutions or any other please let me know.
    use this link to get more familiar with problem
    http://www.jadooghar.com/AjaxSolrSearch?query=vasant+kunj&what=&type_radio=on&for_radio=on&property_type=Residential&property_for=Sale
    type "vasant kunj" manually in the "where" box 3-4 times so that firefox could generate auto suggestions for you then type "va" firefox will show you the auto complete suggestions. After that focus on auto complete and press "enter" then analyze the result with auto complete and without auto complete i .e manual typing

Maybe you are looking for