Commit Graph

27 Commits

Author SHA1 Message Date
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