-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix env variables (PATH, MANPATH), config zsh to allow editor line ed…
…iting
- Loading branch information
Showing
3 changed files
with
74 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# ~/.profile: executed by the command interpreter for login shells. | ||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login exists. | ||
# 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/profile; for setting the umask | ||
# for ssh logins, install and configure the libpam-umask package. | ||
# umask 022 | ||
|
||
# if running bash | ||
if [ -n "$BASH_VERSION" ]; then | ||
# include .bashrc if it exists | ||
if [ -f "$HOME/.bashrc" ]; then | ||
. "$HOME/.bashrc" | ||
fi | ||
fi | ||
|
||
# fix XDG_DATA_DIRS set by nix | ||
if [ -f $HOME/.nix-profile/bin/home-manager ]; then | ||
export XDG_DATA_DIRS=$(echo $XDG_DATA_DIRS | sed -e 's|/home/gzagatti/.nix-profile/share:||' -e 's|/nix/var/nix/profiles/default/share:||') | ||
export XDG_DATA_DIRS="${XDG_DATA_DIRS:+$XDG_DATA_DIRS:}${HOME}/.nix-profile/share:/nix/var/nix/profiles/default/share" | ||
fi | ||
|
||
# set brew env variables so it includes if brew is installed | ||
if [ -f $HOME/.linuxbrew/bin/brew ]; then | ||
export HOMEBREW_PREFIX=$HOME/.linuxbrew | ||
elif [ -f /home/linuxbrew/.linuxbrew/bin/brew ]; then | ||
export HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew | ||
elif hash brew &>/dev/null && [[ -z "$HOMEBREW_PREFIX" ]]; then | ||
export HOMEBREW_PREFIX=$(brew --prefix) | ||
fi | ||
|
||
# add brew to XDG_DATA_DIRS | ||
if [[ -n "$HOMEBREW_PREFIX" ]]; then | ||
export PATH="$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin${PATH+:$PATH}" | ||
export XDG_DATA_DIRS="${XDG_DATA_DIRS:+$XDG_DATA_DIRS:}$HOMEBREW_PREFIX/share/" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters