How to automatically use a config file located up in a parent directory #471
-
Question (in the title) moved from #470 to Q&A here. AnswerIf you want the alias ugh='ug --config="`_wd="$PWD" ; while [[ "$_wd" != "$HOME" ]] ; do if test -f "$_wd/.ugrep" ; then echo $_wd/.ugrep; break; fi ; _wd=${_wd%/*}; done`"' I picked alias This commands picks a .ugrep config file found in the parent or first ancestor directory, up to the home directory. When you have a .ugrep config file there, then |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Note: see the answer in the post above. |
Beta Was this translation helpful? Give feedback.
Note: see the answer in the post above.