bin/edconf: make usable with sudo
This commit is contained in:
parent
3330b7ff80
commit
09e73b1b1f
|
@ -1,9 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Find and edit config files utilizing fzf
|
# Find and edit config files utilizing fzf
|
||||||
|
alias dedup='awk '"'"'!a[$0]++'"'"
|
||||||
listconf() {
|
listconf() {
|
||||||
{ cat "$conf_cache"; test -f "$conf_extra" && cat "$conf_extra";
|
{ cat "$conf_cache"; test -f "$conf_extra" && cat "$conf_extra";
|
||||||
fd --hidden --type file --size -1m --max-depth 1 . ~;
|
fd --hidden --type file --size -1m --max-depth 1 . ~;
|
||||||
find "$XDG_CONFIG_HOME" /etc -maxdepth 3 -type f -exec grep -lI '' {} +; } | dedup
|
find "$XDG_CONFIG_HOME" /etc -maxdepth 3 -type f -readable -exec grep -lI '' {} + 2>/dev/null; } | dedup
|
||||||
}
|
}
|
||||||
conf_cache_dir="$XDG_CACHE_HOME/edconf"
|
conf_cache_dir="$XDG_CACHE_HOME/edconf"
|
||||||
conf_cache="$conf_cache_dir/files"
|
conf_cache="$conf_cache_dir/files"
|
||||||
|
|
Loading…
Reference in New Issue