New issue
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
Add --file option. #170
base: master
Are you sure you want to change the base?
Add --file option. #170
Conversation
git-open
Outdated
@@ -49,6 +52,11 @@ IFS='=' read -ra suffix_flag <<< "$suffix_flag" | |||
function join_by { local IFS="$1"; shift; echo "$*"; } | |||
suffix=$(join_by "=" "${suffix_flag[@]:1}") | |||
|
|||
# parse file from file=value | |||
IFS='=' read -ra file_flag <<< "$file_flag" | |||
function join_by { local IFS="$1"; shift; echo "$*"; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you redefining this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The join_by function definition was cut and pasted, and could probably be removed.
Does anyone care about this? It's been open for almost 2 months, with only a trivial (and addressed) comment. |
It would be nice to have. |
+1 for this request, I'm currently using the feature branch in place of |
Would it be better to have a more general |
Does this open the file in the current |
This adds a --file option, allowing
git open --file <path>
, where<path>
is a path within the repository, and can either be a file or directory.This is similar to what was requested years ago in #54, but isn't automatic. Presumably it could be made automatic, if someone more familiar with git internals and better at writing shell scripts than me wanted it to be.