Skip to content

Instantly share code, notes, and snippets.

@franklincm
Last active October 30, 2023 00:58
Show Gist options
  • Select an option

  • Save franklincm/73be4fc4480af60df64be04bd35e131f to your computer and use it in GitHub Desktop.

Select an option

Save franklincm/73be4fc4480af60df64be04bd35e131f to your computer and use it in GitHub Desktop.

Revisions

  1. Chase Franklin revised this gist Oct 30, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lfrc
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    cmd fzfdirs ${{
    FZF_DEFAULT_OPTS="--preview 'bat --style=numbers --color=always {}' --height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_CTRL_T_OPTS-}"
    D=`find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune -o -type f -print -o -type d -print -o -type l -print 2> /dev/null | cut -b3- | fzf -m`
    D=`find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune -o -type d -print -o -type l -print 2> /dev/null | cut -b3- | fzf -m`
    if [[ $D == '' ]]; then
    lf -remote "send $id echo fzf aborted."
    else
  2. Chase Franklin renamed this gist Oct 30, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. Chase Franklin created this gist Oct 30, 2023.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    cmd fzfdirs ${{
    FZF_DEFAULT_OPTS="--preview 'bat --style=numbers --color=always {}' --height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_CTRL_T_OPTS-}"
    D=`find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune -o -type f -print -o -type d -print -o -type l -print 2> /dev/null | cut -b3- | fzf -m`
    if [[ $D == '' ]]; then
    lf -remote "send $id echo fzf aborted."
    else
    lf -remote "send $id cd $D"
    fi
    }}

    map <c-t> fzfdirs