Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chafa: Unknown option -f when using lf #65

Open
ogios opened this issue Aug 6, 2023 · 3 comments
Open

chafa: Unknown option -f when using lf #65

ogios opened this issue Aug 6, 2023 · 3 comments

Comments

@ogios
Copy link

ogios commented Aug 6, 2023

met this issue after installed chafa and ctpv in ubuntu:

apt install chafa libmagic-dev
git clone https://github.com/NikitaIvanovV/ctpv
cd ctpv
make
sudo make install

lfrc:

set previewer ctpv
set cleaner ctpvclear
&ctpv -s $id
&ctpvquit $id


# Basic Settings
set hidden true
set ignorecase true
set icons true

# Custom Functions
cmd mkdir ${{
  printf "Directory Name: "
  read ans
  mkdir $ans
}}

cmd mkfile ${{
  printf "File Name: "
  read ans
  nvim $ans
}}


# Archive bindings
cmd unarchive ${{
  case "$f" in
      *.zip) unzip "$f" ;;
      *.tar.gz) tar -xzvf "$f" ;;
      *.tar.bz2) tar -xjvf "$f" ;;
      *.tar) tar -xvf "$f" ;;
      *) echo "Unsupported format" ;;
  esac
}}


# nvim
cmd open_nvim ${{
    nvim
}}
cmd open_nvim_file ${{
    nvim "$f"
}}

# fuzzy finder
cmd fzf_jump ${{
    res="$(find . -maxdepth 1 | fzf --reverse --header='Jump to location')"
    if [ -n "$res" ]; then
        if [ -d "$res" ]; then
            cmd="cd"
        else
            cmd="select"
        fi
        res="$(printf '%s' "$res" | sed 's/\\/\\\\/g;s/"/\\"/g')"
        lf -remote "send $id $cmd \"$res\""
    fi
}}



map <c-f> :fzf_jump
map E :open_nvim
map e :open_nvim_file


# Bindings
map d
map m

map c $vscodium "$f"

map au unarchive
map ae $wine "$f"

# Basic Functions
map . set hidden!
map dd trash
map dr restore_trash
map p paste
map x cut
map y copy
map <enter> open
map <backspace2> :updir
map J :updir; down; open
map K :updir; up; open
map R reload
map mf mkfile
map md mkdir
map bg setwallpaper
map C clear
map S shell

# Movement
map gn cd ~/.config/nvim
map gl cd ~/.config/lf
map gw cd ~/work
map gh cd ~
map ga cd ~/app
map gt cd ~/.local/share/Trash/files

then this happend:
image

i don't know why, is it about the version of chafa? i'm using apt install in ubuntu:

❯ chafa --version
Chafa version 1.2.1

Features: mmx sse4.1 popcnt
Applying: mmx sse4.1 popcnt

Copyright (C) 2018 Hans Petter Jansson et al.
Incl. libnsgif copyright (C) 2004 Richard Wilson, copyright (C) 2008 Sean Fox

This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@ogios
Copy link
Author

ogios commented Aug 6, 2023

it's about the version
ubuntu's apt always seems to have trouble with version updates🤔

@ogios ogios closed this as completed Aug 6, 2023
@NikitaIvanovV NikitaIvanovV reopened this Aug 8, 2023
@NikitaIvanovV
Copy link
Owner

I think I should look into building ctpv with libchafa or something because I have to use some more recent features which are available on odd versions shipped with Ubuntu.

I will look into it and close the issue once it's fixed.

By the way, have you managed to get around this problem?

@ogios
Copy link
Author

ogios commented Aug 8, 2023

By the way, have you managed to get around this problem? l

yes, i download the latest version from chafa's github release, and it works now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants