SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: Which shell do you use for interactive use?
sh
4
4.17%
bash
80
83.33%
ksh
4
4.17%
pdksh
0
0%
mksh
1
1.04%
csh
1
1.04%
tcsh
4
4.17%
fish
3
3.13%
zsh
8
8.33%
Multiple Choice Poll. Voters: 96. You may not vote on this poll
Cool, gezley! thanks. I might try some of those options.
I do think you have a typo in your .tshrc though:
Code:
# set editor
setenv EDITOR vi
"vi" is not how you spell emacs ;^)
haha! I wasn't getting anywhere with evil in emacs so I'm back to square one: learn vim thoroughly this time, and then, and only then, dump vim and use emacs with evil. Evil, I know, but vim really does have superior keys, and emacs has org-mode. Therefore, it has to be vim until I can use the evil emacs!
I personally did bash -> busybox's ash -> bash -> mksh -> dash -> bash -> mksh.
Strictly shell-scripting-wise I could live with dash actually, but the lack of completion is just a pity and the busybox's ash, which has one, is not very handy for packaging (kernel-like interactive configuration). So, mksh, while being "fat" for my usage, remains lighter and faster than bash and, more than all, doesn't mess with long command lines when there are ANSI color sequences in the prompt (a recurrent problem making me mad with bash). Once you learn to remove the leading spaces on the command line (they prevent this one to be added to the history, feature for which I never found any useful case and which I really wish it could be disabled, at least at compile-time), it's a simple and nice shell to use. That's why all my local shell stuff is nowadays "#!/bin/mksh".
I personally did bash -> busybox's ash -> bash -> mksh -> dash -> bash -> mksh.
Strictly shell-scripting-wise I could live with dash actually, but the lack of completion is just a pity and the busybox's ash, which has one, is not very handy for packaging (kernel-like interactive configuration). So, mksh, while being "fat" for my usage, remains lighter and faster than bash and, more than all, doesn't mess with long command lines when there are ANSI color sequences in the prompt (a recurrent problem making me mad with bash). Once you learn to remove the leading spaces on the command line (they prevent this one to be added to the history, feature for which I never found any useful case and which I really wish it could be disabled, at least at compile-time), it's a simple and nice shell to use. That's why all my local shell stuff is nowadays "#!/bin/mksh".
I really like mksh, and Thorsten went far beyond the call of duty some time ago to help me with a query I had. I appreciated that and will continue to use and recommend mksh.
Fifteen years ago, tcsh was my primary shell, but these days I only use it on my laptop (mostly because of inertia) and bash on all of my other machines.
The only tcsh features I really miss under bash are the "time" output format and the "repeat" builtin.
The output of tcsh's "time" can be approximated under bash with appropriate $TIMEFORMAT, but it's a pain setting that up on all of my machines, and I'm not supposed to on the servers at work anyway, so I just don't bother and sigh occasionally in remembrance of tcsh's output. It's not a big deal.
I wouldn't mind bash so much if I used Linux exclusively. It just doesn't sit right with my BSD temperament to install it on NetBSD. tcsh and mksh feel native on both Slack and NetBSD.
OSX uses it, too.
Not that I'm a big fan of OSX; I just have to use it at work.
A colleague of mine had come up with the idea that if having a directory of executable/readable scripts are good for the OS, then they are good for you too.
The beginning of .bashrc
Code:
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# setup environment for any login
export TEMP=/tmp/${USER}
export TMP=${TEMP}
mkdir -p ${TEMP}
# setup environment for interactive logins
if [ "$PS1" ] ; then
# source environment settings
if [ -d ~/etc/env.d ] ; then
for f in $(find ~/etc/env.d -type f); do
. $f
done
fi
fi
The beginning of ~/.bash_profile
Code:
# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/login.defs
#umask 022
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# add the user's bin to the PATH
if [ -d ~/bin ] ; then
PATH=~/bin:"${PATH}"
fi
# add other path elements
if [ -d ~/etc/path.d ] ; then
for f in $(find ~/etc/path.d -type f); do
. $f
done
fi
This kinda-sorta matches what you can do with /etc/profile.d with the difference that you can split path and environment manipulation and (of course) it's only for your login.
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609
Rep:
Quote:
Originally Posted by Richard Cranium
A colleague of mine had come up with the idea that if having a directory of executable/readable scripts are good for the OS, then they are good for you too.
[...]
If it seems like overkill to you, both my colleague and I are software engineers. It wasn't overkill to us.
I don't have the exact same setup (I had something similar at once, but I decided to reduce startup complexity for portability concerns), but I agree about having a home's own set of /bin /etc... It's important to install things locally for the user... I'm a software developer too so this might explains that .
Edit: one thing about the dir script containers is that you might need to prepend scripts with some number to control execution order (sometimes it matters).
Last edited by NoStressHQ; 06-24-2016 at 10:17 PM.
I don't have the exact same setup (I had something similar at once, but I decided to reduce startup complexity for portability concerns), but I agree about having a home's own set of /bin /etc... It's important to install things locally for the user... I'm a software developer too so this might explains that .
Edit: one thing about the dir script containers is that you might need to prepend scripts with some number to control execution order (sometimes it matters).
Yep, valid point. You'd have to sort the listing in that case. (It hasn't bitten my behind yet, so I haven't implemented it. *That* isn't the software engineer side of me. If it were work related, I'd sort the listing.)
Same here. I'm a lazy person, that's why I really like all the stuff zsh does, even though it sometimes seems to be a bit overkill for a shell. As long as it doesn't use the same amount of memory as KDE, I'm ok with that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.