Skip to content

Conversation

@cacapon
Copy link
Owner

@cacapon cacapon commented Apr 21, 2025

fixed #26, #151

export関数を実装しました。
以下の機能があります。

  • export: 昇順でexportした変数を表示
  • export : keyを追加(環境変数には表示されない)
  • export =: keyとvalueを追加・存在する場合は更新
  • export +=: 存在するkeyにvalueを末尾に追加 keyがない場合は追加

確認方法

./test_export.outで入力して確認してください。

未対応の箇所

  • オプションについては無効なキー扱いにしてbashとは異なるメッセージが出力されます。

@cacapon cacapon added the WIP まだ作業が完了していないプルリクなどに label Apr 21, 2025
@cacapon cacapon self-assigned this Apr 21, 2025
@cacapon cacapon requested a review from dayano74 April 29, 2025 02:23
@cacapon cacapon marked this pull request as ready for review April 29, 2025 05:08
@cacapon cacapon removed the WIP まだ作業が完了していないプルリクなどに label Apr 29, 2025
@cacapon cacapon marked this pull request as draft April 29, 2025 05:10
@cacapon cacapon marked this pull request as ready for review April 29, 2025 05:53
@dayano74
Copy link
Collaborator

dayano74 commented May 1, 2025

exportの基本的な機能は問題なく動作しました。以下のケースを試したときに処理がbashのようにいかないことがありましたので、追加していただきたいです。

bash likeではなかったケース

  • keyだけが存在しているときにexport key+=value してもvalueが追加されない。
  • key="value"を実行すると、key=""value""と設定される。valueが入力されるとき、ダブルクォーテーションが存在したら、無視して登録してほしい。

dayano74
dayano74 previously approved these changes May 1, 2025
Copy link
Collaborator

@dayano74 dayano74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

基本的な実装は問題ないと思います!ありがとうございます。

@dayano74 dayano74 merged commit 20b6bb7 into main May 1, 2025
1 check passed
@dayano74 dayano74 deleted the feature/26 branch May 1, 2025 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

exportコマンドを実装します。

3 participants