Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zsh as a file manager



I sent some comments to Peter Stephenson about his article in
http://www.bash2zsh.com/essays/essay1_file_manager.html and he
suggested me to send a mail to the list, so here it is:
The "problem" I had when I used zsh as my main file manager was the
constant tipying of ls after I realized an operation, then I modified
my precmd command to do an ls. I have several aliases and a couple of
variables to control it. I also tried with the ls in another window,
ala viewglob (in X I used another xterm, else with splitvt or screen),
but I find better the current behaviour. Probably an experienced user
can find a better way to achieve this, and I would really like to hear
what you have to say. This is an extract from my .zshrc:

function precmd {
 if [ $FMMODE = true ]; then
   echo -n '\n::: '
   pwd
   echo $FMCMD
 fi
}

# files mode
alias fm='export FMMODE="true" FMCMD="`ls`"'
# files list
alias flist='export FMMODE="true" FMCMD="`ls -ll`"'
# files images
alias fimg='export FMMODE="true" FMCMD="`ls -d */|sed 's/\///g'; echo
; ls *.(png|jpg|jpeg|bmp|xmp|xcf|tif|tiff)`"'
# files music
alias fmus='export FMMODE="true" FMCMD="`ls -d */|sed 's/\///g'; echo
; ls *.(mp3|ogg)`"'
# files off
alias foff='export FMMODE="false"'

I hope you find this useful, and I am wayting for your comments.


Regards,

--


- yiyus || JGL .

PS: I just subscribed to this ml and I want to say that zsh is GREAAAAT!



Messages sorted by: Reverse Date, Date, Thread, Author