We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
int builtin_pwd(void)
-L -p 들어오면 어떻게 작동할 지 회의 필요
next 토큰 널이어야 함?
The text was updated successfully, but these errors were encountered:
PWD는 인자 다 무시하고 뱉는 애라 다음 토큰을 볼 필요가 없음 옵션 없으면 어짜피 -L 이런 애들도 그냥 인자라서
Sorry, something went wrong.
env는 옵션, 인자 둘 다 안받는다고 되어있으니까 next있으면 오류메시지 띄워주고 나가면 될 듯??
그럼 우리가 세운 규칙은
no argument는 next token이 무조건 NULL이어야 하고
no option은 next token이 -L -p으로 와도 기능이 없다는거지?
근데 나는 no option이라도 다음 토큰 확인해서 첫 글자가 '-' 대쉬이면 옵션 에러를 내뱉어야 하니깐 다음 토큰 들고 들어 가야하지 않을까? 예를들면 pwd -L으로 오면 에러 뱉어야 하니깐 아래 처럼 오류 뱉어야 되는거라고 생각하긴 해유
bash-3.2$ pwd -q bash: pwd: -q: invalid option pwd: usage: pwd [-LP]
미니쉘$> pwd -L minishell: pwd: -L: invalid option pwd: usage: pwd [no option]
다음 인자의 '-'가 인지 아닌지로 no argument 에러를 체크해야 할거 같아용
예를 들면 env -q env hello
두개의 에러는 달라야 하니깐 그냥 다음토큰이 널인걸로 체크하면 에러 구분이 안되겠느뎅
둘 다 사용 문법 에러로 띄워주면 되는거아닌가?
Oris482
Giromi
No branches or pull requests
-L -p 들어오면 어떻게 작동할 지 회의 필요
env argu 해결 예시
next 토큰 널이어야 함?
The text was updated successfully, but these errors were encountered: