This commit is contained in:
me 2024-01-09 21:25:17 +01:00
parent f92528b265
commit 5cc7a297f9

3
hgh.py
View file

@ -130,7 +130,8 @@ def find_anything(search):
def find_anything_fuzzy(search):
os.chdir(config["sites"][args.site_name]["contentdir"])
os.system("/usr/bin/rg -i --column --line-number --no-heading \'{search}\' content | fzf --bind 'f4:execute({editor} {{1}})' {bind_explorer} {preview} {preview_window} --with-nth=1.. -e --delimiter=':'".format(search=search, editor=config["settings"]["bin_editor"], preview="--preview 'batcat --style=full --color=always --line-range :500 {1}'", preview_window="--preview-window=top:50%:wrap", bind_explorer="--bind \'f3:execute(xdg-open \"$(dirname {})\")\'"))
print(config["sites"][args.site_name]["contentdir"])
os.system("/usr/bin/rg -i --column --line-number --no-heading \'{search}\' . | fzf --bind 'f4:execute({editor} {{1}})' {bind_explorer} {preview} {preview_window} --with-nth=1.. -e --delimiter=':'".format(search=search, editor=config["settings"]["bin_editor"], preview="--preview 'batcat --style=full --color=always --line-range :500 {1}'", preview_window="--preview-window=top:50%:wrap", bind_explorer="--bind \'f3:execute(xdg-open \"$(dirname {})\")\'"))
def site_upload():
remote_user = config["sites"][args.site_name]["remote_user"]