Browse Source

Add forgotten argument to xi*/xo* functions

Alois Mahdal 8 years ago
parent
commit
578d6ffae2
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      dotfiles/bash/main.bashrc

+ 2
- 1
dotfiles/bash/main.bashrc View File

149
     # Common clipboard operations with fixnl() on top
149
     # Common clipboard operations with fixnl() on top
150
     #
150
     #
151
     local op=$1
151
     local op=$1
152
+    local file=${2:-/dev/stdin}
152
     case $op in
153
     case $op in
153
         oo) xclip -selection clipboard -o    | fixnl ;;
154
         oo) xclip -selection clipboard -o    | fixnl ;;
154
         o)  xclip -o                         | fixnl ;;
155
         o)  xclip -o                         | fixnl ;;
155
         ii) fixnl -c | xclip -selection clipboard -i ;;
156
         ii) fixnl -c | xclip -selection clipboard -i ;;
156
         i)  fixnl -c | xclip -i                      ;;
157
         i)  fixnl -c | xclip -i                      ;;
157
-    esac
158
+    esac <"$file"
158
 }
159
 }
159
 
160
 
160
 xod() {
161
 xod() {