]> Sergey Matveev's repositories - nnn.git/commitdiff
Use POSIX compliant sh scripts if possible
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 24 Mar 2019 15:41:43 +0000 (21:11 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 24 Mar 2019 15:41:43 +0000 (21:11 +0530)
user-scripts/copier
user-scripts/edit
user-scripts/fzy
user-scripts/kdeconnect
user-scripts/picker
user-scripts/upgrade

index a99b88bbda45d8668407bdbc7afadd5177041548..2aec8201203b17d9132fc99483bdbb37f3751d64 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Description: Copy selection to clipboard
 #
-# Shell: generic
+# Shell: POSIX compliant
 # Author: Arun Prakash Jana
 
 # Linux
index f23d7a834eb9b2f5d3675329b9590171dc6ad409..d15b34ed9deca095809bce53d25df367fc46d775 100755 (executable)
@@ -2,11 +2,7 @@
 
 # Description: Fuzzy find a file in directory subtree with fzy and edit in vim
 #
-# Shell: generic
+# Shell: POSIX compliant
 # Author: Arun Prakash Jana
 
-# bash, zsh
-vim $(find -type f | fzy)
-
-# fish
-# vim (find -type f | fzy)
+vim `find -type f | fzy`
index ba8cfc9d1198a9e2f662bd110eac5b83f58d9362..0e52b28452c1e13ce060f7571420b28dc9cbb01c 100755 (executable)
@@ -2,11 +2,7 @@
 
 # Description: Fuzzy find a file in directory subtree with fzy and open using xdg-open
 #
-# Shell: generic
+# Shell: POSIX compliant
 # Author: Arun Prakash Jana
 
-# bash, zsh
-xdg-open $(find -type f | fzy) >/dev/null 2>&1
-
-# fish
-# xdg-open (find -type f | fzy) >/dev/null 2>&1
+xdg-open `find -type f | fzy` >/dev/null 2>&1
index ac247f45bea88317976fc0266b8f007598a1c98f..db28e7a1b2cdb1bf203711e4f665c3b138a21446 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Description: Send the selected files to your Android device using kdeconnect-cli. You must have installed and configured kdeconnect both on the Android device and on the PC.
 #
-# Shell: Bash
+# Shell: bash
 # Author: juacq97
 
 id=$(kdeconnect-cli -a --id-only | awk '{print $1}')
index cebecb16c236508e5b08589f59be80ac48207564..a5004359c67f730697692ac4fb473937d4208f82 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Description: Pick files and pipe the newline-separated list to another utility
 #
-# Shell: generic
+# Shell: POSIX compliant
 # Author: Arun Prakash Jana
 #
 # Usage:
index fa044eeb884954af81efe0cf9e73a9d60363f969..858a6a0d953baed735dfc0656574d9d0657dfc5a 100755 (executable)
@@ -18,7 +18,7 @@ fi
 wget "https://github.com/jarun/nnn/releases/download/v$new/nnn_$new-1_debian9.amd64.deb"
 
 # install it
-dpkg -i nnn_$new-1_debian9.amd64.deb
+sudo dpkg -i nnn_$new-1_debian9.amd64.deb
 
 # remove the file
 rm -rf nnn_$new-1_debian9.amd64.deb