diff options
| author | Indrajith | 2024-07-03 02:03:35 +0530 |
|---|---|---|
| committer | Indrajith | 2024-07-03 02:03:35 +0530 |
| commit | 824022cd1f633c70c4d2782934251616756f4668 (patch) | |
| tree | a310eb4bf72b26c2d110838b8c487daaa3537bea /fish/functions/_fzf_search_git_status.fish | |
| parent | 57eb70137b5bbcdabdc0f02eea5477b3e5f845a1 (diff) | |
| download | dots-824022cd1f633c70c4d2782934251616756f4668.tar.gz dots-824022cd1f633c70c4d2782934251616756f4668.tar.bz2 dots-824022cd1f633c70c4d2782934251616756f4668.zip | |
Dots Updated
* Adds GTK Themes
* Adds wlogout
* Adds tmux config
* Adds Pywal-16-colors
* Removed unwanted gtk folders
* Config Updates
* Fish
* Hyprland
* Hyprlock
* Hyprpaper
* waybar
Diffstat (limited to 'fish/functions/_fzf_search_git_status.fish')
| -rw-r--r-- | fish/functions/_fzf_search_git_status.fish | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/fish/functions/_fzf_search_git_status.fish b/fish/functions/_fzf_search_git_status.fish deleted file mode 100644 index 358f88c54..000000000 --- a/fish/functions/_fzf_search_git_status.fish +++ /dev/null @@ -1,41 +0,0 @@ -function _fzf_search_git_status --description "Search the output of git status. Replace the current token with the selected file paths." - if not git rev-parse --git-dir >/dev/null 2>&1 - echo '_fzf_search_git_status: Not in a git repository.' >&2 - else - set -f preview_cmd '_fzf_preview_changed_file {}' - if set --query fzf_diff_highlighter - set preview_cmd "$preview_cmd | $fzf_diff_highlighter" - end - - set -f selected_paths ( - # Pass configuration color.status=always to force status to use colors even though output is sent to a pipe - git -c color.status=always status --short | - _fzf_wrapper --ansi \ - --multi \ - --prompt="Git Status> " \ - --query=(commandline --current-token) \ - --preview=$preview_cmd \ - --nth="2.." \ - $fzf_git_status_opts - ) - if test $status -eq 0 - # git status --short automatically escapes the paths of most files for us so not going to bother trying to handle - # the few edges cases of weird file names that should be extremely rare (e.g. "this;needs;escaping") - set -f cleaned_paths - - for path in $selected_paths - if test (string sub --length 1 $path) = R - # path has been renamed and looks like "R LICENSE -> LICENSE.md" - # extract the path to use from after the arrow - set --append cleaned_paths (string split -- "-> " $path)[-1] - else - set --append cleaned_paths (string sub --start=4 $path) - end - end - - commandline --current-token --replace -- (string join ' ' $cleaned_paths) - end - end - - commandline --function repaint -end |
