From 56923b7d2ed88c1c92f401130e1964fa26120386 Mon Sep 17 00:00:00 2001 From: Morgan Wattiez Date: Mon, 5 Aug 2019 11:03:44 +0200 Subject: [PATCH] Add some function aliases from * https://blog.developer.atlassian.com/ten-tips-for-wonderful-bash-productivity/ --- dot_vimrc | 1 - dot_zsh_functions | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dot_vimrc b/dot_vimrc index 83ea6a4..0445cca 100644 --- a/dot_vimrc +++ b/dot_vimrc @@ -30,7 +30,6 @@ set incsearch set hlsearch " Disable error bells set noerrorbells - " Don’t show the intro message when starting Vim set shortmess=atI " Show the filename in the window titlebar diff --git a/dot_zsh_functions b/dot_zsh_functions index 650b771..b6136ec 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -86,3 +86,14 @@ function greppagedate() { echo "$yearint" 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- +}