edit-config allow calling without params

This commit is contained in:
2024-04-09 11:37:44 +02:00
parent 37c1c7a841
commit 7e0986f5d3

View File

@ -15,7 +15,13 @@ pkgs.writeShellApplication {
runtimeInputs = with pkgs; [ fd fzf ];
text = ''
FILE=$(fd -H -t f . ~/.dotfiles | fzf --query "$1")
if [[ $# == 0 ]]; then
QUERY=""
else
QUERY="$1"
fi
FILE=$(fd -H -t f . ~/.dotfiles | fzf --query "$QUERY")
if [[ "$FILE" != "" ]]; then
$EDITOR "$FILE"
else