Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmux-logging/scripts/start_logging.sh in bashrc not working #31

Open
bedge opened this issue Dec 29, 2018 · 3 comments · May be fixed by #39
Open

tmux-logging/scripts/start_logging.sh in bashrc not working #31

bedge opened this issue Dec 29, 2018 · 3 comments · May be fixed by #39

Comments

@bedge
Copy link

bedge commented Dec 29, 2018

#28
has some shortcomings. (Unless I'm just being stupid, which is entirely possible)

  • Doesn't observe .tmux/conf settings, eg:
# https://github.com/tmux-plugins/tmux-logging/pull/20
set -g @logging-path "$HOME/log/tmux/%Y-%m-%d"
set -g @logging-filename "#{session_name}-#{window_name}-#{pane_index}.log"

  • requires $log_file already be set elsewhere, negating the logic already provided by the above config settings.

Given the key bindings:

bind-key -T prefix P run-shell /Users/bedge/.tmux/plugins/tmux-logging/scripts/toggle_logging.sh

I would expect being able to run:
~/.tmux/plugins/tmux-logging/scripts/start_logging.sh

to enable logging to the file cfg'd above, but it doesn't.

With that in my bashrc, logging is not enabled, at least not to the file I have configured. (see above)
However when I run
/Users/bedge/.tmux/plugins/tmux-logging/scripts/toggle_logging.sh
I get a "...logging ended" message, implying some component did think it was logging.

Running it again DOES start logging to the right place. WTF am I doing wrong?

This also pops out periodically:

❯ ~/.tmux/plugins/tmux-logging/scripts/toggle_logging.sh
/Users/bedge/.tmux/plugins/tmux-logging/scripts/shared.sh: line 5: [: not: binary operator expected

Great plugin, despite my whining BTW.

@bruno- bruno- pinned this issue Jan 7, 2019
@bruno- bruno- unpinned this issue Jan 7, 2019
@bruno-
Copy link
Member

bruno- commented Jan 7, 2019

Hi,

It seems PR #13 had a fix for the error you were getting. That one is now merged so maybe try again?

@bedge
Copy link
Author

bedge commented May 25, 2019

Problem still exists.
ie: run -
~/.tmux/plugins/tmux-logging/scripts/start_logging.sh

from a shell prompt, and logging is not started.

Note that:
~/.tmux/plugins/tmux-logging/scripts/toggle_logging.sh

Does work to toggle logging, but the start_logging.sh does not work from a shell.

I want to be able to trigger logging on from a script, regardless of whether it's already on or not.

❯ tmux -V
tmux 2.9a

Just updated to current plugins as well (using tpm).

@bedge
Copy link
Author

bedge commented May 25, 2019

Submitted pull request to address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants