Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kdave committed Nov 29, 2023
1 parent 5e29131 commit 8195545
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ Shortcut for unlimited make with ccache and icecream.
Run the given make command but open the results in vim
(same as saving make output and running vi -q output).

## ccache
[**cc**](cc):
\
[**cc++**](cc++):
\
[**g++**](g++):
\
[**gcc**](gcc):

## crypt
[**device-create-cmd**](device-create-cmd):
Set up a block device with dm-crypt (aes-xts-plain64/sha512)
Expand All @@ -47,6 +56,9 @@ Create symlinks for a given gcc & related tools version
[**bgrep**](bgrep):
Grep in local git branches.
\
[**brandom**](brandom):
Show first 4 random local branches
\
[**bsel**](bsel):
Visual git branch selector (bgrep, dialog), then print the branch name.
\
Expand Down
7 changes: 6 additions & 1 deletion git/bgrep
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/sh
## Grep in local git branches.

git branch | grep -i "$@"
if [ "$1" == "-a" -o "$1" == "-r" ]; then
bflags="$1"
shift
fi

git branch $bflags | grep -i "$@"
16 changes: 16 additions & 0 deletions git/brandom
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
## Show first 4 random local branches

n=4
g=''

if [ -z "$1" ]; then
g='.'
fi

if [ "$1" == "-a" -o "$1" == "-r" ]; then
bflags="$1"
shift
fi

git branch $bflags | grep -v '^[+*]' | grep -i $g "$@" | shuf | head -n "$n"
2 changes: 2 additions & 0 deletions misc/grepi
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec grep -i "$@"

0 comments on commit 8195545

Please sign in to comment.