mxafi / minishell

A school project at Hive Helsinki, recreating a simple version of bash.
2 stars 1 forks source link

Unset removes variable but an empty line is kept in env, is that a problem? #34

Closed liocle closed 1 year ago

liocle commented 1 year ago
shellfish🦞> unset USER
shellfish🦞> env
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.9bo6LTS7T4/Render
HOME=/Users/lclerc
LANG=en_US.UTF-8
LESS=-R
LOGNAME=lclerc
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
OLDPWD=/Users/lclerc/Documents/__minishell_____/minishell
PAGER=less
PATH=/Users/lclerc/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/Users/lclerc/.brew/bin
PWD=/Users/lclerc/Documents/__minishell_____/minishell
SECURITYSESSIONID=186a7
SHELL=/bin/zsh
SHLVL=2
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.ELVmk6SU4J/Listeners
TERM=screen-256color
TERM_PROGRAM=tmux
TERM_PROGRAM_VERSION=3.3a
TERM_SESSION_ID=4FBF5620-4724-4B5C-BED3-8F395B92D7A4
TMPDIR=/var/folders/zz/zyxvpxvq6csfxvn_n0000m8h000524/T/
TMUX=/private/tmp/tmux-5188/default,5262,0
TMUX_PANE=%1
TMUX_PLUGIN_MANAGER_PATH=/Users/lclerc/.tmux/plugins/

XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
ZSH=/Users/lclerc/.oh-my-zsh
_=/Users/lclerc/Documents/__minishell_____/minishell/./minishell
shellfish🦞>
mxafi commented 1 year ago

This has been fixed while debugging SEGV.