feat(dotfiles): add open command to launch applications from YAM…#159
Open
shiron-dev wants to merge 2 commits intomainfrom
Open
feat(dotfiles): add open command to launch applications from YAM…#159shiron-dev wants to merge 2 commits intomainfrom
shiron-dev wants to merge 2 commits intomainfrom
Conversation
…L file - Introduced a new command 'open' to the login_manager script that allows users to open all applications defined in the YAML file. - Added user confirmation before opening applications. - Enhanced path handling to remove trailing whitespace and carriage return characters.
| if [[ "$line" == "- path: "* ]]; then | ||
| path="${line#*- path: }" | ||
| path="${path%"${path##*[![:space:]]}"}" # 末尾の空白を削除 | ||
| path="${path%$'\r'}" # 末尾の改行コードを削除 |
Contributor
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
Suggested change
| path="${path%$'\r'}" # 末尾の改行コードを削除 | |
| path="${path%$'\r'}" # 末尾の改行コードを削除 |
| path="" # 次のアイテムのためにリセット | ||
| fi | ||
| fi | ||
| done < "$yaml_file" |
Contributor
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
Suggested change
| done < "$yaml_file" | |
| done <"$yaml_file" |
Contributor
|
PRのスコープが正しくありません。 |
Comment on lines
+21
to
25
| if ! osascript -e "$osascript_cmd" 2> /dev/null | while IFS=$'\t' read -r path_val hidden_val; do | ||
| if [[ -n "$path_val" ]]; then | ||
| path_val="${path_val%$'\r'}" | ||
| hidden_val="${hidden_val%$'\r'}" | ||
| printf -- "- path: %s\n hidden: %s\n" "$path_val" "$hidden_val" |
Contributor
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
Suggested change
| if ! osascript -e "$osascript_cmd" 2> /dev/null | while IFS=$'\t' read -r path_val hidden_val; do | |
| if [[ -n "$path_val" ]]; then | |
| path_val="${path_val%$'\r'}" | |
| hidden_val="${hidden_val%$'\r'}" | |
| printf -- "- path: %s\n hidden: %s\n" "$path_val" "$hidden_val" | |
| if ! osascript -e "$osascript_cmd" 2>/dev/null | while IFS=$'\t' read -r path_val hidden_val; do | |
| if [[ -n "$path_val" ]]; then | |
| path_val="${path_val%$'\r'}" | |
| hidden_val="${hidden_val%$'\r'}" | |
| printf -- "- path: %s\n hidden: %s\n" "$path_val" "$hidden_val" |
Contributor
|
PRのスコープが正しくありません。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…L file