Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror

Comment Re:So Where Exactly is this 'Leaked' Document? (Score 2, Insightful) 775

Amending the Constitution requires ratification by the legislatures of 3/4 of the several states. Ratifying a treaty, I believe, requires only 2/3 of the Senate alone. Not exactly comparable. If you wanted to end-run the current Constitution, these twisty little passages are not alike.

Comment Re:Not the only choice (Score 1) 278

I guess this topic's dead but: yeah, I tried it briefly and stuck to bash. Zsh was just really overcomplicated for me in what seemed like a "frilly" way. I'm willing to entertain the notion that I didn't give it a fair shake but I just didn't see anything I had to have - I can usually beat bash into submission and make it do what I want. For instance, I find my bash colors simpler and more readable than your zsh example, though I define the colors instead of having the shell do it for me:

I create a ~/.pscolors:

black="\[\e[0;30m\]"
red="\[\e[0;31m\]"
green="\[\e[0;32m\]"
yellow="\[\e[0;33m\]"
blue="\[\e[0;34m\]"
magenta="\[\e[0;35m\]"
cyan="\[\e[0;36m\]"
white="\[\e[0;37m\]"
 
gray="\[\e[1;30m\]"
bred="\[\e[1;31m\]"
bgreen="\[\e[1;32m\]"
byellow="\[\e[1;33m\]"
bblue="\[\e[1;34m\]"
bmagenta="\[\e[1;35m\]"
bcyan="\[\e[1;36m\]"
bwhite="\[\e[1;37m\]"
 
normal="\[\e[0m\]"

so the relevant parts of ~/.bashrc are only:

if [ -r $HOME/.pscolors ]; then
    . $HOME/.pscolors
else
    echo "bashrc: can't read .pscolors"
fi
 
export PS1="\n${bgreen}[ ${bblue}\u${white}@${bblue}\h ${bgreen}]\
[ ${magenta}\D{%m-%d %H:%M} ${bgreen}]\
[ ${byellow}\w ${bgreen}]${normal}\n${white}:${normal}"

which results in:

[ j@surfandslam ][ 08-14 15:11 ][ ~/af/classic/Pink_Floyd_1971_Meddle ]
:_

where my background is black, the brackets are green, the @ is white, the username/hostname is blue, the date is magenta, and the working directory is yellow, the colon is white (and the underscore represents the cursor where everything typed is gray), and commands are separated by at least one blank line.

In my 'set' output, I get 132 lines of variables (many of which are mine - including the colors since I don't bother to clean up the assignments), I use a truncated ~/.bash_completion that takes it to 587, and babble my own functions down to line 1013. So I'm more guilty of cluttering the environment than bash is and, also, coming from a DOS mentality, I *still* revel in being able to have a gigantic environment, so it doesn't bother me either way.

Bash doesn't have associative arrays, but it has indexed arrays and awk has associative arrays. Etc. etc. I'm not saying bash is a perfect shell (by any stretch) or that zsh is a bad one. I just find bash more comfortable and think I might have felt the same way about ksh if that'd been my first *nix shell and would probably still feel the same way about zsh. (Except that ksh also has associative arrays, so I'd probably be slightly less interested in zsh.) (IOW, I'm more likely to switch to ksh than zsh, though I don't see ever switching to either.)

Slashdot Top Deals

The life of a repo man is always intense.

Working...