Created
October 17, 2017 06:11
-
-
Save canabady/28cd7a020b18b14cea5b4afda7de70ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
====================================== | |
sqlite3 preview in Ranger file Manager | |
====================================== | |
To preview every *.db, *.sqlite file in Ranger File Manager, | |
You can add the following to the | |
case "$extension" in | |
in Your scope.sh: | |
db|sqlite) | |
sqlite3 "$path" "SELECT name FROM sqlite_master WHERE type='table';" | xargs -I {} bash -c 'echo "{}:" ; sqlite3 '"$path"' -header -column "SELECT * FROM {}; " ; echo "" ' ; exit 0;; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment