Commit Graph

34 Commits

Author SHA1 Message Date
Charlie Vieth 3c877c504b
Enable profiling options when 'pprof' tag is set (#2813)
This commit enables cpu, mem, block, and mutex profling of the FZF
executable. To support flushing the profiles at program exit it adds
util.AtExit to register "at exit" functions and mandates that util.Exit
is used instead of os.Exit to stop the program.

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-04-13 14:58:11 +09:00
Junegunn Choi 9ffe951f6d
Update Makefile target dependencies
Because shell integration scripts are now embedded in the binary
2024-03-17 16:11:21 +09:00
Junegunn Choi 66546208b2
Update goreleaser flags 2024-01-20 14:36:52 +09:00
Junegunn Choi 1707b8cdba
Add 'transform' action to conditionally perform a series of actions
'transform' action runs an external command that prints a series of
actions to perform.

  # Disallow selecting an empty line
  echo -e "1. Hello\n2. Goodbye\n\n3. Exit" |
    fzf --reverse --header 'Select one' \
        --bind 'enter:transform:[[ -n {} ]] && echo accept || echo "change-header:Invalid selection"'

  # Move cursor past the empty line
  echo -e "1. Hello\n2. Goodbye\n\n3. Exit" |
    fzf --reverse --header 'Select one' \
        --bind 'enter:transform:[[ -n {} ]] && echo accept || echo "change-header:Invalid selection"' \
        --bind 'focus:transform:[[ -n {} ]] && exit; [[ {fzf:action} =~ up$ ]] && echo up || echo down'

Close #3368
Close #2980
2023-12-26 00:14:05 +09:00
Junegunn Choi 7320b7df62
0.44.0 2023-11-12 22:08:08 +09:00
Sam James eb4bbf3294
Makefile: build 32-bit binary on armv8l (#3434)
armv8l is always 32-bit and should implement the armv7 ISA, so
just use the same filename as for armv7.

This avoids wrongly building a 64-bit binary because of an incorrect assumption
of what 'armv8l' is (a 32-bit system).

Obviously, we should not then build a 64-bit (arm64) binary. Especially
given armv8l is often used in arm32-on-arm64 chroots to build stuff for
weaker-powered arm32 devices.

Signed-off-by: Sam James <sam@gentoo.org>
2023-09-11 19:32:45 +09:00
Junegunn Choi e2dd2a133e
Skip post hooks on 'make build'
https://github.com/goreleaser/goreleaser/issues/1469
2023-05-21 18:00:17 +09:00
Junegunn Choi 20230402d0
0.39.0 2023-04-02 23:33:37 +09:00
Julian Ruess 414f87981f Add support for s390x architecture
Signed-off-by: Julian Ruess <julianr@linux.ibm.com>
2023-02-22 14:31:41 +09:00
Junegunn Choi 22cbd9fa58
Implement height range (--height ~[VALUE][%])
Close #2953
2022-09-28 23:22:31 +09:00
znley 885cd8ff04
[make] Add loongarch64 support (#2857) 2022-06-28 09:16:26 +09:00
Junegunn Choi e4c3ecc57e
0.28.0 2021-11-04 01:05:07 +09:00
Xeonacid 5fc78e4584
Add riscv64 build target (#2626)
Build successfully on Arch Linux RISC-V.
2021-10-10 21:33:06 +09:00
Charlie Vieth 5a874ae241
Speed up ANSI code processing (#2368)
This commit speeds up the parsing/processing of ANSI escape codes by
roughly 7.5x. The speedup is mostly accomplished by replacing the regex
with dedicated parsing logic (nextAnsiEscapeSequence()) and reducing the
number of allocations in extractColor().

#### Benchmarks
```
name             old time/op    new time/op     delta
ExtractColor-16    4.89µs ± 5%     0.64µs ± 2%   -86.87%  (p=0.000 n=9+9)

name             old speed      new speed       delta
ExtractColor-16  25.6MB/s ± 5%  194.6MB/s ± 2%  +661.43%  (p=0.000 n=9+9)

name             old alloc/op   new alloc/op    delta
ExtractColor-16    1.37kB ± 0%     0.31kB ± 0%   -77.31%  (p=0.000 n=10+10)

name             old allocs/op  new allocs/op   delta
ExtractColor-16      48.0 ± 0%        4.0 ± 0%   -91.67%  (p=0.000 n=10+10)
```
2021-03-11 19:34:50 +09:00
Junegunn Choi bb0502ff44
Check gofmt in `make test` 2021-02-28 18:28:21 +09:00
Junegunn Choi 32c493e994
[Makefile] Restore 32-bit targets
Close #2328
2021-01-20 18:40:17 +09:00
Junegunn Choi 012ee9ca85
[Makefile] Make sure to use bash 2020-12-31 12:57:57 +09:00
Loic Nageleisen 797dd7c449
[Makefile] Support building on machines with `uname -m` == "arm64" (#2291) 2020-12-23 14:27:46 +09:00
Junegunn Choi a7d3b72117
Make build flags consistent 2020-10-28 18:39:39 +09:00
Junegunn Choi 3ba7b5cf2d
Make Makefile fail when git information is not available 2020-10-28 18:33:22 +09:00
Junegunn Choi 0d5f862daf
0.24.0 2020-10-27 23:57:18 +09:00
Junegunn Choi 552414978e
0.24.0-rc1 2020-10-27 11:07:27 +09:00
Junegunn Choi dba14d2630
0.23.0 2020-10-07 19:18:50 +09:00
Raffaele 08c2bcb952
Quote LDFLAGS (#1995)
Make sure that `extldflags` is quoted so that LDFLAGS containing spaces won't break the build command.

Close #1994
2020-04-21 10:07:39 +09:00
stiletto f1520bdde6 Support building on machines with `uname -m` == "aarch64" (#1710) 2019-10-11 22:11:06 +09:00
Junegunn Choi 63c42b14f2
Remove trailing spaces in Makefile 2018-12-13 15:17:30 +09:00
Stefan Tatschner 6f1eaa9b39 Use go modules and simplify build (#1444)
* Update .travis.yml and use stages

This updates the .travis.yml configuration to use separate stages for
unittests and CLI tests. The output is now clearer, since for unittests
and CLI tests separate web pages are available.

* Use go modules and simplify build
2018-12-13 14:36:15 +09:00
Younes Manton 1c9e7b7ea6 Update Makefile to build ppc64le binary (#1326)
* Add ppc64le support to Makefile

* Update crypt libs to fix tty ioctls on ppc64le

The hardcoded tty ioctl commands in the terminal package were not
correct for ppc64le and caused the ioctls to return ENOTTY for
commands like TCGETS and so on. The bug is fixed in later versions.
2018-07-16 18:55:06 +09:00
做梦专业户 e67cc75063 Update Makefile to support armv8l (#1321) 2018-06-27 18:56:02 +09:00
Junegunn Choi 76a2dcb5a9
Add Dockerfile for running tests
make docker
make docker-test
2018-06-01 18:23:25 +09:00
Akinori MUSHA d207672bd5 Parse the output of `go version` to get the value of GOOS (#1260) 2018-04-12 17:09:08 +09:00
Junegunn Choi 34f16e5b7d
Fix Makefile and install script for the new project layout 2017-06-02 18:19:21 +09:00
Junegunn Choi 83e9af6601
Add git revision to --version output 2017-06-02 17:59:12 +09:00
Junegunn Choi 8bbf9335e1
Restructuring: main package in project root 2017-06-02 17:59:01 +09:00