I was first introduced to zsh when I was using SystemRescueCD (Gentoo based utility disk), and I really liked it's tab completion.
[img]http://imgur.com/85VhK.png[/img]
I just typed cd, and pressed tab. The directory names will go away after I complete the command and press enter, unlike in bash.
It also works as a convenient "man page"
[img]http://imgur.com/cz1lq.png[/img]
Just type a command and press tab. It depends on the command though. Since mkdir uses a '-' before the options, you need the '-'. But for git, you just press tab.
And I set my prompt up to show the branch in git (bash could do this too):
[img]http://imgur.com/dYc02.png[/img]
My .zshrc:
[code]
export HISTSIZE=1000
export SAVEHIST=1000
export HISTFILE=~/.zhistory
export EDITOR="vim"
setopt inc_append_history
setopt correctall #autocorrect misspelled commands
setopt hist_ignore_all_dups #ignore dups in history
setopt autocd # % /etc = cd /etc
bindkey "\e[H" beginning-of-line #home (xorg)
bindkey "\e[1~" beginning-of-line #home (console)
bindkey "\e[F" end-of-line #end (xorg)
bindkey "\e[4~" end-of-line #end(console)
bindkey "\e[3~" delete-char #delete key
setopt PROMPT_SUBST
fpath=($fpath ~/.zsh/functions)
autoload -U ~/.zsh/functions/*(:t)
#Used for git stuff
typeset -ga preexec_functions
typeset -ga precmd_functions
typeset -ga chpwd_functions
# Append git functions needed for prompt.
preexec_functions+='preexec_update_git_vars'
precmd_functions+='precmd_update_git_vars'
chpwd_functions+='chpwd_update_git_vars'
#use LS_COLORS
alias ls='ls --color=auto'
#Load zsh tab completion
autoload -U compinit
compinit
autoload -U colors
colors
#Use the Gentoo prompt style
autoload -U promptinit
promptinit
PROMPT=$'%B%F{green}%n@%m%k %B%F{blue}%1~ $(prompt_git_info)%B%F{blue}%# %b%f%k'
[/code]
Anyone else use zsh? (I think Buttsex does)
Erhm, bash does exactly the same for me...
[img]http://imgkk.com/i/2htf.png[/img]
zsh is for cool kids only
also, I'm stealing you zshrc
Baldr. This is how bash does tab completion.
[img]http://imgur.com/1qggh.png[/img]
It gives you a whole new line to finish the command on instead of using the same one.
[img]http://imgkk.com/i/-etk.png[/img]
spelling correction, one of the coolest features in zsh
Found a couple options for zsh
[code]
setopt nocheckjobs #don't warn about bg processes on exit
setopt nohup #don't kill bg processes on exit
[/code]So this should allow me to start an SSH session and run a process in the background, and keep it running when I disconnect without having to use GNU screen or the nohup command directly.
[QUOTE=PvtCupcakes;21378567]Found a couple options for zsh
[code]
setopt nocheckjobs #don't warn about bg processes on exit
setopt nohup #don't kill bg processes on exit
[/code]So this should allow me to start an SSH session and run a process in the background, and keep it running when I disconnect without having to use GNU screen or the nohup command directly.[/QUOTE]
dtach?
zsh is good, though i don't need to compile bytecode or use floating point arithmetic in my shell.
How can I make zsh stop trying to do autocorrect for just the mv command?
[code]
gentoobox ~ # mv /home/casey/Downloads/Pure.Pwnage.S03E08.Pwnageddon.mkv /media/disk/videos/pure_pwnage/pp_ep8.mkv
zsh: correct '/media/disk/videos/pure_pwnage/pp_ep8.mkv' to '/media/disk/videos/pure_pwnage/pp_ep7.mkv' [nyae]? n
[/code]
I'm worried that one of these days I'm gonna overwrite something with that.
Sorry, you need to Log In to post a reply to this thread.