diff options
author | epoch <epoch@hack.thebackupbox.net> | 2020-12-22 07:05:47 +0000 |
---|---|---|
committer | epoch <epoch@hack.thebackupbox.net> | 2020-12-22 07:05:47 +0000 |
commit | 6dc4ece3b894b24dee0e1062c22f6c1bf205604a (patch) | |
tree | 7354e078b27503fd9b4c4bec54e91b8be31be949 | |
parent | 1a9d4eef06abda47620bbb7f2dda2c981d5a2ce4 (diff) | |
download | uritools-6dc4ece3b894b24dee0e1062c22f6c1bf205604a.tar.gz uritools-6dc4ece3b894b24dee0e1062c22f6c1bf205604a.zip |
urigetline now uses $uristart_config, if set, to find the config file
-rwxr-xr-x | urigetline | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3,8 +3,12 @@ uri="$1" ### old way. # line="$(grep "^${scheme}:" ~/.config/uristart.conf | cut -d: -f2- | sed 's/^[ \t]*//g' | sed 's/\\/\\\\/g')" +if [ ! "$uristart_config" ];then + uristart_config=~/.config/uristart.conf +fi + ### fancy way. -grep '^[^#]' ~/.config/uristart.conf \ +grep '^[^#]' "$uristart_config" \ | while read -r l;do uritmp="$uri" uritmp="$(printf "%s\n" "$l" \ |