Coder Social home page Coder Social logo

Comments (10)

mipmip avatar mipmip commented on May 23, 2024 2

Yes, it works! Thanks! Finally a fast dependency-free tmux-session-manager.

from smug.

ivaaaan avatar ivaaaan commented on May 23, 2024

v0.1.2 is released now and this should be fixed. feel free to reopen or create another issue if you have any problems πŸ™‚

from smug.

mipmip avatar mipmip commented on May 23, 2024

Tried it again, but still the same message. Also tried it with --attach.

➜  ~ smug start poppygo --attach
Starting a new session...
sessions should be nested with care, unset $TMUX to force

from smug.

ivaaaan avatar ivaaaan commented on May 23, 2024

Please make sure you have the latest version. The best way is to delete an old one & reinstall

from smug.

ivaaaan avatar ivaaaan commented on May 23, 2024

If it doesn't help, try to run with --debug option and then paste content from the ~/.config/smug/smug.log

from smug.

mipmip avatar mipmip commented on May 23, 2024

Sorry, did not look right. It now creates the session correctly. It complains when the command tmux attach -d -t poppygo: is executed. Could it be possible to run tmux switch -t poppygo when the environment var TMUX is set?

from smug.

ivaaaan avatar ivaaaan commented on May 23, 2024

from smug.

ivaaaan avatar ivaaaan commented on May 23, 2024

@mipmip can you please upgrade to the latest version and send the output of those commands:
$ smug --help

When inside tmux session:
$ echo $TERM

And also the OS you're using.

from smug.

mipmip avatar mipmip commented on May 23, 2024

I'm using void-linux on x86_64.

➜  ~ echo $TERM
xterm-256color

➜  ~ smug --help
Smug - tmux session manager. Version v0.1.4

Usage:
        smug <command> <project> [-w <window>]... [--attach] [--debug]

Options:
        -w List of windows to start. If session exists, those windows will be attached to current session.

Examples:
        $ smug start blog
        $ smug start blog:win1
        $ smug start blog -w win1
        $ smug start blog:win1,win2
        $ smug stop blog

The previous version worked better for me. The last command in the debug-log kills the just created session.

➜  ~ smug start poppygo --debug --attach
Starting a new session...
sessions should be nested with care, unset $TMUX to force
Oops, an error occurred! Rolling back...
Cannot run "tmux attach -d -t poppygo:". Error exit status 1

➜  ~ cat  ~/.config/smug/smug.log


tmux has-session -t poppygo:
exit status 1
tmux new -Pd -s poppygo -n poppygo -c /home/pim/cPoppyGo/poppygo-eletron-app
tmux send-keys -t poppygo:poppygo vim ./ Enter
tmux select-layout -t poppygo:poppygo main-horizontal
tmux attach -d -t poppygo:
exit status 1
tmux kill-session -t poppygo

from smug.

ivaaaan avatar ivaaaan commented on May 23, 2024

@mipmip thanks, I've updated the code to use the TMUX variable as well, to detect the tmux session. Please, upgrade to v0.1.5 and let me know if that works for you.

_, tmux := os.LookupEnv("TMUX")
insideTmuxSession := os.Getenv("TERM") == "screen" || tmux

from smug.

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.