fish: Clean up with fish_indent
This commit is contained in:
parent
6a6a8b4d2a
commit
478fede9e4
107 changed files with 370 additions and 362 deletions
|
@ -58,10 +58,10 @@ function __fish_setup_on_tty_login --description "Set up environment on tty logi
|
||||||
end
|
end
|
||||||
|
|
||||||
set -gx CLICOLOR 1
|
set -gx CLICOLOR 1
|
||||||
set -gx LSCOLORS 'gxfxcxdxbxegedabaggxgx'
|
set -gx LSCOLORS gxfxcxdxbxegedabaggxgx
|
||||||
|
|
||||||
set -Ux GST_DEBUG_NO_COLOR 1
|
set -Ux GST_DEBUG_NO_COLOR 1
|
||||||
set -Ux GST_DEBUG_COLOR_MODE "off"
|
set -Ux GST_DEBUG_COLOR_MODE off
|
||||||
|
|
||||||
mkdir -p /tmp/gst-dot
|
mkdir -p /tmp/gst-dot
|
||||||
set -Ux GST_DEBUG_DUMP_DOT_DIR /tmp/gst-dot
|
set -Ux GST_DEBUG_DUMP_DOT_DIR /tmp/gst-dot
|
||||||
|
@ -70,4 +70,4 @@ end
|
||||||
# Instead of tty check, we would have liked to do this using status is-login
|
# Instead of tty check, we would have liked to do this using status is-login
|
||||||
# check but for some reason that does not work?
|
# check but for some reason that does not work?
|
||||||
set --local TTY1 (tty)
|
set --local TTY1 (tty)
|
||||||
[ "$TTY1" = "/dev/tty1" ] && __fish_setup_on_tty_login
|
[ "$TTY1" = /dev/tty1 ] && __fish_setup_on_tty_login
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# If running from tty1 start sway
|
# If running from tty1 start sway
|
||||||
set --local TTY1 (tty)
|
set --local TTY1 (tty)
|
||||||
[ "$TTY1" = "/dev/tty1" ] && exec sway
|
[ "$TTY1" = /dev/tty1 ] && exec sway
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function c --wraps=clear --description 'alias c=clear'
|
function c --wraps=clear --description 'alias c=clear'
|
||||||
clear $argv;
|
clear $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function cat --wraps=bat --description 'alias cat=bat'
|
function cat --wraps=bat --description 'alias cat=bat'
|
||||||
bat $argv;
|
bat $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function cbD --wraps='cargo doc --open' --description 'alias cbD=cargo doc --open'
|
function cbD --wraps='cargo doc --open' --description 'alias cbD=cargo doc --open'
|
||||||
cargo doc --open $argv;
|
cargo doc --open $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function cba --wraps='cargo update && cargo build --all && cargo doc' --description 'alias cba=cargo update && cargo build --all && cargo doc'
|
function cba --wraps='cargo update && cargo build --all && cargo doc' --description 'alias cba=cargo update && cargo build --all && cargo doc'
|
||||||
cargo update && cargo build --all && cargo doc $argv;
|
cargo update && cargo build --all && cargo doc $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function cbb --wraps='cargo build --all' --description 'alias cbb=cargo build --all'
|
function cbb --wraps='cargo build --all' --description 'alias cbb=cargo build --all'
|
||||||
cargo build --all $argv;
|
cargo build --all $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function cbc --wraps='cargo clean' --description 'alias cbc=cargo clean'
|
function cbc --wraps='cargo clean' --description 'alias cbc=cargo clean'
|
||||||
cargo clean $argv;
|
cargo clean $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function cbd --wraps='cargo doc' --description 'alias cbd=cargo doc'
|
function cbd --wraps='cargo doc' --description 'alias cbd=cargo doc'
|
||||||
cargo doc $argv;
|
cargo doc $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function cbu --wraps='cargo update' --description 'alias cbu=cargo update'
|
function cbu --wraps='cargo update' --description 'alias cbu=cargo update'
|
||||||
cargo update $argv;
|
cargo update $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
function dotP --description 'Generate Pipewire dot graph for all nodes'
|
function dotP --description 'Generate Pipewire dot graph for all nodes'
|
||||||
pw-dot -L -a -o /tmp/pw.dot
|
pw-dot -L -a -o /tmp/pw.dot
|
||||||
dot -Tsvg /tmp/pw.dot > ~/Pictures/pipewire/pw-dot-(date +%T).svg
|
dot -Tsvg /tmp/pw.dot >~/Pictures/pipewire/pw-dot-(date +%T).svg
|
||||||
rm /tmp/pw.dot
|
rm /tmp/pw.dot
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
function dotg --description 'Generate gstreamer dot graph for selected file'
|
function dotg --description 'Generate gstreamer dot graph for selected file'
|
||||||
if count $argv > /dev/null
|
if count $argv >/dev/null
|
||||||
set dotpath "$argv"
|
set dotpath "$argv"
|
||||||
else
|
else
|
||||||
set dotpath "$GST_DEBUG_DUMP_DOT_DIR"
|
set dotpath "$GST_DEBUG_DUMP_DOT_DIR"
|
||||||
end
|
end
|
||||||
|
|
||||||
find $dotpath -maxdepth 1 -regextype posix-extended -regex ".*\.(dot)" | fzf | read -l result;
|
find $dotpath -maxdepth 1 -regextype posix-extended -regex ".*\.(dot)" | fzf | read -l result
|
||||||
|
|
||||||
if test -n "$result"
|
if test -n "$result"
|
||||||
dot -Tsvg "$result" -O
|
dot -Tsvg "$result" -O
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
function dotp --description 'Generate Pipewire dot graph for linked nodes'
|
function dotp --description 'Generate Pipewire dot graph for linked nodes'
|
||||||
pw-dot -L -s -o /tmp/pw.dot
|
pw-dot -L -s -o /tmp/pw.dot
|
||||||
dot -Tsvg /tmp/pw.dot > ~/Pictures/pipewire/pw-dot-(date +%T).svg
|
dot -Tsvg /tmp/pw.dot >~/Pictures/pipewire/pw-dot-(date +%T).svg
|
||||||
rm /tmp/pw.dot
|
rm /tmp/pw.dot
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function dpw --wraps=pw-dump\ \|\ jq\ \|\ nvim\ -c\ \'setlocal\ ft=json\'\ -R --description alias\ dpw=pw-dump\ \|\ jq\ \|\ nvim\ -c\ \'setlocal\ ft=json\'\ -R
|
function dpw --wraps=pw-dump\ \|\ jq\ \|\ nvim\ -c\ \'setlocal\ ft=json\'\ -R --description alias\ dpw=pw-dump\ \|\ jq\ \|\ nvim\ -c\ \'setlocal\ ft=json\'\ -R
|
||||||
pw-dump | jq | nvim -c 'setlocal ft=json' -R $argv;
|
pw-dump | jq | nvim -c 'setlocal ft=json' -R $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,8 @@ set --path -a NESTED_FISH_LABELS
|
||||||
function fish_prompt
|
function fish_prompt
|
||||||
set -l command_status $status
|
set -l command_status $status
|
||||||
set -l question_mark_in_circle '?'\u20dd
|
set -l question_mark_in_circle '?'\u20dd
|
||||||
set_color red; echo -n '# '
|
set_color red
|
||||||
|
echo -n '# '
|
||||||
|
|
||||||
# Print nesting
|
# Print nesting
|
||||||
if test (count $NESTED_FISH_LABELS) -gt 0
|
if test (count $NESTED_FISH_LABELS) -gt 0
|
||||||
|
@ -14,7 +15,8 @@ function fish_prompt
|
||||||
|
|
||||||
# Print current location
|
# Print current location
|
||||||
if [ "$PWD" = "$HOME" ]
|
if [ "$PWD" = "$HOME" ]
|
||||||
set_color green; echo -n '~'
|
set_color green
|
||||||
|
echo -n '~'
|
||||||
else
|
else
|
||||||
set -l parent_dir (dirname "$PWD")
|
set -l parent_dir (dirname "$PWD")
|
||||||
set_color blue
|
set_color blue
|
||||||
|
@ -24,7 +26,8 @@ function fish_prompt
|
||||||
echo -n (basename "$parent_dir")
|
echo -n (basename "$parent_dir")
|
||||||
end
|
end
|
||||||
echo -n ' → '
|
echo -n ' → '
|
||||||
set_color green; echo -n (basename "$PWD")
|
set_color green
|
||||||
|
echo -n (basename "$PWD")
|
||||||
end
|
end
|
||||||
echo -n ' '
|
echo -n ' '
|
||||||
|
|
||||||
|
@ -36,23 +39,28 @@ function fish_prompt
|
||||||
set -l git_commits_ahead (git rev-list '@{u}..HEAD' | wc -l | awk '{print $1}')
|
set -l git_commits_ahead (git rev-list '@{u}..HEAD' | wc -l | awk '{print $1}')
|
||||||
set -l git_commits_behind (git rev-list 'HEAD..@{u}' | wc -l | awk '{print $1}')
|
set -l git_commits_behind (git rev-list 'HEAD..@{u}' | wc -l | awk '{print $1}')
|
||||||
if [ \( "$git_commits_ahead" -eq 0 \) -a \( "$git_commits_behind" -eq 0 \) ]
|
if [ \( "$git_commits_ahead" -eq 0 \) -a \( "$git_commits_behind" -eq 0 \) ]
|
||||||
set_color blue; echo -n '⦿'
|
set_color blue
|
||||||
|
echo -n '⦿'
|
||||||
else
|
else
|
||||||
if [ "$git_commits_behind" -gt 0 ]
|
if [ "$git_commits_behind" -gt 0 ]
|
||||||
set_color red; echo -n "↓$git_commits_behind"
|
set_color red
|
||||||
|
echo -n "↓$git_commits_behind"
|
||||||
end
|
end
|
||||||
if [ "$git_commits_ahead" -gt 0 ]
|
if [ "$git_commits_ahead" -gt 0 ]
|
||||||
set_color brred; echo -n "↑$git_commits_ahead"
|
set_color brred
|
||||||
|
echo -n "↑$git_commits_ahead"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
# Otherwise, indicate that an upstream is unknown
|
# Otherwise, indicate that an upstream is unknown
|
||||||
set_color brred; echo -n "$question_mark_in_circle"
|
set_color brred
|
||||||
|
echo -n "$question_mark_in_circle"
|
||||||
end
|
end
|
||||||
|
|
||||||
set -l git_branch (git branch 2>/dev/null | sed -n '/\* /s///p')
|
set -l git_branch (git branch 2>/dev/null | sed -n '/\* /s///p')
|
||||||
if test -n "$git_branch"
|
if test -n "$git_branch"
|
||||||
set_color blue; echo -n ' ['
|
set_color blue
|
||||||
|
echo -n ' ['
|
||||||
# Color the branch name differently if the working tree is dirty
|
# Color the branch name differently if the working tree is dirty
|
||||||
if [ (count (git status --porcelain)) -gt 0 ]
|
if [ (count (git status --porcelain)) -gt 0 ]
|
||||||
set_color brred
|
set_color brred
|
||||||
|
@ -60,14 +68,17 @@ function fish_prompt
|
||||||
set_color yellow
|
set_color yellow
|
||||||
end
|
end
|
||||||
echo -n "$git_branch"
|
echo -n "$git_branch"
|
||||||
set_color blue; echo -n '] '
|
set_color blue
|
||||||
|
echo -n '] '
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if [ "$command_status" -eq 0 ]
|
if [ "$command_status" -eq 0 ]
|
||||||
set_color brcyan; echo -n 'λ: '
|
set_color brcyan
|
||||||
|
echo -n 'λ: '
|
||||||
else
|
else
|
||||||
set_color red; echo -n 'λ! '
|
set_color red
|
||||||
|
echo -n 'λ! '
|
||||||
end
|
end
|
||||||
set_color normal
|
set_color normal
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
function gdd --description "Use difftastic as a difftool"
|
function gdd --description "Use difftastic as a difftool"
|
||||||
git difftool --tool=difftastic $argv
|
git difftool --tool=difftastic $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,11 @@ function gl --description 'Git browse commits'
|
||||||
set -l copy_commit_hash "$log_line_to_hash | wl-copy"
|
set -l copy_commit_hash "$log_line_to_hash | wl-copy"
|
||||||
set -l git_checkout "$log_line_to_hash | xargs -I % sh -c 'git checkout %'"
|
set -l git_checkout "$log_line_to_hash | xargs -I % sh -c 'git checkout %'"
|
||||||
set -l git_cherry_pick "$log_line_to_hash | xargs -I % sh -c 'git cherry-pick %'"
|
set -l git_cherry_pick "$log_line_to_hash | xargs -I % sh -c 'git cherry-pick %'"
|
||||||
set -l open_cmd "xdg-open"
|
set -l open_cmd xdg-open
|
||||||
|
|
||||||
set github_open "$log_line_to_hash | xargs -I % sh -c '$open_cmd https://github.\$(git config remote.origin.url | cut -f2 -d. | tr \':\' /)/commit/%'"
|
set github_open "$log_line_to_hash | xargs -I % sh -c '$open_cmd https://github.\$(git config remote.origin.url | cut -f2 -d. | tr \':\' /)/commit/%'"
|
||||||
|
|
||||||
git log --color=always --format='%C(auto)%h%d %s %C(green)%C(bold)%cr% C(blue)%an' $argv | \
|
git log --color=always --format='%C(auto)%h%d %s %C(green)%C(bold)%cr% C(blue)%an' $argv | fzf --exact --no-sort --reverse --tiebreak=index --no-multi --ansi \
|
||||||
fzf --exact --no-sort --reverse --tiebreak=index --no-multi --ansi \
|
|
||||||
--preview="$view_commit" \
|
--preview="$view_commit" \
|
||||||
--header="ENTER to view, CTRL-Y to copy hash, CTRL-O to open on GitHub, CTRL-X to checkout, CTRL-C to exit, CTRL-S to cherry-pick" \
|
--header="ENTER to view, CTRL-Y to copy hash, CTRL-O to open on GitHub, CTRL-X to checkout, CTRL-C to exit, CTRL-S to cherry-pick" \
|
||||||
--bind "enter:execute:$view_commit_nvim | nvim -R -" \
|
--bind "enter:execute:$view_commit_nvim | nvim -R -" \
|
||||||
|
@ -20,4 +19,3 @@ function gl --description 'Git browse commits'
|
||||||
--bind "ctrl-s:execute:$git_cherry_pick" \
|
--bind "ctrl-s:execute:$git_cherry_pick" \
|
||||||
--bind "ctrl-d:half-page-down,ctrl-u:half-page-up,ctrl-n:preview-down,ctrl-p:preview-up,ctrl-f:preview-page-down,ctrl-b:preview-page-up"
|
--bind "ctrl-d:half-page-down,ctrl-u:half-page-up,ctrl-n:preview-down,ctrl-p:preview-up,ctrl-f:preview-page-down,ctrl-b:preview-page-up"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function gn --wraps='nvim +Git +only' --description 'alias gn=nvim +Git +only'
|
function gn --wraps='nvim +Git +only' --description 'alias gn=nvim +Git +only'
|
||||||
nvim +Git +only $argv;
|
nvim +Git +only $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function gsl --wraps=gst-launch-1.0 --description 'alias gsl=gst-launch-1.0'
|
function gsl --wraps=gst-launch-1.0 --description 'alias gsl=gst-launch-1.0'
|
||||||
gst-launch-1.0 $argv;
|
gst-launch-1.0 $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function gst --wraps=gst-inspect-1.0 --description 'alias gst=gst-inspect-1.0'
|
function gst --wraps=gst-inspect-1.0 --description 'alias gst=gst-inspect-1.0'
|
||||||
gst-inspect-1.0 $argv;
|
gst-inspect-1.0 $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function icat --wraps='kitty +kitten icat (fzf)' --description 'alias icat=kitty +kitten icat (fzf)'
|
function icat --wraps='kitty +kitten icat (fzf)' --description 'alias icat=kitty +kitten icat (fzf)'
|
||||||
kitty +kitten icat (fzf) $argv;
|
kitty +kitten icat (fzf) $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function jb --wraps='journalctl -r -b -1' --description 'alias jb=journalctl -r -b -1'
|
function jb --wraps='journalctl -r -b -1' --description 'alias jb=journalctl -r -b -1'
|
||||||
journalctl -r -b -1 $argv;
|
journalctl -r -b -1 $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function jf --wraps='journalctl -f' --description 'alias jf=journalctl -f'
|
function jf --wraps='journalctl -f' --description 'alias jf=journalctl -f'
|
||||||
journalctl -f $argv;
|
journalctl -f $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function jk --wraps='journalctl -r -k' --description 'alias jk=journalctl -r -k'
|
function jk --wraps='journalctl -r -k' --description 'alias jk=journalctl -r -k'
|
||||||
journalctl -r -k $argv;
|
journalctl -r -k $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function jr --wraps='journalctl -r' --description 'alias jr=journalctl -r'
|
function jr --wraps='journalctl -r' --description 'alias jr=journalctl -r'
|
||||||
journalctl -r $argv;
|
journalctl -r $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function ju --wraps='journalctl -u' --description 'alias ju=journalctl -u'
|
function ju --wraps='journalctl -u' --description 'alias ju=journalctl -u'
|
||||||
journalctl -u $argv;
|
journalctl -u $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function jx --wraps='journalctl -xe' --description 'alias jx=journalctl -xe'
|
function jx --wraps='journalctl -xe' --description 'alias jx=journalctl -xe'
|
||||||
journalctl -xe $argv;
|
journalctl -xe $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function m --wraps=mutt --description 'alias m=mutt'
|
function m --wraps=mutt --description 'alias m=mutt'
|
||||||
mutt $argv;
|
mutt $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function sdd --wraps='systemctl disable ' --description 'alias sdd=systemctl disable '
|
function sdd --wraps='systemctl disable ' --description 'alias sdd=systemctl disable '
|
||||||
systemctl disable $argv;
|
systemctl disable $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function sde --wraps='systemctl enable ' --description 'alias sde=systemctl enable '
|
function sde --wraps='systemctl enable ' --description 'alias sde=systemctl enable '
|
||||||
systemctl enable $argv;
|
systemctl enable $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function sds --wraps='systemctl status ' --description 'alias sds=systemctl status '
|
function sds --wraps='systemctl status ' --description 'alias sds=systemctl status '
|
||||||
systemctl status $argv;
|
systemctl status $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function sfc --wraps='source ~/.config/fish/config.fish' --description 'alias sfc=source ~/.config/fish/config.fish'
|
function sfc --wraps='source ~/.config/fish/config.fish' --description 'alias sfc=source ~/.config/fish/config.fish'
|
||||||
source ~/.config/fish/config.fish $argv;
|
source ~/.config/fish/config.fish $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function t --wraps='tokei .' --description 'alias t=tokei .'
|
function t --wraps='tokei .' --description 'alias t=tokei .'
|
||||||
tokei . $argv;
|
tokei . $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
function ta --description 'Attaches to a selected session'
|
function ta --description 'Attaches to a selected session'
|
||||||
set session (tmux list-sessions | fzf | awk -F':' '{print $1}')
|
set session (tmux list-sessions | fzf | awk -F':' '{print $1}')
|
||||||
tmux attach -t $session;
|
tmux attach -t $session
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function tks --wraps='tmux kill-server' --description 'alias tks=tmux kill-server'
|
function tks --wraps='tmux kill-server' --description 'alias tks=tmux kill-server'
|
||||||
tmux kill-server $argv;
|
tmux kill-server $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function tksa --wraps='tmux kill-session -a' --description 'alias tksa=tmux kill-session -a'
|
function tksa --wraps='tmux kill-session -a' --description 'alias tksa=tmux kill-session -a'
|
||||||
tmux kill-session -a $argv;
|
tmux kill-session -a $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function tls --wraps='tmux ls' --description 'alias tls=tmux ls'
|
function tls --wraps='tmux ls' --description 'alias tls=tmux ls'
|
||||||
tmux ls $argv;
|
tmux ls $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function v --wraps=nvim --description 'alias v=nvim'
|
function v --wraps=nvim --description 'alias v=nvim'
|
||||||
nvim $argv;
|
nvim $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vc --wraps='nvim --clean' --description 'alias vc=nvim --clean'
|
function vc --wraps='nvim --clean' --description 'alias vc=nvim --clean'
|
||||||
nvim --clean $argv;
|
nvim --clean $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
# ACMRU = Added || Copied || Modified || Renamed || Unmerged
|
# ACMRU = Added || Copied || Modified || Renamed || Unmerged
|
||||||
# Edit all uncommitted files that have changes since the last commit (be they staged or unstaged)
|
# Edit all uncommitted files that have changes since the last commit (be they staged or unstaged)
|
||||||
function vd --wraps='nvim (git diff HEAD --name-only --diff-filter=ACMR)' --description 'alias vd=nvim (git diff HEAD --name-only --diff-filter=ACMR)'
|
function vd --wraps='nvim (git diff HEAD --name-only --diff-filter=ACMR)' --description 'alias vd=nvim (git diff HEAD --name-only --diff-filter=ACMR)'
|
||||||
nvim (git diff HEAD --name-only --diff-filter=ACMR) $argv;
|
nvim (git diff HEAD --name-only --diff-filter=ACMR) $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vdc --wraps='nvim (git diff HEAD^ --name-only --diff-filter=ACMR)' --description 'Edit all files that were altered in the last commit'
|
function vdc --wraps='nvim (git diff HEAD^ --name-only --diff-filter=ACMR)' --description 'Edit all files that were altered in the last commit'
|
||||||
nvim (git diff HEAD^ --name-only --diff-filter=ACMR) $argv;
|
nvim (git diff HEAD^ --name-only --diff-filter=ACMR) $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vdm --wraps='nvim (git diff master --name-only --diff-filter=ACMR)' --description 'Edit files changed since master'
|
function vdm --wraps='nvim (git diff master --name-only --diff-filter=ACMR)' --description 'Edit files changed since master'
|
||||||
nvim (git diff master --name-only --diff-filter=ACMR) $argv;
|
nvim (git diff master --name-only --diff-filter=ACMR) $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vds --wraps='nvim (git diff --staged --name-only --diff-filter=ACMR)' --description 'Edit all staged files that have changes since the last commit'
|
function vds --wraps='nvim (git diff --staged --name-only --diff-filter=ACMR)' --description 'Edit all staged files that have changes since the last commit'
|
||||||
nvim (git diff --staged --name-only --diff-filter=ACMR) $argv;
|
nvim (git diff --staged --name-only --diff-filter=ACMR) $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vdu --wraps='nvim (git diff --name-only --diff-filter=U | uniq)' --description 'Edit files unmerged'
|
function vdu --wraps='nvim (git diff --name-only --diff-filter=U | uniq)' --description 'Edit files unmerged'
|
||||||
nvim (git diff --name-only --diff-filter=U | uniq) $argv;
|
nvim (git diff --name-only --diff-filter=U | uniq) $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vdua --wraps='git add (git diff --name-only --diff-filter=U)' --description 'Add unmerged files'
|
function vdua --wraps='git add (git diff --name-only --diff-filter=U)' --description 'Add unmerged files'
|
||||||
git add (git diff --name-only --diff-filter=U) $argv;
|
git add (git diff --name-only --diff-filter=U) $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vfv --wraps='v (fzf)' --description 'alias vf=v (fzf)'
|
function vfv --wraps='v (fzf)' --description 'alias vf=v (fzf)'
|
||||||
v (fzf) $argv;
|
v (fzf) $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vg --wraps=vgrep --description 'alias vg=vgrep'
|
function vg --wraps=vgrep --description 'alias vg=vgrep'
|
||||||
vgrep $argv;
|
vgrep $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vn --wraps='nvim -u NONE' --description 'alias vn=nvim -u NONE'
|
function vn --wraps='nvim -u NONE' --description 'alias vn=nvim -u NONE'
|
||||||
nvim -u NONE $argv;
|
nvim -u NONE $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vnp --wraps='nvim --noplugin' --description 'alias vnp=nvim --noplugin'
|
function vnp --wraps='nvim --noplugin' --description 'alias vnp=nvim --noplugin'
|
||||||
nvim --noplugin $argv;
|
nvim --noplugin $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vnrc --wraps='nvim -u NORC' --description 'alias vnrc=nvim -u NORC'
|
function vnrc --wraps='nvim -u NORC' --description 'alias vnrc=nvim -u NORC'
|
||||||
nvim -u NORC $argv;
|
nvim -u NORC $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function vs --wraps='vgrep -s' --description 'alias vs=vgrep -s'
|
function vs --wraps='vgrep -s' --description 'alias vs=vgrep -s'
|
||||||
vgrep -s $argv;
|
vgrep -s $argv
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue