Commit Graph

35 Commits

Author SHA1 Message Date
Ferran Basora
0ebb9f0a9a Changing grep check for OpenBSD compatibility
The different implementations of `grep` that exist in Linux and OpenBSD
makes the tmux-thumbs script to crash. Changing the command to be
compatible.
2022-04-03 20:47:28 +02:00
Ferran Basora
3033226513
Update tmux-thumbs.sh
Fix an issue with current dir
2022-02-02 23:09:02 +01:00
Ferran Basora
3b210d5631 Add a new flow to detect plugin updates
If you update the plugin with TPM, the `thumbs` binary can get out of
sync. So we need to check the version before proceed.

If there is a version mismatch, then we run a new install in "update"
mode.
2022-02-01 23:20:01 +01:00
Fran Casas
db2a8896c9 feat(install): installation from binary
If cargo exists, use it. Otherwise, if the combination of platform and
architecture has a precompiled binary, then use it.

Thanks @fcsonline for the help 🙇
2022-02-01 22:35:37 +01:00
Javi Merino
19f30d7b22 Fix installation bug in tag 0.7.0
bbf677fda3 ("Improve the matrix of releases") included a fix to cope
with compiled and bundled installations.  However, the check for the
.git/ repository is done from where tmux is launched, not where
tmux-thumbs is installed, so RELEASE_DIR is not properly set always.
This leads to tmux-thumbs always trying to install itself when installed
via tmux-plugin-manager.
2022-02-01 07:56:47 +01:00
Ferran Basora
bbf677fda3 Improve the matrix of releases 2022-01-31 08:02:59 +00:00
Ferran Basora
a32499fadf Improve the installation process
Many people are struggling with the installation process because is not
giving enough feedback.

This commit improves this.
2021-12-27 12:42:49 +01:00
Leoyzen
a8cf7490d1 add missing multi-command configuration of tmux mode 2021-07-20 12:28:37 +02:00
Robert Estelle
92926c73f9 sh: Add strict failure flags 2020-08-04 18:58:50 +02:00
Robert Estelle
eced2d558e sh: Refactor argument construction
This centralizes the global array mutation and maintains the strict
quoting discipline.
2020-08-04 18:58:50 +02:00
Robert Estelle
27b0214408 sh: Factor out option name querying 2020-08-04 18:58:50 +02:00
Robert Estelle
85de58b48e sh: Fix more quoting
This adds quotes where necessary and removes quotes where entirely
redundant (like literals).
2020-08-04 18:58:50 +02:00
Robert Estelle
a0548965f8 sh: Fix meaningless unquoted expansion
[[ ${VALUE} ]] means "expand the VALUE variable, splitting on spaces,
and pass those words as arguments to [[…]]". So if VALUE was the string
'-n blah' then that would expand to '[[ -n blah ]]' which is meaningful
but not at all what was intended.

Instead it appears this intented to check for a non-empty string.
2020-08-04 18:58:50 +02:00
Robert Estelle
16a1ac9cf5 sh: Move CURRENT_DIR to top of script as convention 2020-08-04 18:58:50 +02:00
Robert Estelle
85d151df03 sh: Do not source ~/.bash_profile
This isn't an interactive script. Any relevant environment should
already be inherited from tmux, and sourcing ~/.bash_profile may cause
~/.bashrc to be sourced with unexpected effects.
2020-08-04 18:58:50 +02:00
Ferran Basora
34d8fa03e9 Adapt old osc52 implementation to swapper and rustbox era
OSC52 support was implemented before two major refactors in tmux-thubs:

- Decouple tmux-thumbs from tmux
- Removal of rustbox with termion

I'm not sure if is the right decision, but I moved the arguments to
swapper land because it looks like more tmux related. If it makes sense
for other terminals to support this we can move it back.

The question we need to answer here if it makes sense for standalone `thumbs`:

```
cat sample/test1 | ./target/release/thumbs --osc52
```
2020-05-30 15:45:37 +00:00
Ferran Basora
6bdb92ef23 Don't fail if thux-thumbs is cancelled 2020-01-20 19:49:38 +00:00
Ferran Basora
4262b1c45d Fix scripts 2020-01-19 21:21:07 +01:00
Ferran Basora
8ae9fa9137 Decouple thumbs from tmux 2020-01-19 21:21:07 +01:00
Abin Simon
a1792ea196 add select-bg-color 2019-12-11 18:59:10 +01:00
Jiahao Li
4bf8b04a05 Fixes passing options with spaces in the value
Previously, when setting the `--command` option to `tmux set-buffer {}`, it
will be interpreted by the `tmux-thumbs` binary as 4 separate args:
`--command`, `'tmux`, `set-buffer`, and `{}'`. This commit fixes it such that
the option will be correctly interpreted as a single arg.
2019-11-26 17:48:51 -05:00
James O. D. Hunt
26a6c2a528 view: Add @thumbs-contrast option
Add an option to surround the hint character with square brackets
(for example `[a]` rather than `a`). This is the equivalent to the
following `tmux-fingers` configuration option [1] and is useful to make
the hint more visible:

```
set -g @fingers-compact-hints 0
```

[1] - https://github.com/Morantron/tmux-fingers#fingers-compact-hints

Signed-off-by: James O. D. Hunt <jamesodhunt@gmail.com>
2019-08-02 21:59:34 +01:00
Ferran Basora
7bc0310762 Fix multi regexp 2019-03-28 13:02:15 +00:00
Ferran Basora
14e8fa26e4 Configurable tmux options 2019-03-24 12:34:13 +00:00
Ferran Basora
2ebdcbc005 Relativize release path 2019-03-10 09:47:07 +00:00
Ferran Basora
f94d81bdd2 More doc 2019-03-09 22:40:56 +00:00
Ferran Basora
417b17d89f Fix paths 2019-03-06 17:04:05 +00:00
Ferran Basora
e498ef61bf Fix swaping 2019-03-06 15:13:49 +00:00
Ferran Basora
656c2255ac Use crate binary 2019-03-05 23:41:35 +00:00
Ferran Basora
cd348adc18 Pane swaping working 2019-03-05 23:07:07 +00:00
Ferran Basora
daa1e777fa Pseudo n-ary 2019-02-25 19:16:54 +00:00
Ferran Basora
2bddac3773 Clean up 2019-02-21 15:21:21 +00:00
Ferran Basora
94b489ee94 Implement unique results 2019-02-21 14:45:23 +00:00
Ferran Basora
8eef6bc517 Implement reverse 2019-02-21 14:21:13 +00:00
Ferran Basora
8c738f16b3 First version 2019-02-21 10:20:06 +00:00