Giter Site home page Giter Site logo

Comments (5)

urbainvaes avatar urbainvaes commented on June 9, 2024 1

Hi!

Thanks for the suggestion. I agree, it'd be nice to provide more detailed instructions about the installation in bash. I'll add them to the README this weekend.

from fzf-marks.

juanMarinero avatar juanMarinero commented on June 9, 2024

source $PWD/fzf-marks.plugin.bash at end of ~/.bashrc should be not unwarned recommended.

Please change current README.md

# Add a line to ~/.bashrc to load the plugin whenever bash starts in interactive mode
echo "source $PWD/fzf-marks/fzf-marks.plugin.bash" >> ~/.bashrc

to something like:

# Add next line to ~/.bashrc before loading any not default/builtin aliases/functions
# or if sure no conflicts (like not aliased 'head') just run:
echo "source $PWD/fzf-marks/fzf-marks.plugin.bash" >> ~/.bashrc

Maybe is bad practice from me to rename default functions, like:
alias head='batcat --line-range :10'

Or maybe the whole repo should change every head to /usr/bin/head (result of which head in Ubuntu); same for tail, etc. I doubt that's easy to make it work for several OS and shells, so, I think that at least a warning in the most used shell by beginners (bash) would be nice. Thanks!

from fzf-marks.

akinomyoga avatar akinomyoga commented on June 9, 2024

Maybe is bad practice from me to rename default functions, like:

alias head='batcat --line-range :10'

Yeah, I think it's a bad practice to replace the standard utility with a less functional one that doesn't satisfy the POSIX standard...

Or maybe the whole repo should change every head to /usr/bin/head

We usually simply use \head, \tail, etc. to suppress alias expansions. But, in this way, head cannot be replaced by aliases even when a user wants to intentionally replace head.

# Add a line to ~/.bashrc to load the plugin whenever bash starts in interactive mode
echo "source $PWD/fzf-marks/fzf-marks.plugin.bash" >> ~/.bashrc

We may update the comment as you have suggested, but I want to point out that this kind of instruction is quite common for shell plugins. I feel it is easier to expect that the users writing unusual aliases become more careful than to expect that all the shell plugins have such common guidance.

from fzf-marks.

urbainvaes avatar urbainvaes commented on June 9, 2024

Many thanks for your suggestion, @juanMarinero.

We may update the comment as you have suggested, but I want to point out that this kind of instruction is quite common for shell plugins. I feel it is easier to expect that the users writing unusual aliases become more careful than to expect that all the shell plugins have such common guidance.

I agree with @akinomyoga here; the warning you propose applies to many shell plugins besides this one, and I am not sure that repeating the warning in the documentation of every plugin concerned is worth it.

from fzf-marks.

juanMarinero avatar juanMarinero commented on June 9, 2024

I will do that from now,

[NOT] replace the standard utility [alias/functions]

I am very thankful for your detailed answers @akinomyoga and @urbainvaes! I learnt something important :)

But since you are not willing to modify the README file, I hope other newbies can find current issue-comments if they catch same problem.

from fzf-marks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.