dotfiles/.bin/c
2022-12-07 18:58:35 +01:00

26 lines
629 B
Bash
Executable File

#!/bin/sh
if [ ! -z "$@" ]
then
EXTRA="--query $@"
fi
F=$(find $HOME/.config/* \
$HOME/.* \
-maxdepth 1 \
-type f \
\( -name "*.cfg" \
-o -name "*.conf" \
-o -name "*.lua" \
-o -name "*.sh" \
-o -name "*.xsession*" \
-o -name "*rc" \
-o -name ".Xresources" \
-o -name ".Xdefaults" \
-o -name ".ini" \
-o -name "config" \
\) | sort -u \
| fzf -e +s $EXTRA --preview='cat {}' );
[ -z "$F" ] || vim "$F";