Initial commit.
This commit is contained in:
15
profile.d/bash_completion.sh
Normal file
15
profile.d/bash_completion.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
# Check for interactive bash and that we haven't already been sourced.
|
||||
if [ -n "${BASH_VERSION-}" -a -n "${PS1-}" -a -z "${BASH_COMPLETION_VERSINFO-}" ]; then
|
||||
|
||||
# Check for recent enough version of bash.
|
||||
if [ ${BASH_VERSINFO[0]} -gt 4 ] || \
|
||||
[ ${BASH_VERSINFO[0]} -eq 4 -a ${BASH_VERSINFO[1]} -ge 1 ]; then
|
||||
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] && \
|
||||
. "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion"
|
||||
if shopt -q progcomp && [ -r /usr/share/bash-completion/bash_completion ]; then
|
||||
# Source completion code.
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
11
profile.d/colorgrep.csh
Normal file
11
profile.d/colorgrep.csh
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
# color-grep initialization
|
||||
|
||||
/usr/libexec/grepconf.sh -c
|
||||
if ( $status == 1 ) then
|
||||
exit
|
||||
endif
|
||||
|
||||
alias grep 'grep --color=auto'
|
||||
alias egrep 'egrep --color=auto'
|
||||
alias fgrep 'fgrep --color=auto'
|
||||
7
profile.d/colorgrep.sh
Normal file
7
profile.d/colorgrep.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
# color-grep initialization
|
||||
|
||||
/usr/libexec/grepconf.sh -c || return
|
||||
|
||||
alias grep='grep --color=auto' 2>/dev/null
|
||||
alias egrep='egrep --color=auto' 2>/dev/null
|
||||
alias fgrep='fgrep --color=auto' 2>/dev/null
|
||||
68
profile.d/colorls.csh
Normal file
68
profile.d/colorls.csh
Normal file
@@ -0,0 +1,68 @@
|
||||
# skip everything for non-interactive shells
|
||||
if (! $?prompt) exit
|
||||
|
||||
# color-ls initialization
|
||||
if ( $?USER_LS_COLORS ) then
|
||||
if ( "$USER_LS_COLORS" != "" ) then
|
||||
#when USER_LS_COLORS defined do not override user
|
||||
#specified LS_COLORS and use them
|
||||
goto finish
|
||||
endif
|
||||
endif
|
||||
|
||||
alias ll 'ls -l'
|
||||
alias l. 'ls -d .*'
|
||||
set COLORS=/etc/DIR_COLORS
|
||||
|
||||
if ($?TERM) then
|
||||
if ( -e "/etc/DIR_COLORS.256color" ) then
|
||||
if ( "`/usr/bin/tput colors`" == "256" ) then
|
||||
set COLORS=/etc/DIR_COLORS.256color
|
||||
endif
|
||||
endif
|
||||
if ( -e "/etc/DIR_COLORS.$TERM" ) then
|
||||
set COLORS="/etc/DIR_COLORS.$TERM"
|
||||
endif
|
||||
endif
|
||||
if ( -f ~/.dircolors ) set COLORS=~/.dircolors
|
||||
if ( -f ~/.dir_colors ) set COLORS=~/.dir_colors
|
||||
if ($?TERM) then
|
||||
if ( -f ~/.dircolors."$TERM" ) set COLORS=~/.dircolors."$TERM"
|
||||
if ( -f ~/.dir_colors."$TERM" ) set COLORS=~/.dir_colors."$TERM"
|
||||
endif
|
||||
set INCLUDE="`/usr/bin/cat "$COLORS" | /usr/bin/grep '^INCLUDE' | /usr/bin/cut -d ' ' -f2-`"
|
||||
|
||||
if ( ! -e "$COLORS" ) exit
|
||||
|
||||
set _tmp="`/usr/bin/mktemp .colorlsXXX -q --tmpdir=/tmp`"
|
||||
#if mktemp fails, exit when include was active, otherwise use $COLORS file
|
||||
if ( "$_tmp" == '' ) then
|
||||
if ( "$INCLUDE" == '' ) then
|
||||
eval "`/usr/bin/dircolors -c $COLORS`"
|
||||
endif
|
||||
goto cleanup
|
||||
endif
|
||||
|
||||
if ( "$INCLUDE" != '' ) /usr/bin/cat "$INCLUDE" >> $_tmp
|
||||
/usr/bin/grep -v '^INCLUDE' "$COLORS" >> $_tmp
|
||||
|
||||
eval "`/usr/bin/dircolors -c $_tmp`"
|
||||
|
||||
/usr/bin/rm -f $_tmp
|
||||
|
||||
if ( "$LS_COLORS" == '' ) exit
|
||||
cleanup:
|
||||
set color_none=`/usr/bin/sed -n '/^COLOR.*none/Ip' < $COLORS`
|
||||
if ( "$color_none" != '' ) then
|
||||
unset color_none
|
||||
exit
|
||||
endif
|
||||
unset color_none
|
||||
unset _tmp
|
||||
unset INCLUDE
|
||||
unset COLORS
|
||||
|
||||
finish:
|
||||
alias ll 'ls -l --color=auto'
|
||||
alias l. 'ls -d .* --color=auto'
|
||||
alias ls 'ls --color=auto'
|
||||
57
profile.d/colorls.sh
Normal file
57
profile.d/colorls.sh
Normal file
@@ -0,0 +1,57 @@
|
||||
# color-ls initialization
|
||||
|
||||
# Skip all for noninteractive shells.
|
||||
[ ! -t 0 ] && return
|
||||
|
||||
#when USER_LS_COLORS defined do not override user LS_COLORS, but use them.
|
||||
if [ -z "$USER_LS_COLORS" ]; then
|
||||
|
||||
alias ll='ls -l' 2>/dev/null
|
||||
alias l.='ls -d .*' 2>/dev/null
|
||||
|
||||
INCLUDE=
|
||||
COLORS=
|
||||
|
||||
for colors in "$HOME/.dir_colors.$TERM" "$HOME/.dircolors.$TERM" \
|
||||
"$HOME/.dir_colors" "$HOME/.dircolors"; do
|
||||
[ -e "$colors" ] && COLORS="$colors" && \
|
||||
INCLUDE="`/usr/bin/cat "$COLORS" | /usr/bin/grep '^INCLUDE' | /usr/bin/cut -d ' ' -f2-`" && \
|
||||
break
|
||||
done
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.$TERM" ] && \
|
||||
COLORS="/etc/DIR_COLORS.$TERM"
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.256color" ] && \
|
||||
[ "x`/usr/bin/tty -s && /usr/bin/tput colors 2>/dev/null`" = "x256" ] && \
|
||||
COLORS="/etc/DIR_COLORS.256color"
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS" ] && \
|
||||
COLORS="/etc/DIR_COLORS"
|
||||
|
||||
# Existence of $COLORS already checked above.
|
||||
[ -n "$COLORS" ] || return
|
||||
|
||||
if [ -e "$INCLUDE" ];
|
||||
then
|
||||
TMP="`/usr/bin/mktemp .colorlsXXX -q --tmpdir=/tmp`"
|
||||
[ -z "$TMP" ] && return
|
||||
|
||||
/usr/bin/cat "$INCLUDE" >> $TMP
|
||||
/usr/bin/grep -v '^INCLUDE' "$COLORS" >> $TMP
|
||||
|
||||
eval "`/usr/bin/dircolors --sh $TMP 2>/dev/null`"
|
||||
/usr/bin/rm -f $TMP
|
||||
else
|
||||
eval "`/usr/bin/dircolors --sh $COLORS 2>/dev/null`"
|
||||
fi
|
||||
|
||||
[ -z "$LS_COLORS" ] && return
|
||||
/usr/bin/grep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return
|
||||
fi
|
||||
|
||||
unset TMP COLORS INCLUDE
|
||||
|
||||
alias ll='ls -l --color=auto' 2>/dev/null
|
||||
alias l.='ls -d .* --color=auto' 2>/dev/null
|
||||
alias ls='ls --color=auto' 2>/dev/null
|
||||
5
profile.d/colorxzgrep.csh
Normal file
5
profile.d/colorxzgrep.csh
Normal file
@@ -0,0 +1,5 @@
|
||||
/usr/libexec/grepconf.sh -c
|
||||
if ( $status == 1 ) exit
|
||||
alias xzgrep 'xzgrep --color=auto'
|
||||
alias xzfgrep 'xzfgrep --color=auto'
|
||||
alias xzegrep 'xzegrep --color=auto'
|
||||
4
profile.d/colorxzgrep.sh
Normal file
4
profile.d/colorxzgrep.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
/usr/libexec/grepconf.sh -c || return
|
||||
alias xzgrep='xzgrep --color=auto' 2>/dev/null
|
||||
alias xzegrep='xzegrep --color=auto' 2>/dev/null
|
||||
alias xzfgrep='xzfgrep --color=auto' 2>/dev/null
|
||||
9
profile.d/colorzgrep.csh
Normal file
9
profile.d/colorzgrep.csh
Normal file
@@ -0,0 +1,9 @@
|
||||
test -f /usr/libexec/grepconf.sh
|
||||
if ( $status == 1 ) exit
|
||||
|
||||
/usr/libexec/grepconf.sh -c
|
||||
if ( $status == 1 ) exit
|
||||
|
||||
alias zgrep 'zgrep --color=auto'
|
||||
alias zfgrep 'zfgrep --color=auto'
|
||||
alias zegrep 'zegrep --color=auto'
|
||||
6
profile.d/colorzgrep.sh
Normal file
6
profile.d/colorzgrep.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
[ -f /usr/libexec/grepconf.sh ] || return
|
||||
|
||||
/usr/libexec/grepconf.sh -c || return
|
||||
alias zgrep='zgrep --color=auto' 2>/dev/null
|
||||
alias zfgrep='zfgrep --color=auto' 2>/dev/null
|
||||
alias zegrep='zegrep --color=auto' 2>/dev/null
|
||||
1
profile.d/csh.local
Normal file
1
profile.d/csh.local
Normal file
@@ -0,0 +1 @@
|
||||
#Add any required envvar overrides to this file, is sourced from /etc/csh.login
|
||||
11
profile.d/gawk.csh
Normal file
11
profile.d/gawk.csh
Normal file
@@ -0,0 +1,11 @@
|
||||
alias gawkpath_default 'unsetenv AWKPATH; setenv AWKPATH `gawk -v x=AWKPATH "BEGIN {print ENVIRON[x]}"`'
|
||||
|
||||
alias gawkpath_prepend 'if (! $?AWKPATH) setenv AWKPATH ""; if ($AWKPATH == "") then; unsetenv AWKPATH; setenv AWKPATH `gawk -v x=AWKPATH "BEGIN {print ENVIRON[x]}"`; endif; setenv AWKPATH "\!*"":$AWKPATH"'
|
||||
|
||||
alias gawkpath_append 'if (! $?AWKPATH) setenv AWKPATH ""; if ($AWKPATH == "") then; unsetenv AWKPATH; setenv AWKPATH `gawk -v x=AWKPATH "BEGIN {print ENVIRON[x]}"`; endif; setenv AWKPATH "$AWKPATH"":\!*"'
|
||||
|
||||
alias gawklibpath_default 'unsetenv AWKLIBPATH; setenv AWKLIBPATH `gawk -v x=AWKLIBPATH "BEGIN {print ENVIRON[x]}"`'
|
||||
|
||||
alias gawklibpath_prepend 'if (! $?AWKLIBPATH) setenv AWKLIBPATH ""; if ($AWKLIBPATH == "") then; unsetenv AWKLIBPATH; setenv AWKLIBPATH `gawk -v x=AWKLIBPATH "BEGIN {print ENVIRON[x]}"`; endif; setenv AWKLIBPATH "\!*"":$AWKLIBPATH"'
|
||||
|
||||
alias gawklibpath_append 'if (! $?AWKLIBPATH) setenv AWKLIBPATH ""; if ($AWKLIBPATH == "") then; unsetenv AWKLIBPATH; setenv AWKLIBPATH `gawk -v x=AWKLIBPATH "BEGIN {print ENVIRON[x]}"`; endif; setenv AWKLIBPATH "$AWKLIBPATH"":\!*"'
|
||||
31
profile.d/gawk.sh
Normal file
31
profile.d/gawk.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
gawkpath_default () {
|
||||
unset AWKPATH
|
||||
export AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'`
|
||||
}
|
||||
|
||||
gawkpath_prepend () {
|
||||
[ -z "$AWKPATH" ] && AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'`
|
||||
export AWKPATH="$*:$AWKPATH"
|
||||
}
|
||||
|
||||
gawkpath_append () {
|
||||
[ -z "$AWKPATH" ] && AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'`
|
||||
export AWKPATH="$AWKPATH:$*"
|
||||
}
|
||||
|
||||
gawklibpath_default () {
|
||||
unset AWKLIBPATH
|
||||
export AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'`
|
||||
}
|
||||
|
||||
gawklibpath_prepend () {
|
||||
[ -z "$AWKLIBPATH" ] && \
|
||||
AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'`
|
||||
export AWKLIBPATH="$*:$AWKLIBPATH"
|
||||
}
|
||||
|
||||
gawklibpath_append () {
|
||||
[ -z "$AWKLIBPATH" ] && \
|
||||
AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'`
|
||||
export AWKLIBPATH="$AWKLIBPATH:$*"
|
||||
}
|
||||
47
profile.d/grc.sh
Normal file
47
profile.d/grc.sh
Normal file
@@ -0,0 +1,47 @@
|
||||
GRC="$(which grc)"
|
||||
if [ "$TERM" != dumb ] && [ -n "$GRC" ]; then
|
||||
alias colourify="$GRC -es"
|
||||
alias blkid='colourify blkid'
|
||||
alias configure='colourify ./configure'
|
||||
alias df='colourify df'
|
||||
alias diff='colourify diff'
|
||||
alias docker='colourify docker'
|
||||
alias docker-compose='colourify docker-compose'
|
||||
alias docker-machine='colourify docker-machine'
|
||||
alias du='colourify du'
|
||||
alias env='colourify env'
|
||||
alias free='colourify free'
|
||||
alias fdisk='colourify fdisk'
|
||||
alias findmnt='colourify findmnt'
|
||||
alias make='colourify make'
|
||||
alias gcc='colourify gcc'
|
||||
alias g++='colourify g++'
|
||||
alias id='colourify id'
|
||||
alias ip='colourify ip'
|
||||
alias iptables='colourify iptables'
|
||||
alias as='colourify as'
|
||||
alias gas='colourify gas'
|
||||
alias journalctl='colourify journalctl'
|
||||
alias kubectl='colourify kubectl'
|
||||
alias ld='colourify ld'
|
||||
#alias ls='colourify ls'
|
||||
alias lsof='colourify lsof'
|
||||
alias lsblk='colourify lsblk'
|
||||
alias lspci='colourify lspci'
|
||||
alias netstat='colourify netstat'
|
||||
alias ping='colourify ping'
|
||||
alias ss='colourify ss'
|
||||
alias traceroute='colourify traceroute'
|
||||
alias traceroute6='colourify traceroute6'
|
||||
alias head='colourify head'
|
||||
alias tail='colourify tail'
|
||||
alias dig='colourify dig'
|
||||
alias mount='colourify mount'
|
||||
alias ps='colourify ps'
|
||||
alias mtr='colourify mtr'
|
||||
alias semanage='colourify semanage'
|
||||
alias getsebool='colourify getsebool'
|
||||
alias ifconfig='colourify ifconfig'
|
||||
alias sockstat='colourify sockstat'
|
||||
fi
|
||||
|
||||
80
profile.d/lang.csh
Normal file
80
profile.d/lang.csh
Normal file
@@ -0,0 +1,80 @@
|
||||
# /etc/profile.d/lang.csh - exports environment variables, and provides fallback
|
||||
# for CJK languages that can't be displayed in console.
|
||||
|
||||
if (${?LANG}) then
|
||||
set LANG_backup=${LANG}
|
||||
endif
|
||||
|
||||
foreach config (/etc/locale.conf "${HOME}/.i18n")
|
||||
if (-f "${config}") then
|
||||
# NOTE: We are using eval & sed here to avoid invoking of any commands & functions from those files.
|
||||
eval `/usr/bin/sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/setenv \1 \2;/;t;d' ${config}`
|
||||
endif
|
||||
end
|
||||
|
||||
if (${?LANG_backup}) then
|
||||
set LANG="${LANG_backup}"
|
||||
endif
|
||||
|
||||
unset LANG_backup config
|
||||
|
||||
# ----------------------------------------------
|
||||
|
||||
# The LC_ALL is not supposed to be set in /etc/locale.conf according to 'man 5 locale.conf'.
|
||||
# If it is set, then we we expect it is user's explicit override (most likely from ~/.i18n file).
|
||||
# See 'man 7 locale' for more info about LC_ALL.
|
||||
if (${?LC_ALL}) then
|
||||
if (${LC_ALL} != ${LANG}) then
|
||||
setenv LC_ALL
|
||||
else
|
||||
unsetenv LC_ALL
|
||||
endif
|
||||
endif
|
||||
|
||||
# The ${LANG} manipulation is necessary only in virtual terminal (a.k.a. console - /dev/tty*):
|
||||
set in_console=`/usr/bin/tty | /usr/bin/grep -vc -e '/dev/tty'`
|
||||
|
||||
if (${?LANG} && ${?TERM}) then
|
||||
if (${TERM} == 'linux' && $in_console == 0) then
|
||||
set utf8_used=`echo ${LANG} | /usr/bin/grep -vc -E -i -e '^.+\.utf-?8$'`
|
||||
|
||||
if (${utf8_used} == 0) then
|
||||
switch (${LANG})
|
||||
case en_IN*:
|
||||
breaksw
|
||||
|
||||
case ja*:
|
||||
case ko*:
|
||||
case si*:
|
||||
case zh*:
|
||||
case ar*:
|
||||
case fa*:
|
||||
case he*:
|
||||
case *_IN*:
|
||||
setenv LANG en_US.UTF-8
|
||||
breaksw
|
||||
endsw
|
||||
else
|
||||
switch (${LANG})
|
||||
case en_IN*:
|
||||
breaksw
|
||||
case ja*:
|
||||
case ko*:
|
||||
case si*:
|
||||
case zh*:
|
||||
case ar*:
|
||||
case fa*:
|
||||
case he*:
|
||||
case *_IN*:
|
||||
setenv LANG en_US
|
||||
breaksw
|
||||
endsw
|
||||
endif
|
||||
|
||||
# NOTE: We are not exporting the ${LANG} here again on purpose.
|
||||
# If user starts GUI session from console manually, then
|
||||
# the previously set LANG should be okay to use.
|
||||
endif
|
||||
endif
|
||||
|
||||
unset in_console utf8_used
|
||||
65
profile.d/lang.sh
Normal file
65
profile.d/lang.sh
Normal file
@@ -0,0 +1,65 @@
|
||||
# /etc/profile.d/lang.sh - exports environment variables, and provides fallback
|
||||
# for CJK languages that can't be displayed in console.
|
||||
|
||||
if [ -n "${LANG}" ]; then
|
||||
LANG_backup="${LANG}"
|
||||
fi
|
||||
|
||||
for config in /etc/locale.conf "${HOME}/.i18n"; do
|
||||
# NOTE: We are using eval & sed here to avoid invoking of any commands & functions from those files.
|
||||
if [ -f "${config}" ]; then
|
||||
eval $(/usr/bin/sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/export \1=\2/;t;d' ${config})
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "${LANG_backup}" ]; then
|
||||
LANG="${LANG_backup}"
|
||||
fi
|
||||
|
||||
unset LANG_backup config
|
||||
|
||||
# ----------------------------------------------
|
||||
|
||||
# The LC_ALL is not supposed to be set in /etc/locale.conf according to 'man 5 locale.conf'.
|
||||
# If it is set, then we we expect it is user's explicit override (most likely from ~/.i18n file).
|
||||
# See 'man 7 locale' for more info about LC_ALL.
|
||||
if [ -n "${LC_ALL}" ]; then
|
||||
if [ "${LC_ALL}" != "${LANG}" ]; then
|
||||
export LC_ALL
|
||||
else
|
||||
unset LC_ALL
|
||||
fi
|
||||
fi
|
||||
|
||||
# The ${LANG} manipulation is necessary only in virtual terminal (a.k.a. console - /dev/tty*):
|
||||
if [ -n "${LANG}" ] && [ "${TERM}" = 'linux' ] && /usr/bin/tty | /usr/bin/grep --quiet -e '/dev/tty'; then
|
||||
if /usr/bin/grep --quiet -E -i -e '^.+\.utf-?8$' <<< "${LANG}"; then
|
||||
case ${LANG} in
|
||||
ja*) LANG=en_US.UTF-8 ;;
|
||||
ko*) LANG=en_US.UTF-8 ;;
|
||||
si*) LANG=en_US.UTF-8 ;;
|
||||
zh*) LANG=en_US.UTF-8 ;;
|
||||
ar*) LANG=en_US.UTF-8 ;;
|
||||
fa*) LANG=en_US.UTF-8 ;;
|
||||
he*) LANG=en_US.UTF-8 ;;
|
||||
en_IN*) true ;;
|
||||
*_IN*) LANG=en_US.UTF-8 ;;
|
||||
esac
|
||||
else
|
||||
case ${LANG} in
|
||||
ja*) LANG=en_US ;;
|
||||
ko*) LANG=en_US ;;
|
||||
si*) LANG=en_US ;;
|
||||
zh*) LANG=en_US ;;
|
||||
ar*) LANG=en_US ;;
|
||||
fa*) LANG=en_US ;;
|
||||
he*) LANG=en_US ;;
|
||||
en_IN*) true ;;
|
||||
*_IN*) LANG=en_US ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# NOTE: We are not exporting the ${LANG} here again on purpose.
|
||||
# If user starts GUI session from console manually, then
|
||||
# the previously set LANG should be okay to use.
|
||||
fi
|
||||
15
profile.d/less.csh
Normal file
15
profile.d/less.csh
Normal file
@@ -0,0 +1,15 @@
|
||||
# less initialization script (csh)
|
||||
|
||||
# All less.*sh files should have the same semantics!
|
||||
|
||||
# In case you are curious, the test for non-emptiness is not as easy as in
|
||||
# Bourne shell. This "eval" construct is probably inspired by Stack
|
||||
# Overflow question 13343392.
|
||||
if ( $?LESSOPEN && { eval 'test ! -z "$LESSOPEN"' } ) then
|
||||
:
|
||||
else
|
||||
if ( -x /usr/bin/lesspipe.sh ) then
|
||||
# The '||' here is intentional, see rhbz#1254837.
|
||||
setenv LESSOPEN "||/usr/bin/lesspipe.sh %s"
|
||||
endif
|
||||
endif
|
||||
8
profile.d/less.sh
Normal file
8
profile.d/less.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
# less initialization script (sh)
|
||||
|
||||
# All less.*sh files should have the same semantics!
|
||||
|
||||
if [ -z "$LESSOPEN" ] && [ -x /usr/bin/lesspipe.sh ]; then
|
||||
# The '||' here is intentional, see rhbz#1254837.
|
||||
export LESSOPEN="||/usr/bin/lesspipe.sh %s"
|
||||
fi
|
||||
1
profile.d/mc.csh
Normal file
1
profile.d/mc.csh
Normal file
@@ -0,0 +1 @@
|
||||
alias mc 'source /usr/libexec/mc/mc-wrapper.csh'
|
||||
3
profile.d/mc.sh
Normal file
3
profile.d/mc.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
# Don't define aliases in plain Bourne shell
|
||||
[ -n "${BASH_VERSION}${KSH_VERSION}${ZSH_VERSION}" ] || return 0
|
||||
alias mc='. /usr/libexec/mc/mc-wrapper.sh'
|
||||
3
profile.d/mingw64.sh
Normal file
3
profile.d/mingw64.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
# Environment variables for cross compilers.
|
||||
|
||||
alias mingw64-env='eval `rpm --eval %{mingw64_env}`'
|
||||
1
profile.d/modules.csh
Symbolic link
1
profile.d/modules.csh
Symbolic link
@@ -0,0 +1 @@
|
||||
/etc/alternatives/modules.csh
|
||||
1
profile.d/modules.sh
Symbolic link
1
profile.d/modules.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
/etc/alternatives/modules.sh
|
||||
9
profile.d/scl-init.csh
Normal file
9
profile.d/scl-init.csh
Normal file
@@ -0,0 +1,9 @@
|
||||
alias scl 'source /etc/scl/func_scl.csh'
|
||||
|
||||
setenv MODULESHOME /usr/share/Modules
|
||||
|
||||
if (! $?MODULEPATH ) then
|
||||
setenv MODULEPATH `sed -n 's/[ #].*$//; /./H; $ { x; s/^\n//; s/\n/:/g; p; }' ${MODULESHOME}/init/.modulespath`
|
||||
endif
|
||||
|
||||
setenv MODULEPATH /etc/scl/modulefiles:$MODULEPATH
|
||||
26
profile.d/scl-init.sh
Normal file
26
profile.d/scl-init.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
scl()
|
||||
{
|
||||
if [ "$1" = "load" -o "$1" = "unload" ]; then
|
||||
# It is possible that function module is not declared in time of this
|
||||
# declaration so eval is used instead of direct calling of function module
|
||||
eval "module $@"
|
||||
else
|
||||
/usr/bin/scl "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
shell=`/bin/basename \`/bin/ps -p $$ -ocomm=\``
|
||||
[ "$shell" = "bash" ] && export -f scl # export -f works only in bash
|
||||
|
||||
MODULESHOME=/usr/share/Modules
|
||||
export MODULESHOME
|
||||
|
||||
if [ "${MODULEPATH:-}" = "" ]; then
|
||||
MODULEPATH=`sed -n 's/[ #].*$//; /./H; $ { x; s/^\n//; s/\n/:/g; p; }' ${MODULESHOME}/init/.modulespath`
|
||||
fi
|
||||
|
||||
MODULEPATH=/etc/scl/modulefiles:$MODULEPATH
|
||||
|
||||
export MODULEPATH
|
||||
|
||||
|
||||
1
profile.d/sh.local
Normal file
1
profile.d/sh.local
Normal file
@@ -0,0 +1 @@
|
||||
#Add any required envvar overrides to this file, it is sourced from /etc/profile
|
||||
22
profile.d/snapd.sh
Normal file
22
profile.d/snapd.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
# shellcheck shell=sh
|
||||
|
||||
# Expand $PATH to include the directory where snappy applications go.
|
||||
snap_bin_path="/var/lib/snapd/snap/bin"
|
||||
if [ -n "${PATH##*${snap_bin_path}}" ] && [ -n "${PATH##*${snap_bin_path}:*}" ]; then
|
||||
export PATH="$PATH:${snap_bin_path}"
|
||||
fi
|
||||
|
||||
# Ensure base distro defaults xdg path are set if nothing filed up some
|
||||
# defaults yet.
|
||||
if [ -z "$XDG_DATA_DIRS" ]; then
|
||||
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
|
||||
fi
|
||||
|
||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
||||
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for
|
||||
# snappy applications' desktop files.
|
||||
snap_xdg_path="/var/lib/snapd/desktop"
|
||||
if [ -n "${XDG_DATA_DIRS##*${snap_xdg_path}}" ] && [ -n "${XDG_DATA_DIRS##*${snap_xdg_path}:*}" ]; then
|
||||
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${snap_xdg_path}"
|
||||
fi
|
||||
|
||||
6
profile.d/vim.csh
Normal file
6
profile.d/vim.csh
Normal file
@@ -0,0 +1,6 @@
|
||||
if ( -x /usr/bin/id ) then
|
||||
if ( "`/usr/bin/id -u`" > 200 ) then
|
||||
alias vi vim
|
||||
endif
|
||||
endif
|
||||
|
||||
5
profile.d/vim.sh
Normal file
5
profile.d/vim.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
if [ -n "${BASH_VERSION-}" -o -n "${KSH_VERSION-}" -o -n "${ZSH_VERSION-}" ]; then
|
||||
[ "`/usr/bin/id -u 2>/dev/null || echo 0`" -le 200 ] && return
|
||||
# for bash and zsh, only if no alias is already set
|
||||
alias vi >/dev/null 2>&1 || alias vi=vim
|
||||
fi
|
||||
3
profile.d/which2.csh
Normal file
3
profile.d/which2.csh
Normal file
@@ -0,0 +1,3 @@
|
||||
# Initialization script for csh
|
||||
|
||||
# alias which 'alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
|
||||
7
profile.d/which2.sh
Normal file
7
profile.d/which2.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
# Initialization script for bash and sh
|
||||
|
||||
if [ "$0" = "ksh" ] || [ "$0" = "-ksh" ] ; then
|
||||
alias which='(alias; typeset -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
|
||||
else
|
||||
alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
|
||||
fi
|
||||
Reference in New Issue
Block a user