edit-config allow calling without params
This commit is contained in:
@ -15,7 +15,13 @@ pkgs.writeShellApplication {
|
|||||||
runtimeInputs = with pkgs; [ fd fzf ];
|
runtimeInputs = with pkgs; [ fd fzf ];
|
||||||
|
|
||||||
text = ''
|
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
|
if [[ "$FILE" != "" ]]; then
|
||||||
$EDITOR "$FILE"
|
$EDITOR "$FILE"
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user