csh is assumed to exist, and that's not always so
Brought to you by:
tringali
I added an extra -D__LINUX__ in the Linux Makefile
to use /bin/sh instead of /bin/csh, and changed in file.c
tmpnam to mkstemp, so my linker wouldn't complain anymore
and I added little "make install" and "make uninstall" options.
None
Logged In: YES
user_id=11321
Which Linux distro has the problem? We try to keep the
makefiles very simple so that they need no modifications.
I don't think we'll use the 'make install/uninstall' just
yet. NEdit has a one-binary zero-install policy that we're
keeping.
But if there are compile and linker problems on your distro,
please let us know exactly what they are.
Logged In: YES
user_id=38210
my linker complains about tmpnam in file.c.
I changed it to mkstemp. Works well on my
Debian unstable box.
/bin/sh should be the standard shell for Linux OS's,
because I don't have /bin/csh installed and therefore
shell commands from NEdit won't work.
Logged In: YES
user_id=11321
Okay, the warning about tmpnam I can live with. However, if
we're relying on /bin/csh being around, and it's not, we
need to fix it.
Is there any way NEdit can fall back on /bin/sh gracefully?
Or perphaps not encode csh into the executable, letting the
system pick? One would think we should use whatever shell
the user has as a default.
This patch is awful large, so I really can't review your
changes. Did you really change a few thousand lines of
code?
Logged In: YES
user_id=38210
Ignore the patch. It's somehow messed up.
(some hidden CVS file has been included....)
However, to get NEdit working with /bin/sh
I added the -D__LINUX__ option, because
there is something similar with __MVS__,
to use /bin/sh in preferences.c. There is an
environment variable SHELL on my system that
points to /bin/bash. getenv that variable and use
it's value. Otherwise use /bin/sh as the default shell,
because it is anyway the standard on most *nix systems.
Logged In: YES
user_id=15180
Ok, tmpnam() is still inside, but IIRC the
code is at least able to handle this
correctly. BTW, why didn't we use tmpfile()?
(yeah, probably discussed already)
What about the csh issue? I think I'll
change things at least for OS/2.
Logged In: YES
user_id=119143
This patch seems to get a bit stale, last input was over a
year ago. Can it be closed?
Logged In: YES
user_id=119143
Can this be closed, please?
Logged In: YES
user_id=11321
I think the patch for csh is inappopriate. But we have a
small bug where we assume csh is installed on the system
(and some dependencies on that), and I was hoping that we
could somehow "automatically" fall back to /bin/sh if csh is
not available. The user should modify the nedit.shell
X-resource instead of recompiling, though.
Renamed title and changed to bug.
Logged In: YES
user_id=119143
Falling back to /bin/sh is not enough, at least one shell
command must be changed. That shouldn't be too hard though,
there is already a special version for Linux in preferences.c.
Logged In: YES
user_id=119143
I think the old default should be changed, even if it means
that some users would have change their ~/.Xdefaults to keep
the same behavior.
I suggest to add a function
char* GetDefaultShell()
which would return one of:
- the user's login shell if there's any POSIX way to find out,
- ${SHELL},
- /bin/sh, which is the most common subset.
About the default shell commands: The 'wc' command seems to
be the only one that would need to be changed, and awk
should do:
wc | awk '{print $1 " words, " $2 " lines, " $3 "
characters"}'
Could someone verify this for a csh?
Logged In: YES
user_id=119143
This Patch changes the default shell to 'sh'.
Changes the default shell to 'sh'
Changes the default shell to the user's login shell
Logged In: YES
user_id=119143
This Patch changes the default shell to the user's login shell.
Logged In: YES
user_id=59261
Couldn't the shell be a configurable option at run time?
In any case, it seems like /bin/sh is the more natural default.
I don't have csh installed and I get errors. I can't even
run /bin/sh through Execute (alt-X) because
it needs csh to launch sh.
Logged In: YES
user_id=918104
>Couldn't the shell be a configurable option at run time?
If you could read the online help, you could find it is.
Add
nedit.shell: /bin/sh
to your X resources.