Code Monkey home page Code Monkey logo

Comments (10)

vikstrous avatar vikstrous commented on May 17, 2024

I think it would be cool to use strace for detecting permission issues. It's still a heuristic, but it might be better.

Example:

> strace cat /etc/shadow 2>&1 | grep EACCES
open("/etc/shadow", O_RDONLY)           = -1 EACCES (Permission denied)

from thefuck.

tuxayo avatar tuxayo commented on May 17, 2024

Good idea.
Can someone try with apt? With pacman it can't see EACCES with strace.

from thefuck.

vikstrous avatar vikstrous commented on May 17, 2024

Yeah, I looked through the pacman strace and there's really nothing useful there. I wonder how it knows that you are not root. In any case, another possibility is to check that the command starts with pacman and returns 1.

from thefuck.

nvbn avatar nvbn commented on May 17, 2024

Is it repeats with 1.11+?

from thefuck.

AmarOk1412 avatar AmarOk1412 commented on May 17, 2024

To complete this issue. I suggest to translate the "fuck" alias. Indeed, for example, in french, "putain" can be a better alias.
Can we translate the "fuck" alias in other languages?

from thefuck.

qrqiuren avatar qrqiuren commented on May 17, 2024

Currently thefuck actually supports other languages. Because it is executed in environment with LANG=C, that means it only has to detect English strings in multilingual environment.

@AmarOk1412 It's quite simple, just add your own alias to your shell's configuration (e. g. ~/.bashrc):
alias putain='fuck'
I have used tmd (stands for tā mā de in Chinese) as an alias to fuck, it works well.

from thefuck.

AmarOk1412 avatar AmarOk1412 commented on May 17, 2024

@Dugucloud. Yeap I know. I was just thinking about an automatic alias based on the computer language :). But it's not a very good idea.

from thefuck.

nvbn avatar nvbn commented on May 17, 2024

@AmarOk1412 anyone can use use whatever they want for an alias.

from thefuck.

tuxayo avatar tuxayo commented on May 17, 2024

Is it repeats with 1.11+?

@nvbn What does this means? I didn't understood.

Because it is executed in environment with LANG=C

@Dugucloud Where did you found that? I have to change manually my locale back to english to make thefuck work

from thefuck.

nvbn avatar nvbn commented on May 17, 2024

@tuxayo I mean that you need to upgrade thefuck:

sudo pip install thefuck --upgrade

from thefuck.

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.