diff --git a/shells/zshrc b/shells/zshrc index 7f339b6..1674c3d 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -159,8 +159,11 @@ function ctar(){ #tar -cf - $@|pv -WcN tar -s $(echo $(du -sb $@|awk '{print $1}'|tr '\n' '+')0|bc)|gzip|pv -WcN dest } function offline(){ - echo unshare -n -- sh -c "sudo -u stonewareslord zsh -c '$@'" - sudo unshare -n -- sh -c "sudo -u stonewareslord zsh -c '$@'" + if [ ! -z "$@" ] ; then + sudo unshare -n -- sudo -u stonewareslord zsh -c "$@" + else + sudo unshare -n -- sudo -u stonewareslord zsh + fi } function smon(){ timeout 1s pdsh -R ssh -w 10.0.1.196,10.0.1.207 "$@"