forgit icon indicating copy to clipboard operation
forgit copied to clipboard

Support stashes in forgit::diff

Open carlfriedrich opened this issue 3 years ago • 1 comments

Check list

  • [x] I have performed a self-review of my code
  • [x] I have commented my code in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation

Description

Git stashes are named stash@{x}, which contains the fzf placeholder {x}. In order to support passing stashes as arguments to forgit::diff, we have to prevent fzf from interpreting this substring by escaping the opening bracket.

Before:

grafik

After:

grafik

Type of change

  • [x] Bug fix
  • [ ] New feature
  • [ ] Refactor
  • [ ] Breaking change
  • [ ] Documentation change

Test environment

  • Shell
    • [x] bash
    • [x] zsh
    • [x] fish
  • OS
    • [x] Linux
    • [ ] Mac OS X
    • [ ] Windows
    • [ ] Others:

carlfriedrich avatar Aug 03 '22 07:08 carlfriedrich

seems like a good extension to me! Assigning to @wfxr

cjappl avatar Aug 06 '22 19:08 cjappl