Skip to content

Instantly share code, notes, and snippets.

Javi Polo javipolo

  • kodify
  • Barcelona, Catalunya
Block or report user

Report or block javipolo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@javipolo
javipolo / set-tmux-title
Last active Mar 22, 2019 — forked from florianbeer/set-tmux-title
Set tmux pane title to short hostname on ssh connections
View set-tmux-title
# Make short hostname only if its not an IP address
__tm_get_hostname(){
local HOST="$(echo $* | rev | cut -d ' ' -f 1 | rev)"
if echo $HOST | grep -P "^([0-9]+\.){3}[0-9]+" -q; then
echo $HOST
else
echo $HOST| cut -d . -f 1
fi
}
You can’t perform that action at this time.