From d053c5c82c34e83515f3071513b1f0b2fedd6c4e Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Sun, 3 Nov 2019 03:22:12 +0100 Subject: [PATCH] bashrc aliases for better head & tail --- dotfiles/.config/bash/profile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dotfiles/.config/bash/profile b/dotfiles/.config/bash/profile index 8f4d798..71c3852 100644 --- a/dotfiles/.config/bash/profile +++ b/dotfiles/.config/bash/profile @@ -207,6 +207,10 @@ alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date alias tmux='tmux -f "$XDG_CONFIG_HOME/tmux/tmux.conf"' +# Head and tail as much as fits on screen +alias head='head -n $((${LINES:-15}-5))' +alias tail='tail -n $((${LINES:-15}-5))' + # A few options to get public IP address on command line. The dig solution # below using the OpenDNS resolver doesn't work when connected to # ExpressVPN because all DNS requests are handled by the ExpressVPN DNS