Skip to content

Commit

Permalink
WIP7
Browse files Browse the repository at this point in the history
  • Loading branch information
dmalan committed May 8, 2024
1 parent d5a938c commit f96d245
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion etc/profile.d/cli.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# If not root
if [ "$(whoami)" != "root" ]; then
if [ `id -u` -ne 0 ]; then

# $PATH
export PATH="/opt/cs50/bin":"/opt/bin":"$PATH"
Expand Down Expand Up @@ -60,4 +60,9 @@ if [ "$(whoami)" != "root" ]; then

# Valgrind
export VALGRIND_OPTS="--memcheck:leak-check=full --memcheck:show-leak-kinds=all --memcheck:track-origins=yes"

# Start help50 if enabled
if help50 is-enabled > /dev/null; then
help50 start
fi
fi
4 changes: 2 additions & 2 deletions etc/profile.d/help50.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ function _help50() {
local argv0=$(HISTFILE=$histfile history 1 | cut -c 8- | awk '{print $1}')
rm --force $histfile

# If last command erred (and is not ctl-z)
# If last command erred (and is not ctl-c or ctl-z)
# https://tldp.org/LDP/abs/html/exitcodes.html
if [[ $status -ne 0 && $status -ne 148 ]]; then
if [[ $status -ne 0 && $status -ne 130 && $status -ne 148 ]]; then

# Ignore ./* if executable file
if [[ "$argv" =~ ^\./ && -f "$argv" && -x "$argv" ]]; then
Expand Down

0 comments on commit f96d245

Please sign in to comment.