瀏覽代碼

No newline in 2clip

George Jones 1 年之前
父節點
當前提交
986c713474
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      .bashrc

+ 2 - 2
.bashrc

@@ -239,8 +239,8 @@ fi
 # Copy to clipbloard/paste buffer without using the mouse
 #
 if [[ "$OSTYPE" == "linux-gnu"* ]]; then
-  alias 2clip='xclip -selection c'
-  alias 3clip='printf %s "$(cat /dev/stdin)" | xclip -selection c'  # no final \n
+  alias 2clip='xclip -rmlastnl -selection c'
+  #alias 3clip='printf %s "$(cat /dev/stdin)" | xclip -selection c'  # no final \n
 elif [[ "$OSTYPE" == "darwin"* ]]; then
   alias 2clip='pbcopy'
 fi