Coder Social home page Coder Social logo

Comments (15)

pcottle avatar pcottle commented on April 20, 2024

Hrm I'm not sure of the benefits here -- you'll have to type git add either way (using the UI vs command line mode), and with our better alias support (coming soon) the command mode will be even more powerful.

how would this help your workflow @xatnys ?

from pathpicker.

xatnys avatar xatnys commented on April 20, 2024

Indeed, this is more convenience / desired workflow than an outright improvement. There's a simplicity to splitting the workflow into two steps; something like this:

  • enter command pipeline: foo | bar | fpp
  • select files -> ENTER

So, at least to me, it seems like it'd be more natural to fit in applying commands in the first step rather than after the file selection process. I'm not sure what the alias support specifically entails, but I suppose I'm looking to be able to create some specialized fpp aliases. I can hack around it by abusing $EDITOR so this is certainly not imperative. I'm currently doing this:
function fpp-add { EDITOR='git add' fpp }

from pathpicker.

pcottle avatar pcottle commented on April 20, 2024

Ahh hrmmm, yeah this is fairly legitimate. Let me keep this open for now, I do agree adding a bunch of aliases would be nice.

Also keep in mind that we have FPP_EDITOR bash variable which can be used instead of EDITOR, but a command line arg is even better

from pathpicker.

webglider avatar webglider commented on April 20, 2024

@pcottle having this feature will also greatly help people who want to write scripts which use fpp. An example would be a script which downloads a set of zip files into a folder cds into it and pipes an ls into fpp allowing the user to select some of the zip files after which it would automatically unzip them or do something like that. Now to achieve this kind of functionality fpp has to have the option of passing commands to be executed as parameters (in this case the unzip command)

from pathpicker.

pcottle avatar pcottle commented on April 20, 2024

Ooooh that's a pretty sweet workflow @webglider, never thought about fpp as being a step in some totally different workflow / script.

Alright you guys convinced me, ill add this right after I merge some of this UI testing work

from pathpicker.

lastquestion avatar lastquestion commented on April 20, 2024

I have a PR half in flight on this one if you haven't started yet @pcottle which i was gonna try and finish tonight

from pathpicker.

pcottle avatar pcottle commented on April 20, 2024

Alright go for it @lastquestion ! It might require some rebasing after I land some of the testing infra but we can see what it looks like when yours goes up :D

from pathpicker.

lastquestion avatar lastquestion commented on April 20, 2024

did you decide on a testing infra? prob unittest because it's built into python and wouldn't require a dependecy?

from pathpicker.

pcottle avatar pcottle commented on April 20, 2024

Oh yeah @lastquestion I meant the dependency injection we have to do in order to test the curses UI. Its not really "infra" or a dependency but a fair refactor of the UI code. However I got it working in 7753a73

Basically then ScreenForTest can record the output of the curses commands and produce some actual expected output which we can record and test against. then we can add test cases for things like #92 and test on all versions of python too

unittest was gonna be used regardless

from pathpicker.

lastquestion avatar lastquestion commented on April 20, 2024

oic that's good approach. the mock is nice, also would be super sweet to have a built in logging to stderr or whatever that we can use while dev. I use sys.stderr.write and then remove it when i commit, but a general purpose logger would be useful

from pathpicker.

lastquestion avatar lastquestion commented on April 20, 2024

if we are gonna stick with unittest i'll write some unit tests for the color stuff after the test stuff lands also.

from pathpicker.

pcottle avatar pcottle commented on April 20, 2024

also would be super sweet to have a built in logging to stderr or whatever that we can use while dev. I use sys.stderr.write and then remove it when i commit, but a general purpose logger would be useful

yeah we dont have general purpose logging, but you might also want to look at from output import debug which does a similar thing! thats what i use rather than stderr

from pathpicker.

lastquestion avatar lastquestion commented on April 20, 2024

Fixed in #99

from pathpicker.

pcottle avatar pcottle commented on April 20, 2024

yeah i think this should work! #99 and my followups got the majority of it, but I do think we should prevent command mode if you have a preset command...

from pathpicker.

christylewis1978-36 avatar christylewis1978-36 commented on April 20, 2024

Stay off my account

On Wednesday, May 13, 2015, Lin Xu [email protected] wrote:

oic that's good approach. the mock is nice, also would be super sweet to
have a built in logging to stderr or whatever that we can use while dev. I
use sys.stderr.write and then remove it when i commit, but a general
purpose logger would be useful


Reply to this email directly or view it on GitHub
#72 (comment).

from pathpicker.

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.