Skip to content

Commit

Permalink
env.bash: fix SHLVL warning on fish shell
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Feb 28, 2024
1 parent 061fcd1 commit d0db026
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sources/env.bash
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ function on_env_finish {
# on fedora, env can output functions, in which case we get garbled data sometimes
continue
fi
if test "$name" = 'SHLVL'; then
# ignore shell level, fixes: [set: Tried to change the read-only variable 'SHLVL'] on fish shell
continue
fi

# adjust
if [[ $name == *'PATH' ]] || [[ $name == *'DIRS' ]]; then
Expand Down

0 comments on commit d0db026

Please sign in to comment.