more shortcuts for git and ps, and forgot typo

This commit is contained in:
Noah Masur 2020-11-25 12:14:44 -05:00
parent cee1ddbe06
commit 45fb7f7b9a
3 changed files with 22 additions and 5 deletions

13
bin/nuke Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
nuke() {
local pid
pid=$(ps -ef | grep -v ^root | sed 1d | fzf -m | awk '{print $2}')
if [ "x$pid" != "x" ]
then
echo $pid | xargs kill -${1:-9}
fi
}
nuke

View File

@ -15,7 +15,7 @@ function aliases --description 'All aliases'
abbr -a tnn 'tmux new-session -s noah' abbr -a tnn 'tmux new-session -s noah'
# Git # Git
abbr -a gs 'git status -sb' abbr -a gs 'git status'
abbr -a gd 'git diff' abbr -a gd 'git diff'
abbr -a gds 'git diff --staged' abbr -a gds 'git diff --staged'
abbr -a ga 'git add' abbr -a ga 'git add'

View File

@ -15,17 +15,17 @@ function gittools
function git-merge-fuzzy function git-merge-fuzzy
set branch (git-fuzzy-branch "merge from...") set branch (git-fuzzy-branch "merge from...")
and git merge and git merge $branch
end end
function git-delete-fuzzy function git-delete-fuzzy
set branch (git-fuzzy-branch "delete branch...") set branch (git-fuzzy-branch "delete branch...")
and git branch -d and git branch -d $branch
end end
function git-force-delete-fuzzy function git-force-delete-fuzzy
set branch (git-fuzzy-branch "force delete branch...") set branch (git-fuzzy-branch "force delete branch...")
and git branch -D and git branch -D $branch
end end
function git function git
@ -49,7 +49,11 @@ function gittools
return 1 return 1
end end
else else
command git $argv if count $argv > /dev/null
command git $argv
else
command git status -sb
end
end end
end end