Before this, changing the locale settings via Locale preflet required
a reboot in order for the changes to get picked up by programs running
on Terminal.
Fixes: #18734
Change-Id: I149931c511020f9eb881e71f79d1fd6c647477e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7792
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
The 'whence' function defined in /etc/profile serves a limited purpose
with Bash as the default shell. Bash already provides
which/type/command as built-ins, which the function simply wraps.
Additionally, zsh has a built-in 'whence' command, which is masked by
the definition in /etc/profile. The function does not work under zsh,
breaking core zsh functionality as a result.
Fixes #18612
Change-Id: Ia34d95ffd58b2cb06d71145a217a9017657fa4a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6979
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This makes sure that apps get access to these variables regardless if
they are started from a shell or from GUI (double-click from Tracker,
desklink, etc).
Fixes #18130.
Change-Id: I82e2884e460fad7d6ec16e7b624c5cd2fcf807df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5897
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Technically the profile is supposed to be sourced, but it seems that
some scenarios / applications do not do this and instead run it.
Before the recent changes to PS1, it was also exported, and now
it is again. Should fix entering HaikuPorter chroots under the new profile.
Also renamed "ARCH" to "_ARCH" to better accomodate those
who are sourcing this file, in case they want to pass a variable
named ARCH through.
As expected there was a lot of bikeshedding.
Just change the color of the path, green on success, red on failure.
Constraints taken into account:
- Keep the > for now
- Prompt should be as compact as possible for those of us using 80
column terminals.
- Prompt should not change size between success and error cases
Not taken into account:
- The feature should be accessible to colorblind people (we could
replace the > with another char but we couldn't find something that
looks suitable)
An example of the new prompt line format is:
~/Desktop/haiku :) $
Or if the last command exited in failure:
~/Desktop/haiku :( $
The smiley-face will be either dark green or red, also depending on
the command status.
I realize this could be a tad controversial, especially for those used
to the old prompt, but it seems to be a pretty useful feature to me
(and of course kallisti5 came up with it.) But if the bikeshed turns
out to be too large, we can revert it and deal with it after the beta.
As for $ vs > -- BeOS R5 used $, most modern Linux uses $, and having >
come after a space looks much stranger.
These changes were made to etc/profile by PulkoMandy last year, but he missed
making the change in SetupEnvironment. etc/profile calls SetupEnvironment,
so we can consolidate all this there.
Also clean up some syntax.
Since hrev51075, locale -m changed meaning to the one expected by POSIX
(it now lists character maps, instead of giving the current language).
Since the short options may change again (locale -c is still not doing
what POSIX requires), use long options instead. This is more readable
and POSIX doesn't specify anything there so we can name them however we
want.
Fixes date parsing in Python which relies on these variables to detect
the current locale.
* This also updates /etc/profile to detect whether our
parent process is a shell, and changes the banner
message accordingly.
* Also, pipe errors to /dev/null, in case grep is not
installed; this allows us to not require grep as a
dependency, and let the banner message do the right
thing.
This was an old version of bash_completion and not included in the
image. An haikuports recipe is available if you need it.
Fixes #11660.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
We declare most of the XDG environment variables for this spec:
- XDG_CONFIG_HOME
- XDG_DATA_HOME
- XDG_CONFIG_DIRS
- XDG_DATA_DIRS
- XDG_CACHE_HOME
I'm not yet sure what to do with XDG_RUNTIME_DIR.
This allows packages to place files in data/profile.d to manipulate
the shell environment. They could already use settings/etc/profile.d,
but since there's no point in editing those files in most cases, placing
them there nonetheless doesn't make much sense.
* find_directory() and hard-coded paths use /boot/system instead of
/boot/common.
* The build system creates the writable directories in /boot/system
instead of /boot/common.
* The build system no longer installs any packages in /boot/common.
The ls command, uses blue color for directories. For a directory that
has write permission for others, it uses green highlighting while
displaying the directory name. However, blue text and green highlight
is difficult to read.
The patch keeps the text color as blue and changes the highlight to
yellow.
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
All grep versions have the ability to display a colored
output. The patch turns on coloring in auto mode.
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
ls --color emits the color code irrespective of whether it is being
attached to terminal or not. Which might result in color codes being
added to file upon redirection.
auto option with ls --color emits the color codes only the output is
attached to terminal, otherwise the colors are turned off.
Fixes #8993.
Signed-off-by: Ryan Leavengood <leavengood@gmail.com>
* add support for printing the time-related locale (which may contain
a '@strings=messages' suffix if required by locale configuration
* adjust cmdline params of /bin/locale to be a bit clearer (but keep
support for -c for compatibility)
* adjust /etc/profile to invoke /bin/locale accordingly
The various LC_ environment variables (as well as LANG) are set in
/etc/profile, based on the output of this new simple bin command locale.
LANG and LC_CTYPE are set based on the first preferred language, whereas the
formatting variables are all set based on the formatting conventions language.
The list of LC_ variables are from the locale command on Linux.
Based on my testing, at least the date command obeys these variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42394 a95241bf-73f2-0310-859d-f6bbb57e9c96
SetupEnvironment to /etc/profile and use the "id" command. No need to set
SHELL, since the shell sets it anyway. Fixes #5966.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36788 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Updated vim & KeymapSwitcher optional packages, provided by siarzhuk.
To note, I did not remove the 'vi' symlink creation as I'm uncertain as
to whether or not any unknown applications are hardcoded to use it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36753 a95241bf-73f2-0310-859d-f6bbb57e9c96
shells started by remote login daemons (sshd, telnetd) also get the
environmental variables defined there. Closes #5789 and #2468.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36536 a95241bf-73f2-0310-859d-f6bbb57e9c96
directory.
* Moved fortune files to "data/system/data" in the repository, and /system/data/
in the file system.
* Got teapot.data location wrong in the repository.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33982 a95241bf-73f2-0310-859d-f6bbb57e9c96
* enable bash_completion loading in etc/profile. this fixes on the second part #2886.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30233 a95241bf-73f2-0310-859d-f6bbb57e9c96
Jef Poskanzer is providing the backend, but had to be adopted in some ways.
Other issues in Poorman have been resolved.
When testing the license integration, I stumbled over some AboutSystem bugs,
basically clicking licenses would not open them. I fixed those in this patch,
sorry for mixing that up.
Note to Ma Jie: I changed the encoding of the libhttpd files to UTF-8!
(This affects only the (C) glyph.) Thanks a lot for your awesome work on
Poorman, it's really appreciated!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29906 a95241bf-73f2-0310-859d-f6bbb57e9c96