Skip to content

Commit

Permalink
[sh] Various minor configuration changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mina86 committed Jun 2, 2024
1 parent 1fbe835 commit 801c377
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions sh/shellrc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ esac

unalias dir vdir l 2>/dev/null
unset LS_OPTIONS
alias ls='ls -vHFT0 --si --color=auto --time-style=long-iso'
alias ls='ls -vFT0 --si --color=auto --time-style=long-iso'
alias ll='ls -o'

unalias md 2>/dev/null
Expand Down Expand Up @@ -110,7 +110,7 @@ l () {
alias rmd=rmdir

# Locale for en_GB changed such that date started showing 12-hour time which is
# a moronic. Force C locale when running date.
# moronic. Force C locale when running date.
alias date='LANG=C date'

if [ -x /usr/bin/ncal ]; then
Expand Down Expand Up @@ -149,23 +149,39 @@ alias -- -='cd -' 2>/dev/null
alias '+=git add'
alias '+u=git add -u'
alias '+p=git add -p'
alias gg='git grep -n'

alias @='for i in'

alias c=cargo
cargo() {
set -- nice ~/.local/bin/cargo "$@"
#set -- nice /usr/bin/cargo "$@"
case $PWD in
*/code/near/*)
*/code/near/rust-rocksdb/*)
CARGO_PROFILE_RELEASE_LTO=false \
CARGO_PROFILE_RELEASE_CODEGEN_UNITS=64 \
CARGO_PROFILE_DEV_DEBUG=false \
"$@"
;;
*/code/near/*|*/code/comp/composable/*)
CARGO_PROFILE_RELEASE_LTO=false \
CARGO_PROFILE_RELEASE_CODEGEN_UNITS=64 \
CARGO_PROFILE_DEV_DEBUG=false \
ROCKSDB_LIB_DIR=/usr/lib/x86_64-linux-gnu \
"$@"
;;
*)
CARGO_PROFILE_DEV_DEBUG=false "$@"
esac
}

if [ -s ~/.nvm/nvm.sh ]; then
export NVM_DIR
NVM_DIR="$HOME/.nvm"
. ~/.nvm/nvm.sh
fi

# No need to set environment if it has already been set.
${MINA86RC:+return}
MINA86RC=ok
Expand Down

0 comments on commit 801c377

Please sign in to comment.