From 1e4ca33c1b1c4fbf85f4e30198728e6108e41655 Mon Sep 17 00:00:00 2001 From: Andrea Mistrali Date: Sat, 15 Apr 2017 09:25:40 +0200 Subject: [PATCH] Fix x509 function and autoload it --- zsh.d/50-functions.zsh | 3 +++ zsh.d/zshfunctions/x509 | 6 +++++- zsh.d/zshfunctions/x509.zwc | Bin 344 -> 560 bytes 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/zsh.d/50-functions.zsh b/zsh.d/50-functions.zsh index 300f445..42eb961 100644 --- a/zsh.d/50-functions.zsh +++ b/zsh.d/50-functions.zsh @@ -22,5 +22,8 @@ autoload -U fancyTerm # repo_char - returns a character based on the type of repo we are in autoload -U repo_char +# repo_char - returns a character based on the type of repo we are in +autoload -U x509 + # vim: set ts=4 sw=4 tw=0 ft=zsh : diff --git a/zsh.d/zshfunctions/x509 b/zsh.d/zshfunctions/x509 index 3b87a68..592fd35 100644 --- a/zsh.d/zshfunctions/x509 +++ b/zsh.d/zshfunctions/x509 @@ -1 +1,5 @@ -openssl x509 -in $1 -noout -text | less +if [ -r "$1" ]; then + openssl x509 -in $1 -noout -text | less +else + echo "x509 " +fi diff --git a/zsh.d/zshfunctions/x509.zwc b/zsh.d/zshfunctions/x509.zwc index 5ce312bd36dca919adb9b264c47a3c7a30ae6b8a..63ae6abebd8463d9ce90dfd50e67bc0cb13cee30 100644 GIT binary patch literal 560 zcmbu5v1$TA6h-gsj2f^|!D7o)X~eKAu?Pe~grMJHCd6fN)mgzJg&?GHi-_&E`I12L zA^DNq*_}pWk&uDQyt(hac{8V0ttj{c{p%inv)U~BbcGrB3m0$t!7Z2^dVseDcJx~f zAgnvjFTEG~dj&)X3BmZtxabLhFP`mvAC#SQLq!uKJDI?k@dNcvT~W`}Qo7zIFydwR z^j@hq%C0;Mb0iBrHzr2$!0tRr)+xHF-lT}NG0@Ye1i4LK-c9u?eVoO5kYlDQ)tdJQ zE*y6jO)<83jW-0gq+`)ET0lJ{DSE#1Ks0I(d5BoU->74m4{ZJi8fhjGMAl*M3>vvC Pdznpa$$!vHo*H!nZGw1h#oB(#OhqI`CuEF92po4fG);#E_1PG76W6CHc$?$a|yW>080-hZvX%Q