Add some function aliases from
* https://blog.developer.atlassian.com/ten-tips-for-wonderful-bash-productivity/
This commit is contained in:
parent
9049a3c071
commit
56923b7d2e
@ -30,7 +30,6 @@ set incsearch
|
|||||||
set hlsearch
|
set hlsearch
|
||||||
" Disable error bells
|
" Disable error bells
|
||||||
set noerrorbells
|
set noerrorbells
|
||||||
|
|
||||||
" Don’t show the intro message when starting Vim
|
" Don’t show the intro message when starting Vim
|
||||||
set shortmess=atI
|
set shortmess=atI
|
||||||
" Show the filename in the window titlebar
|
" Show the filename in the window titlebar
|
||||||
|
@ -86,3 +86,14 @@ function greppagedate() {
|
|||||||
echo "$yearint"
|
echo "$yearint"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
# Extract a column from a tabular output
|
||||||
|
# via https://blog.developer.atlassian.com/ten-tips-for-wonderful-bash-productivity/
|
||||||
|
function col() {
|
||||||
|
awk -v col=$1 '{print $col}'
|
||||||
|
}
|
||||||
|
# Skip first x words in line
|
||||||
|
# via https://blog.developer.atlassian.com/ten-tips-for-wonderful-bash-productivity/
|
||||||
|
function skip {
|
||||||
|
n=$(($1 + 1))
|
||||||
|
cut -d' ' -f$n-
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user