News for hackers. Stuff that matters.
Re:Zsh-lovers – tips, tricks and examples for the Z shell by kbouw on Saturday March 30, 2013 @12:39PM (#5465893)
Same, i'm rather new to using zsh but it would help greatly if there was a comparative list between bash and zsh defining the differences. It was suggested to me by a couple of friends but at this stage, i'm not clear on why I would benefit from using zsh over bash.
Re:Zsh-lovers – tips, tricks and examples for the Z shell by pyre on Saturday March 30, 2013 @02:07PM (#5466162)
I don't know if bash has this, but some commands have tab-completion on the arguments, with a listing for multiple hits:

  $ tar --c<tab>
  --check-device                   -- check device numbers when creating incremental                                                              
  --check-links                    -- print a message if not all links are dumped                                                                 
  --checkpoint                     -- display progress messages every NUMBERth record                                                             
  --checkpoint-action              -- execute ACTION on each checkpoint                                                                           
  --compare                        -- find differences between archive and file system                                                            
  --compress                       -- filter the archive through compress                                                                         
  --concatenate        --catenate  -- append tar files to an archive                                                                              
  --confirmation                   -- ask for confirmation for every action                                                                       
  --create                         -- create a new archive
Re:Zsh-lovers – tips, tricks and examples for the Z shell by entropie on Saturday March 30, 2013 @02:46PM (#5466277)
Bash can do this too.
Re:Zsh-lovers – tips, tricks and examples for the Z shell by pyre on Sunday March 31, 2013 @12:21AM (#5467693)
I know that bash can do completion. I just wasn't aware if bash dot '--c<tab>' completion, or if it listed possible completions for that.
Re:Zsh-lovers – tips, tricks and examples for the Z shell by tomsthumb on Saturday March 30, 2013 @03:42PM (#5466414)
How? That would be handy...
Re:Zsh-lovers – tips, tricks and examples for the Z shell by thebillywayne on Saturday March 30, 2013 @04:21PM (#5466548)
Install the bash-completion package. [1] You'll then find a directory /etc/bash_completion.d/ which has all of the commands the package knows about. The number of commands can be extended.

[1] http://bash-completion.alioth.debian.org/

Re:Zsh-lovers – tips, tricks and examples for the Z shell by e12e on Saturday March 30, 2013 @04:21PM (#5466550)
On a Debian derivate distribution, do:

  sudo aptitude install bash-completion #or apt-get install...
  #Then in your .bashrc do something like:
  # enable programmable completion features (you don't need to enable
  # this, if it's already enabled in /etc/bash.bashrc).
  if [ -f /etc/bash_completion ]
  then
      . /etc/bash_completion
  fi
The latter (or equivalent) is already in /etc/skel/.bashrc on Debian at least (provided by the bash package), so users created with eg. adduser already have this in their .bashrc. IIRC it may be commented out in Debian stable - I currently run testing, and /etc/skel/.bashrc there contains:

  # 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

edit: missing words
Re:Zsh-lovers – tips, tricks and examples for the Z shell by sliverstorm on Saturday March 30, 2013 @01:41PM (#5466075)
There's just a lot of nifty little features. Two of the most important for me have been shared history between my 20+ terminal sessions, and properly handling wrapping of the command prompt. I am sure bash can wrap properly, but I couldn't figure out why it wasn't and zsh never gave me that problem!