minishell's People
minishell's Issues
do_commandでenvを渡す
字句解析 クオート対応
- クオート(シングル、ダブル、バック)で囲まれた文字はT_WORDとして解釈する
シンボリックリンク先でのpwd
-Pか-Lか
getfullpathでPATHがunsetされている場合の対応
parser_パイプ対応
typo修正
概要
readlineでの入力
字句解析 シンタックスチェック
閉じられてないクオート(ダブル、シングル、バック)
閉じられていない括弧(カーリーブラケット{})
実行部分実装
parser
unsetの複数引数対応漏れ
$変数展開時にシングルクォートとダブルクオートを考慮
builtin unset
builtin pwd
Githubのタブ幅を4にする
builtin cd
Ctrl-Cの挙動を整理。
$変数展開
${}は対応しない
executer:infile/outfileがない場合の挙動修正
srcfile/dstfileがない(=リダイレクトが設定されていない)場合、標準入力/標準出力に設定する。
コマンドの$PATH展開
bashが受け付けるword長の上限確認
builtin exit
ワードの途中にクオート文字が来た際に複数ワードとして解釈されてしまう
[事象]以下のコマンド入力時の挙動が違う
ls -"la"
[想定動作]
$ ls -"la"
total 1192
drwxr-x---+ 82 taku staff 2624 3 3 09:51 .
drwxr-xr-x 5 root admin 160 2 7 06:22 ..
[実動作]
ls -"la"
ls: -: No such file or directory
ls: la: No such file or directory
excuterからbuiltin関数の呼び出しを行う
builtin周りのrefactor
ヒアドキュメント
仕様
対応する仕様
<<-
については、-
を普通の文字として解釈する- ヒアドキュメント内の$変数の展開に対応
- クオート(ダブル、シングル)で囲われている場合は$変数を展開しない
- wordがクオートされている場合は区切り文字からは取り除く
- 区切り文字は展開しない
対応しない仕様
<<-
については対応しない- $変数以外の展開はしない
ドキュメント
課題要件(関連項目)
- << should be given a delimiter, then read the input until a line containing the
delimiter is seen. However, it doesn’t have to update the history! - Handle ’ (single quote) which should prevent the shell from interpreting the metacharacters in the quoted sequence.
- Handle " (double quote) which should prevent the shell from interpreting the metacharacters in the quoted sequence except for $ (dollar sign).
- Not interpret unclosed quotes or special characters which are not required by the
subject such as \ (backslash) or ; (semicolon). - Handle environment variables ($ followed by a sequence of characters) which
should expand to their values.
man
Here Documents
This type of redirection instructs the shell to read input from the current source until a line containing only
word (with no trailing blanks) is seen. All of the lines read up to that point are then used as the standard
input for a command.
The format of here-documents is:
<<[−]word
here-document
delimiter
No parameter expansion, command substitution, arithmetic expansion, or pathname expansion is performed
on word. If any characters in word are quoted, the delimiter is the result of quote removal on word, and
the lines in the here-document are not expanded. If word is unquoted, all lines of the here-document are
subjected to parameter expansion, command substitution, and arithmetic expansion. In the latter case, the
character sequence \<newline> is ignored, and \ must be used to quote the characters \, $, and ‘.
If the redirection operator is <<−, then all leading tab characters are stripped from input lines and the line
containing delimiter. This allows here-documents within shell scripts to be indented in a natural fashion.
資料
Arithmetic Expansion: https://www.gnu.org/software/bash/manual/html_node/Arithmetic-Expansion.html
統合テストにpipeのテストを追加
環境変数モジュールにsetter/getter実装
概要
envmoduleの作成
関数
- getter
- setter
- remove
- 一覧取得
- 全件削除
Issue, PRのテンプレートを作成
From: #17
builtin export
echo -n -n -n helloなどの場合
builtin env
mian関数作成
ああ
builtin echo
字句解析
終了ステータス($?)の展開
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.