dotfiles/.bin/c

26 lines
629 B
Plaintext
Raw Normal View History

2022-12-07 14:39:35 +01:00
#!/bin/sh
2022-12-07 18:56:50 +01:00
if [ ! -z "$@" ]
then
EXTRA="--query $@"
fi
2022-12-07 14:39:35 +01:00
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 \
2022-12-07 18:56:50 +01:00
| fzf -e +s $EXTRA --preview='cat {}' );
2022-12-07 14:39:35 +01:00
[ -z "$F" ] || vim "$F";