浏览代码

cli: beauty touches on 'omz pr test' command

Marc Cornellà 4 年之前
父节点
当前提交
a15f0f0e9f
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      lib/cli.zsh

+ 4 - 0
lib/cli.zsh

@@ -181,6 +181,10 @@ function _omz::pr::test {
     # After testing, go back to the previous HEAD if the user wants
     _omz::log prompt "do you want to go back to the previous branch? [Y/n] "
     read -r -k 1
+
+    # If no newline entered, add a newline
+    [[ "$REPLY" != $'\n' ]] && echo
+    # If NO selected, do nothing else
     [[ "$REPLY" = [nN] ]] && return
 
     (