[SOLVED] trollinger64 and tab completion
Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
[SOLVED] trollinger64 and tab completion
Problem: 'sudo leafpa' does not complete. Expecting it to complete as 'sudo leafpad' but this does not happen.
I've believe all required packages are installed so think it's a configuration file problem. Have searched here and on the wiki. Google comes up with many solutions but nothing I can put a finger on. Seems to work ok on siduction so copied a number of files over from siduction install with no luck. (i think these files are the same anyway).
Being stupid, I know I'm missing something stupid . . . what is it?
[edit] this is latest trollinger64 image. I have not, and don't intend to, do a dist-upgrade on this although I've done an update and some packages may have updated installing additional stuff.
I've believe all required packages are installed so think it's a configuration file problem. Have searched here and on the wiki. Google comes up with many solutions but nothing I can put a finger on. Seems to work ok on siduction so copied a number of files over from siduction install with no luck. (i think these files are the same anyway).
Being stupid, I know I'm missing something stupid . . . what is it?
[edit] this is latest trollinger64 image. I have not, and don't intend to, do a dist-upgrade on this although I've done an update and some packages may have updated installing additional stuff.
Last edited by gurtid on Tue Jul 09, 2013 12:37 am, edited 1 time in total.
The Beaver Destroys Forests
Re: trollinger64 and tab completion
Installed or live? It works on my live USB.
Do other commands complete correctly? Does "leafpa" complete correctly if you don't use "sudo"?
Do other commands complete correctly? Does "leafpa" complete correctly if you don't use "sudo"?
Re: trollinger64 and tab completion
trollinger64 is installed.
'leafpa' completes ok
'sudo leafpa' does not
'apt-cach' does
'apt-cache polic' does not
'sudo apt-cach' does not
'sudo apt-cache polic' does not
'leafpad /etc/sudoer' does
'sudo leafpad /etc/sudoer' does
. . . so paths seem to be ok. Problem appears to be with second and subsequent parts of commandline and not a sudo issue.
I copied /etc/bash.bashrc and entire contents of /usr/share/bash-completion from siduction xfce (latest release). I modified my sudoers file and compared etc/inputrc files (just a quick and basic visual).
'leafpa' completes ok
'sudo leafpa' does not
'apt-cach' does
'apt-cache polic' does not
'sudo apt-cach' does not
'sudo apt-cache polic' does not
'leafpad /etc/sudoer' does
'sudo leafpad /etc/sudoer' does
. . . so paths seem to be ok. Problem appears to be with second and subsequent parts of commandline and not a sudo issue.
I copied /etc/bash.bashrc and entire contents of /usr/share/bash-completion from siduction xfce (latest release). I modified my sudoers file and compared etc/inputrc files (just a quick and basic visual).
The Beaver Destroys Forests
Re: trollinger64 and tab completion
Wow. You are able to break things in really amazing ways. I am impressed. Unfortunately, I have no idea what could be wrong.
(I know that's not helpful, but it's all I got right now. Maybe if I think about it for a while. Or maybe someone else sees something obvious)
(I know that's not helpful, but it's all I got right now. Maybe if I think about it for a while. Or maybe someone else sees something obvious)
Re: trollinger64 and tab completion
tu pidsley :D.
np . . . thanks for looking anyway. yes, it's an interesting, and mildly annoying, problem.
np . . . thanks for looking anyway. yes, it's an interesting, and mildly annoying, problem.
The Beaver Destroys Forests
Re: trollinger64 and tab completion
You could try switching to zsh to see if it's a bash thing -- you don't even have to chsh; just type "zsh" at a bash prompt (you might need to install zsh first). You should be using zsh anyway... :)
Re: trollinger64 and tab completion
completion works ok with zsh . . . You say i should be using zsh anyway? I guess i should read up a bit about it . . .
The Beaver Destroys Forests
Re: trollinger64 and tab completion
bacon likes oh-my-zsh: http://linuxbbq.org/bbs/viewtopic.php?f ... =zsh#p4443
I like the grml zsh config: http://grml.org/zsh/
I like the grml zsh config: http://grml.org/zsh/
Re: trollinger64 and tab completion
ok have read everything and am changing default to zsh . . . tu pidsley.
initial issue still bugs me but . . .
[edit] oh . . . posted while you were posting. Will read up about the different flavours before changing. Tu.
initial issue still bugs me but . . .
[edit] oh . . . posted while you were posting. Will read up about the different flavours before changing. Tu.
The Beaver Destroys Forests
Re: trollinger64 and tab completion
You can use zsh without either omz or grml, they just add extra (useful) stuff to your .zshrc.
Here is another resource: https://wiki.archlinux.org/index.php/Zsh (ignore the Arch-specific stuff).
One different thing is how zsh does the user prompt. There is information about setting it up in the Arch page.
Here is mine:
And it looks like this:
Have fun. :)
Here is another resource: https://wiki.archlinux.org/index.php/Zsh (ignore the Arch-specific stuff).
One different thing is how zsh does the user prompt. There is information about setting it up in the Arch page.
Here is mine:
Code: Select all
PROMPT='%{$fg[green]%}[%{$fg[cyan]%}%T %{$fg[green]%}%m:%{$fg[cyan]%}%~]%{$reset_color%} %# '
Have fun. :)
Re: trollinger64 and tab completion
awesome - thanks for this info pidsley :)
The Beaver Destroys Forests
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: trollinger64 and tab completion
I must say I used to like grml's zsh config, just stumbled over ohmyzsh and thought I give it a try. It's not better or worse, just different.
About the original problem:
That's the default .bashrc :)
About the original problem:
Code: Select all
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
TERM='rxvt-unicode'
COLORTERM='rxvt-unicode-256color'
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh 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) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;36m\]\u@\h\[\033[01;36m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'
fi
# some more ls aliases
# taken from the LinuxNoob forums
alias upd='sudo apt-get update'
alias upg='sudo apt-get update && sudo apt-get upgrade'
alias please='sudo !!'
alias purge='sudo apt-get purge'
alias brc='nano ~/.bashrc'
alias search='apt-cache search'
## Space on drive
alias disk='du -S | sort -n -r |more'
# search
alias where="which"
alias what="apropos"
alias apr="apropos"
alias ff="find . -type f -name"
# navigation
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../../"
alias ......="cd ../../../../.."
alias fonts="cd /usr/share/fonts"
alias scripts="cd $HOME/scripts"
#### SAFETY ####
alias rm='rm -Iv --preserve-root'
alias mv='mv -iv'
alias cp='cp -iv'
alias ln='ln -i'
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'
alias shred='shred -n 100 -z -v -u'
#### REBOOT/SHUTDOWN ####
alias reboot='sudo /sbin/reboot'
alias poweroff='sudo /sbin/poweroff'
alias halt='sudo /sbin/halt'
alias shutdown='sudo /sbin/shutdown'
# alias to install iceweasel aurora - safe to remove after use
alias alpha='sudo apt-get update && sudo apt-get install -t experimental iceweasel'
# Automatically do an ls after each cd
cd() {
if [ -n "$1" ]; then
builtin cd "$@" && ls --group-directories-first
else
builtin cd ~ && ls --group-directories-first
fi
}
HISTFILESIZE=100000000
HISTSIZE=100000
# 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 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 ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
#fortune apprentice | cowsay
date
..gnutella..
Re: trollinger64 and tab completion
hmmmmmmmmmmmm . . . well I guess i'm stupid for not realising i didn't have a ~/.bashrc in trollinger.
The Beaver Destroys Forests
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: trollinger64 and tab completion
Are you saying it should be zsh out of the box? . . . because my shell was bash and I've now changed to zsh.
For my own peace of mind I temporarily switched back to bash with a ~/.bashrc. Tab completion worked as expected.
For my own peace of mind I temporarily switched back to bash with a ~/.bashrc. Tab completion worked as expected.
The Beaver Destroys Forests
Re: trollinger64 and tab completion
Yes, that's what he's saying, and I should have checked. Did you create a new user, and specify /bin/bash for the shell when you did? The default "bbq" user has zsh for a shell.
http://linuxbbq.org/bbs/viewtopic.php?f=3&t=174
http://linuxbbq.org/bbs/viewtopic.php?f=3&t=174
Re: trollinger64 and tab completion
Ah well isn't that interesting . . . :)
Yes, I created a new user. I can only vaguely recall being offered a shell option but can't remember what I did. I would think that I wouldn't have known what to do (until now that is :)) and left it as default. I guess if bash is selected as the shell, a default ~/.bashrc should be created . . . ???
I'll do a reinstall on a spare partition when I get the chance and see what happens.
Anyway, this has been a great wee learning experience. Most enjoyable. Thanks guys.
Yes, I created a new user. I can only vaguely recall being offered a shell option but can't remember what I did. I would think that I wouldn't have known what to do (until now that is :)) and left it as default. I guess if bash is selected as the shell, a default ~/.bashrc should be created . . . ???
I'll do a reinstall on a spare partition when I get the chance and see what happens.
Anyway, this has been a great wee learning experience. Most enjoyable. Thanks guys.
The Beaver Destroys Forests
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: [SOLVED] trollinger64 and tab completion
gurtid, yes I could have added a .bashrc even though bash is not the default shell. Means: if the shell is selected (chsh) you can select the path, and after this bashrc is read from the user directory. If there is none, it reads it from the system-wide /etc/bash.bashrc, which features no tab completion, for example. When a new user is created, the bashrc is coming from /etc/skel/, provided it is existing there. If it's not there, /etc/bash.bashrc is the default.
zsh is there in /etc/skel, so it is used for new users. It's in /home/user/, too, and recently, for newer releases, a more complete one additionally in /home/user/bin/ :)
zsh is there in /etc/skel, so it is used for new users. It's in /home/user/, too, and recently, for newer releases, a more complete one additionally in /home/user/bin/ :)
..gnutella..
Re: [SOLVED] trollinger64 and tab completion
. . . in my book you rock whateverTF you decide to do. This has been excellent :)
The Beaver Destroys Forests