Commit graph

53 commits

Author SHA1 Message Date
Robin Candau bf5e8d22ef
Update README.md (#73)
Added the AUR packages installation info
2022-09-15 13:47:45 +02:00
Aurélien Rainone 619f2a5ad3
goreleaser: add license+readme to archives (#72)
Fixes #71
2022-09-15 11:36:58 +02:00
Aurélien Rainone 070552e334
Update README.md 2022-09-04 20:37:25 +02:00
A2n 055e87f5eb
Update README.md (#70)
* Update README.md

Updated the README with clearer information: 

- an information about the refresh time -- I almost created a bug, because I'm a beginner on tmux and I didn't know this variable; so I think that an informative line about this can be useful
- a modification of an example that I didn't find necessarily clear because it didn't use the same context as the example given in the "Getting started" section

* Update README.md

Improve the line about status-interval
2022-09-04 19:48:02 +02:00
Julian Torres 9f9de9bb38
Update README for installing with Go (#68)
* Update README for installing with Go

On Go 1.17, `go get -u` as a method os installation locally was deprecated, and on 1.18 it completely fails to run. Switching to `go install github.com/arl/gitmux@latest` works as expected on 1.16+
2022-06-09 22:18:01 +02:00
Aurélien Rainone d79bab3906
Decouple stash entries from clean flag (#67)
Since now the clean flag is indepdendent from the number of
stashed entries, we need to show the stash count, even if the
working tree is clean.

Fix #66
2022-03-18 20:06:53 +01:00
Aurélien Rainone 22e1642285
Code gardening (#65)
* Use flag.Duration instead roll-your-own duration

* Remove deprecated cli flags (-q and --fmt)

* parseOptions returns context cancellation function

* In config_test.go do not import embed package anymore

* Cosmetics

* Cosmetics
2022-03-11 12:46:38 +01:00
Aurélien Rainone 6031fc2b0d
Improve testing (#64)
* Update gitstatus to v0.5.1

Fixes #63

* Use testscript for end-to-end test of gitmux output
2022-03-11 12:39:22 +01:00
Aurélien Rainone cd50b54ade
go.mod: upgrade to gitstatus@v0.4.4 (#62)
Closes #61
2022-02-21 22:22:31 +01:00
Aurélien Rainone 7986e6b6d2
Update README.md 2022-01-23 17:40:04 +01:00
Aurélien Rainone e614142f54
Issue 58/trim branch name right or left (#59)
* Bump gopkg.in/yaml v2 -> v3

* Add branch_trim_direction (default to right)

* tmux: remove Formater.remote()

Formater.remote() is just remoteBranch() followed by divergence()

* tmux: implement and test branch_trim_direction (left|right)

* tmux: s/BranchTrimDirection/BranchTrim

* README.md: update and add branch_trim

* tmux: remove dependency to testify

* tmux: use io.Discard in test
2022-01-23 17:36:31 +01:00
Aurélien Rainone 98d8874553
format: remove empty package (#57) 2021-10-15 12:20:20 +02:00
Aurélien Rainone f0f9c7aa15 Update README.md: fix typo 2021-09-25 16:27:25 +02:00
Aurélien Rainone c43cc4ce04
Issue 53/divergence style (#54)
Print Divergence style before behind/ahead count

Fixes #53
2021-09-25 07:15:11 -07:00
Aurélien Rainone 9102751c0b
CI: replace travis with GitHub actions (#56)
Fixes #55

* .travis: run tests with go1.17.x

* go.{mod,sum}: bump dependencies

* .gitignore: add dist/

* ci: run test on github-action

* ci: goreleaser runs on github action
2021-09-25 16:07:49 +02:00
Aurélien Rainone 8703c0d545
Update README.md
Add link to solution solution without pane_current_path. 
Fixes #19
2021-08-07 11:49:39 +02:00
Blaok 3e537ea740
Update README.md (#46) 2020-09-21 07:31:36 +02:00
Blaok 1d5e54efa4
Make clear style configurable (#45) 2020-09-21 00:07:33 +02:00
Aurélien Rainone 3983d85658
Issue 37/second try (#42)
* Bump gitstatus to v0.4.3 (NewWithContext)

* Pass -timeout as ctx to gitstatus.NewWithContext
2020-09-02 15:25:59 +02:00
Aurélien Rainone 67343b2978 gh: add pull request template 2020-09-02 03:12:20 +02:00
Aurélien Rainone 4add6c410e gh: improve issue templates 2020-09-02 03:04:57 +02:00
Aurélien Rainone 9d5e668002
Update issue templates (#40) 2020-09-02 02:56:48 +02:00
Aurélien Rainone 15e791b5fb
Fix use of clear (#39)
* format/tmux: fix usage of tmux #fg=default string

Tmux format string `#fg=default` clears the foreground and is used
before applying styles to the elements of the gitmux format string.

Now, we only call `clear()` before an element that is actually being
printed.
Also we call `clear()` before printing non-keywords strings appearing in
`Config.Layout`.

Fix tests

* Update non-regression golden file
2020-09-02 02:47:02 +02:00
Aurélien Rainone 06654727b5
Issue 32/branch format (#38)
* format/tmux: add failing test for issue 32

As exposed in the added failing test, reproducing the issue 32, the
branch style only affect the branch symbol whereas it should affect both
affect the symbol and the branch name.

* format/tmux: branch style now affects both branch symbol+name

Fixes #32

* Fix tests and adapt for new behavior
2020-09-02 02:37:38 +02:00
Aurélien Rainone 845f4165fe
Add -timeout option (#37)
`-timeout DUR` simply exist `gitmux` is it still running after DUR
amount of time.
DUR is parsed as a time.Duration with the special exception that 0
means no timeout.
Defaults to 0 = _no timeout_

Closes #35
2020-09-01 23:13:42 +02:00
Aurélien Rainone 247481f189
Linting (#36)
* lint: cosmetics

* lint: rename global variables

* gofmt

* lint: unchecked error

* lint: errcheck

* lint: cosmetics

* Specialize 'run' function to run 'git'
2020-09-01 23:01:30 +02:00
Aurélien Rainone 59b3b290a9
Update README.md 2020-08-12 17:53:23 +02:00
Aurélien Rainone d20527afab
Remove darwin/386 and all 32-bit arm platforms (#34)
* goreleaser: remove darwin/386 support

* travis: build on go 1.15.x

* goreleaser: remove arm support (32-bit)
2020-08-12 17:44:27 +02:00
cdelledonne 75a5b9e615
Add option to truncate long branch names (#31)
* Add option to truncate long branch names

* Update unit tests
2020-07-28 07:48:12 +02:00
Aurélien Rainone d06ff11990 Update README 2020-06-09 19:11:25 +02:00
Aurélien Rainone e2693a76b3
Update README.md 2020-06-07 20:46:34 +02:00
Aurélien Rainone c0b7b03325
Breakdown remote component (#27)
* Cosmetics

* Add TestOutputNonRegression

This test ensures that new features do not change gitmux output
when used with a default configuration.
It loads a golden file ('testdata/default.output.golden') and
compares it with the actual output. -update updates the golden
file.

* format/tmux: breakdown `remote` into `remote-flags`+`divergence`

Currently the `remote` flags gets replaced by both the name of the
remote (e.g `origin`) and the divergence flags indicating whether the
local and the remote branch diverges and how much (e.g `↓·2↑·3`).

In order to allow user to skip the remote branch and to keep the
divergence flags, or the other way around, we add the `remote-branch` and
the `divergence` layout elements.

Also, to not break user configurations, we keep the 'remote' layout
element, and make it so that it's equivalent to setting `remote-flags`
and `divergence` consecutively.

Fixes #23

* format/tmux: replace `remote` with `branch+divergence` in default config

* Update README.md: improve the customizing section

Improve the Customizing section of the README
2020-06-07 20:07:02 +02:00
Aurélien Rainone 5ef17f15a7
format/tmux: add missing spaces after symbols (#25)
The 'staged' and 'untracked' symbols are both missing a trailing
space in the default configuration. With some fixed fonts (for
instance the stock Ubuntu font) this makes difficult to discern
between the symbol and the number following it.

Fixes #24
2020-06-07 12:58:05 +02:00
Aurélien Rainone 22666069c0 goreleaser: drop freebsd releases 2020-04-21 09:04:42 +02:00
Salar Khan 9846b104da
allow flexible display for output format of git status (#21)
* changes from casonadams:
- added options in cfg file to show or hide remote information
- Consider possibility to choose/reorder/remove the info shown #14 fix
- updated test cases to accomidate changes to code base
- better docs, added second delm option, more flexible formatting
- fixed tests to run on travis CI
- fixed tests to run on travis CI
- adding README info for cfg options in dynamic layout output
- making display output not break if missing, plus making spacing strings more flexible
- adding usage in READ around display features
- fixed typo in README

* changes from salarkhan
- match string exactly, remove regexp
- don't call git, create a synthetic status to compare against
- use "Symbol-Thing" instead of the actual symbols, in case they change
- note that divergence is coupled to remote. maybe these should be split
- add empty test case
- no need to have a test for every single permutation, one example should suffice

* display -> layout

Co-authored-by: Cason Adams <casonadams@gmail.com>
2020-04-13 08:04:30 +02:00
Aurélien Rainone a2244005d4
Update README with "#{pane_current_path}" (#18)
Fixes #17
2020-02-12 22:44:24 +01:00
Aurélien Rainone 57f0f80cf0
Fix error check function (#15)
When current directory was not a Git working tree, git command
were failing, as expected. But a recent commit made a change in
the error check function, and the program was not exit anymore in
the event of an error. Instead it was continuing with a bogus
gitstatus varriable, leading to panics. Unless running in -dbg
mode, those panic had no effect whatsoever and gitmux was usable
as before. It's just that the program was silently crashing
instead of silently terminating.
2020-01-06 19:09:25 +01:00
Aurélien Rainone d826bfc431
Update README.md (#13)
* .github: add ISSUE_TEMPLATE.md

* Update README.md

Fixes #3

* Improve README
2020-01-06 18:51:00 +01:00
Aurélien Rainone 590623c50c
Update README.md 2019-12-25 16:05:07 +01:00
Aurélien Rainone d9fc3d3d9e
Sensible defaults (#11)
* Change default options to more sensible ones

Remove `-quiet` and `-fmt` option, replace them with `-dbg` since they
were only meant to be used if something went wrong.

* In debug mod, prints errors on stderr

* cosmetics

* Keep -q -fmt deprecated/unused options

* Improve README.md
2019-12-24 01:05:17 +01:00
Aurélien Rainone e407770624 update go.sum 2019-12-17 10:56:22 +01:00
Aurélien Rainone d424275b8e Update README 2019-12-17 10:44:19 +01:00
Aurélien Rainone 5282f487a0
Issue 9/add git no optional lock (#10)
* Update README.md

s/GiTmux/Gitmux

* Bump gitstatus

By bumping gitstatus to v0.4.2 we're now calling git with
GIT_OPTIONAL_LOCKS set to 0, ensuring gitstatus does not lock the
working tree for its operations, effectively giving higher
priority to user-initiated operations. This is useful when gitmux
is run in the background.

Fixes #9
2019-12-17 10:12:45 +01:00
Aurélien Rainone 704dbffbd7 ci: cache downloaded go modules 2019-11-07 10:08:59 +01:00
Aurélien Rainone 9fbf088b0a README: fix badges 2019-11-07 10:06:18 +01:00
Aurélien Rainone 97c13d81ff releases: place only the binary in the archives
archives were created with LICENSE and README.md alongside the gitmux
binary, requiring an extra step for installation in the user's `$PATH`
2019-11-07 10:03:30 +01:00
Aurélien Rainone 8086075405 releases: build on 386 arch 2019-11-07 10:03:15 +01:00
Aurélien Rainone da3b350ef9 releases: remove -next version suffix
Fixes #5
2019-11-07 10:02:40 +01:00
Aurélien Rainone 6f1a6ec93f Update to gitstatus@v0.4.1 (#4)
* Moves functions to main.go

* format: add and use package

* ci: use latest Go minor
2019-11-06 23:13:46 +01:00
Aurélien Rainone ffafab15e2 Update README.md 2019-11-06 23:13:46 +01:00