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 ```
7 lines
135 B
Plaintext
7 lines
135 B
Plaintext
#compdef build-dir
|
|
|
|
_arguments \
|
|
'(-h --help)'{-h,--help}'[]' \
|
|
'--build[invoke a build after selection]' \
|
|
'1:directory:_files'
|