Skip to content

support git stash with a counsel-git-grep-stash #374

@drorbemet

Description

@drorbemet

I didn't find support for git grep stash in magit.
At the moment I feel like that a counsel-git-grep-stash would help to quickly look up stashed notes and temp files. But I havn't decided about a sensible default action yet.
Maybe I should learn how to write a provider for ivy counsel myself.
Does a general recipe for that exist already? What do I have to consider if I just copy and adapt counsel-git-grep for that?

#!/bin/bash
IFS=$'\n'
for i in `git stash list --format="%gd"`; do
    git stash show -p $i | grep -H --label="$i" "$1"
done
``

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSuggestion to improve or extend existing behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions