3 ms·
aliases for opening files, which i find quite useful # open file by name op = "!f() { $(git editor) $(git ls-files | grep -i \"$@\"); }; f" # open curre
by wuthefwasthat 10y ago
aliases for opening files, which i find quite useful
# open file by name
op = "!f() { $(git editor) $(git ls-files | grep -i \"$@\"); }; f"
# open currently edited (unstaged) files
eop = "! $(git editor) $(git ls-files --modified)"
# open files for conflicts (good for rebase/cherry-pick/merge)
mop = "!f() { $(git editor) $(git diff --name-only --diff-filter=U); }; f"
# open files present in diff
dop = "!f() { $(git editor) $(git diff --name-only $@); }; f"
# grep and open files containing
gop = "!f(){ $(git editor) $(git grep --name-only \"$@\"); }; f"
# "show and open" commit
shop = "!f() { $(git editor) $(git show --pretty=\"format:\" --name-only $1); }; f"
editor = config --get core.editor
I wrote a bit about them here: https://wordpress.com/post/wuthefwasthat.wordpress.com/19 https://wordpress.com/post/wuthefwasthat.wordpress.com/19
And all my aliases here: https://github.com/WuTheFWasThat/dotfiles/blob/master/.gitconfig https://github.com/WuTheFWasThat/dotfiles/blob/master/.gitco...
- brbsix 10y agoThat looks like some sort of internal WordPress link. I think you mean: https://wuthefwasthat.wordpress.com/2016/06/18/git-open-aliases/ https://wuthefwasthat.wordpress.com/2016/06/18/git-open-alia...