25 Commits

Author SHA1 Message Date
deb09d7bb9 Print build directory once selected 2025-04-09 14:44:16 +01:00
2fea9a3795 Update build usage and error message 2024-09-17 19:43:57 +01:00
c401ecfb86 Also export BUILD_DIR to an absolute path 2024-06-21 14:16:10 +01:00
96a1272506 Remove zcurses build-dir selector 2024-05-04 10:39:10 +01:00
f7bca0102a Tweak .build-dir widget and only enable during build-dir 2024-05-04 10:31:08 +01:00
dcacb1de42 Add .build-var zle widget
Press Ctrl-B to fuzzy find all configuration CMake variables for the
current build directory. Once a variable is selected, rewrite the
command-line to set the selected CMake variable.
2024-05-03 22:44:30 +01:00
c20d18e62d More tweaks for build-dir fzf invocation 2024-05-03 15:59:54 +01:00
e269e6ff8d Swap fzf args in build-dir to make more sense 2024-05-01 21:41:25 +01:00
b4ce10f1bd Tweak build-dir fzf invocation 2024-05-01 21:29:00 +01:00
1bdaa8ac08 Fix bug in build-dir with single build dir 2024-05-01 21:28:26 +01:00
ba9eba596f Limit the max size of the build-dir fzf window 2024-05-01 17:33:53 +01:00
0efb635f02 Use fzf by default for build-dir selector 2024-05-01 14:27:19 +01:00
edf37ebf07 Use vimdebug in build-debug if nvim is available 2024-04-02 16:09:31 +01:00
02abb0960c Always use nvim for vimdebug command 2022-11-06 22:05:49 +00:00
a96aa50fbe Add --show option to build-dir command
The new option shows the current build directory, if present.
2022-07-11 13:47:05 +01:00
81657d6f50 Update vim version check for enabling vimdebug 2020-02-06 13:36:05 +00:00
a095e9383c Escape * in vimdebug before passing to debug
With `setopt nonomatch` unescaped `*` can be used in command arguments
however when passing command arguments to `vimdebug` the `*` _should_
be escaped so that the debugger e.g. `gdb` will correctly invoke the
program where `setopt nonomatch` does not apply.
2019-04-18 10:41:12 +01:00
256cd06e5a build-dir now exports build_dir envvar
In addition to setting the `~build` hashed directory, also export the
`build_dir` environment variable to enable commands like this:

```
cmake . -B$build_dir
```
2018-11-07 10:58:04 +00:00
9037d2dd41 Default to using VIM's termdebug plugin for debug
VIM 8.1 added the optional plugin termdebug which integrates gdb
with separate buffers for source, output, and gdb console. This adds the
`vimdebug` command which enables the termdebug plugin and executes the
`:TermdebugCommand` with the given arguments.
2018-11-07 10:53:14 +00:00
2589b63023 Fix build-dir not stooping on error, remove build-dir.py 2018-09-03 11:32:58 +01:00
9e9c43a0cf Fix error in build-dir when --build is not set 2018-08-28 14:44:19 +01:00
3194afc80d Replace build-dir.py with zcurses build-dir
Update the build-dir shell function to usage zcurses instead of the
Python pick package to interactively select build directories, this
results in a more responsive user experience. Add argument parsing to
handle various use cases. Add prompt when the build command for the
selected build directory could not be detected, allowing the user to
specify the desired build command.

```
usage: build-dir [-h] [--build] [<directory>]

Find and select the current build directory interactively.

positional arguments:
  <directory> the build directory to select

optional arguments:
  -h, --help  show this help message and exit
  --build     invoke a build after selection
```
2018-08-24 11:04:18 +01:00
087a315289 Fix build-run and build-debug functions 2018-08-22 17:17:06 +01:00
8cad5acd83 Correct build command todo list 2018-08-20 10:41:34 +01:00
b12dcfe243 Add build utility commands
* `build` is an alias which on first use invokes `build-dir --build` to
  select a build directory, reconfigure the `build` alias, and invoke
  the `build` alias on the selected build directory.
* `debug` is an alias to the installed system native debugger.
* `build-dir` is a function to select a build directory by reconfiguring
  the `build` alias, it detects `build.ninja` or `Makefile` in the build
  directory and selects the appropriate `ninja` or `make` command.
  Depends on the `build-dir.py` Python script which uses the `pick`
  package to interactively select the build directory.
* `build-run` is a function which builds the specified target then
  attempts to run it, making the assumption it resides in the `bin`
  subdirectory of the build directory.
* `build-debug` is a function which build the specified tared then
  attempts to debug it using the system native debugger, making the
  assumption it resides in the `bin` subdirectory of the build
  directory.
2018-05-01 23:25:31 +01:00