omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    StaSh for Pythonista 2 and 3

    Pythonista
    13
    61
    50854
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ccc
      ccc last edited by

      See https://forum.omz-software.com/topic/2515/using-git-inside-stash

      1 Reply Last reply Reply Quote 1
      • ywangd
        ywangd last edited by

        @e-warashina I am glad that you find StaSh useful.

        @JonB is the author of the git tool. I am sure he will be able to share more information on this issue. But here is my take on it:

        • git init requires a path parameter. For an example, if you need initialise the current working directory, you need to run git init .

        • The directory is now initialised. If you type ls -a , you'll be able to see a new .git folder created.

        • Now if you type git status, an error will be generated reporting 'HEAD' is not found. This is expected as there is currently no commit in the repo. I do think the error message can be formatted in a more user-friendly way (a possible future improvement).

        • You can now add a file to the repo via git add SOME_FILE and them commit by git commit.

        • Now if you run git status again, it will correctly show the status.

        Hope this helps.

        e.warashina 1 Reply Last reply Reply Quote 1
        • e.warashina
          e.warashina @ywangd last edited by

          @ccc,
          @ywangd Thank you for your advice.

          It works very well.
          So, I missed any git init's path parameter as you noticed!

          After run git init ., everything went like clockwork.

          I love this tool so much. And, I'm very impressed your support.
          I say thank you again.

          1 Reply Last reply Reply Quote 0
          • ihf
            ihf last edited by ihf

            Ran the one liner, restarted Pythonista, ran launch_stash.py. Pythonista crashes (returns to home screen) after 1 sec. Then I tried deleting stash and trying again. It gets as far as "Preparing the folder structure..."

            ywangd 1 Reply Last reply Reply Quote 0
            • ywangd
              ywangd @ihf last edited by

              @ihf said:

              Ran the one liner, restarted Pythonista, ran launch_stash.py. Pythonista crashes (returns to home screen) after 1 sec. Then I tried deleting stash and trying again. It gets as far as "Preparing the folder structure..."

              What is your device and iOS version? Is it jailbroken? It worked for me on three different devices:

              • iPhone 6+ with iOS 9.2
              • iPad Air 2 with iOS 9.2
              • iPad mini 1 with iOS 9.1 (32-bit)

              I don't quite get why it stuck at the installation script as it performs only pure and simple Python calls.

              1 Reply Last reply Reply Quote 0
              • ihf
                ihf last edited by

                @ywangd Ipad3, JB, IOS 8.1.2. I don't understand either, I'm just reporting what I see.

                1 Reply Last reply Reply Quote 0
                • ihf
                  ihf last edited by

                  @ywangd ran the one liner again and it ended this time with Installation completed but when I run launch_stash it still crashes immediately.

                  1 Reply Last reply Reply Quote 0
                  • ywangd
                    ywangd last edited by

                    @ihf said:

                    @ywangd Ipad3, JB, IOS 8.1.2. I don't understand either, I'm just reporting what I see.

                    Thanks for the report. It is very likely that the crash is related to JB. Since I don't have a Jailbroken device, I cannot do any further tests. Anyway, I guess with a JB device, you can leverage the real BSD shell and a pretending shell like stash is of little use.

                    1 Reply Last reply Reply Quote 0
                    • ywangd
                      ywangd last edited by

                      @ihf Here are two possible alternatives:

                      • Continue to use v0.4.x
                      • I plan to make the usage of attributed texts optional (i.e. no font color and style). Maybe this would help JB devices.
                      ihf 1 Reply Last reply Reply Quote 0
                      • JonB
                        JonB last edited by

                        I am using stash on ipad3 ios 8.4.1. I seem to remember a few issues with objc that were fixed with later ios versions, but i forget which.

                        I will say that we have found an issue related to cursor setting using the new attributed text functions on 32 bit devices. This could be related.

                        1 Reply Last reply Reply Quote 0
                        • ihf
                          ihf @ywangd last edited by

                          @ywangd Please let me know if/when there is a version (other than v0.4.x) that I might try. Once one uses Stash with Pythonista it is hard to go back :-)

                          ywangd 1 Reply Last reply Reply Quote 0
                          • JonB
                            JonB last edited by

                            the ios8crash branch seems to solve the specific problems i was having. modify getstash.py to list the ios8crash instead of master, then restart pythonista.

                            1 Reply Last reply Reply Quote 0
                            • ywangd
                              ywangd @ihf last edited by

                              @ihf said:

                              @ywangd Please let me know if/when there is a version (other than v0.4.x) that I might try. Once one uses Stash with Pythonista it is hard to go back :-)

                              @JonB and I worked out two solutions for an iOS8 related crash issue.

                              You can get them with following one-liner installers.

                              1. ios8crash
                              import urllib2; exec urllib2.urlopen('http://bit.ly/get-stash').read() in {'_br': 'ios8crash'}
                              
                              1. iso8crash2
                              import urllib2; exec urllib2.urlopen('http://bit.ly/get-stash').read() in {'_br': 'ios8crash2'}
                              

                              Please let me know how they work for you. Thanks!

                              1 Reply Last reply Reply Quote 0
                              • ihf
                                ihf last edited by

                                @ywangd I only tried the first solution and it worked!. Thank you very much!

                                1 Reply Last reply Reply Quote 0
                                • ihf
                                  ihf last edited by

                                  @ywangd Will I be able to use selfupdate in the future or will I then lose the ios8 fix?

                                  1 Reply Last reply Reply Quote 0
                                  • dgelessus
                                    dgelessus last edited by

                                    @ihf If nothing has changed you should be able to do something like SELFUPDATE_BRANCH=ios8fix selfupdate (this is a single command in one line) to update from a branch that isn't master.

                                    ywangd 1 Reply Last reply Reply Quote 0
                                    • ywangd
                                      ywangd @dgelessus last edited by

                                      @dgelessus I just noticed that the leading environmental variable NO longer works for the new selfupdate.py. It used to work with selfupdate.sh. I'll need to fix it later.

                                      As an alternative, you can still update to a specific branch by just typing selfupdate.py BRANCH

                                      @ihf Great the first fix worked for you. Could you please also give the 2nd fix a try? I currently prefer the 2nd fix as it is much simpler. The fix will stay in the main branch once it is finalised. This means you can simply selfupdate to get any future updates.

                                      1 Reply Last reply Reply Quote 0
                                      • ihf
                                        ihf last edited by

                                        @ywangd Unfortunately, ios8crash2 does not fix the problem (it crashes as before). Ios8crash works fine.

                                        1 Reply Last reply Reply Quote 0
                                        • ywangd
                                          ywangd last edited by

                                          @ihf The fix is now merged into the master branch along with some other improvements. You can get the update by running selfupdate. Thanks!

                                          disorientedp 1 Reply Last reply Reply Quote 0
                                          • disorientedp
                                            disorientedp @ywangd last edited by

                                            @ywangd On the latest version of StaSh, I get an error message that makes it unusable:

                                            Traceback (most recent call last):
                                              File "/private/var/mobile/Containers/Shared/AppGroup/9BC2C58D-632D-4A13-9539-7CC3C7AA159A/Documents/launch_stash.py", line 36, in <module>
                                                reload(stash)
                                              File "/private/var/mobile/Containers/Shared/AppGroup/9BC2C58D-632D-4A13-9539-7CC3C7AA159A/Documents/site-packages/stash/stash.py", line 34, in <module>
                                                from system.shcommon import IN_PYTHONISTA, ON_IPAD
                                            ImportError: cannot import name IN_PYTHONISTA
                                            
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB Forums | Contributors