mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 08:45:39 +00:00
more shortcuts for git and ps, and forgot typo
This commit is contained in:
parent
cee1ddbe06
commit
45fb7f7b9a
13
bin/nuke
Executable file
13
bin/nuke
Executable 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
|
@ -15,7 +15,7 @@ function aliases --description 'All aliases'
|
||||
abbr -a tnn 'tmux new-session -s noah'
|
||||
|
||||
# Git
|
||||
abbr -a gs 'git status -sb'
|
||||
abbr -a gs 'git status'
|
||||
abbr -a gd 'git diff'
|
||||
abbr -a gds 'git diff --staged'
|
||||
abbr -a ga 'git add'
|
||||
|
@ -15,17 +15,17 @@ function gittools
|
||||
|
||||
function git-merge-fuzzy
|
||||
set branch (git-fuzzy-branch "merge from...")
|
||||
and git merge
|
||||
and git merge $branch
|
||||
end
|
||||
|
||||
function git-delete-fuzzy
|
||||
set branch (git-fuzzy-branch "delete branch...")
|
||||
and git branch -d
|
||||
and git branch -d $branch
|
||||
end
|
||||
|
||||
function git-force-delete-fuzzy
|
||||
set branch (git-fuzzy-branch "force delete branch...")
|
||||
and git branch -D
|
||||
and git branch -D $branch
|
||||
end
|
||||
|
||||
function git
|
||||
@ -49,7 +49,11 @@ function gittools
|
||||
return 1
|
||||
end
|
||||
else
|
||||
command git $argv
|
||||
if count $argv > /dev/null
|
||||
command git $argv
|
||||
else
|
||||
command git status -sb
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user