Added .bashrc.d directory with initial alias and function for testing.
This commit is contained in:
parent
f6d61543a2
commit
0ff613926e
10
dot_bashrc.d/08.alias
Executable file
10
dot_bashrc.d/08.alias
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# navigation
|
||||||
|
alias +='pushd .'
|
||||||
|
alias -='popd'
|
||||||
|
alias ..='cd ..'
|
||||||
|
alias ...='cd ../..'
|
||||||
|
|
||||||
|
# tail alias
|
||||||
|
alias tailer="tail --follow=name --retry"
|
||||||
13
dot_bashrc.d/09.functions
Executable file
13
dot_bashrc.d/09.functions
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Bash Functions sourced by .bashrc / .sshrc
|
||||||
|
#
|
||||||
|
|
||||||
|
# Get SSL Certificate information
|
||||||
|
# Based on https://serverfault.com/questions/661978/displaying-a-remote-ssl-certificate-details-using-cli-tools
|
||||||
|
function getCertInfo() {
|
||||||
|
local myServer=${1:?a Servername is required}
|
||||||
|
local myPort=${2:-443}
|
||||||
|
|
||||||
|
echo | openssl s_client -showcerts -servername $myServer -connect $myServer:$myPort 2>/dev/null | openssl x509 -inform pem -noout -text
|
||||||
|
}
|
||||||
11
dot_bashrc.d/bashrc.init
Normal file
11
dot_bashrc.d/bashrc.init
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# This churns through files in $HOME/.bashrc.d if they are executable.
|
||||||
|
if [ -d $HOME/.bashrc.d ]; then
|
||||||
|
for x in $HOME/.bashrc.d/* ; do
|
||||||
|
if [[ "${x##*/}" != "bashrc.init" ]]; then
|
||||||
|
test -f "$x" || continue
|
||||||
|
test -x "$x" || continue
|
||||||
|
. "$x"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user