Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

[Improvement] Support Multiple Words in $FFF_TRASH_CMD #160

Description

@cmplstofB

Hello.
I want to specify "gio trash" into the trash command variable ($FFF_TRASH_CMD), but shell regards it as a single command.

export FFF_TRASH_CMD='gio trash'

→

$ fff
fff: Running trash
/path/to/fff: line 522: gio trash: command not found

Would you please support multiple words in $FFF_TRASH_CMD so that users can specify commands in more flexible way?

Activity

  1. yellowhat commented on Oct 17, 2020

    @yellowhat

    I have the same problem, I would like to remove files/folders without moving to the trash, like:

    export FFF_TRASH_CMD="rm -rf"
    

    I think that the problem is releated to this line:

    command "$FFF_TRASH_CMD" "${@:1:$#-1}"
    

    The double quotes for $FFF_TRASH_CMD force command to consider it as an entire command, removing should work:

    command $FFF_TRASH_CMD "${@:1:$#-1}"
    

    Not sure if there is a better way.

    Thanks

  2. lcorag commented on Sep 25, 2022

    @lcorag

    @cmplstofB A very simple workaround is to crate an executable script invoking the command you need. For example, to use gio trash (I had the same problem),

    nano fff_giotrash

    the file is simply

    #!/bin/sh
    gio trash $1

    make the script executable chmod +x fff_giotrash and available in your $PATH. Then

    export FFF_TRASH_CMD="fff_giotrash"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions