- [Windows] Fixed a bug for
lb_set_logfile()
andlb_get_logfile()
which failed if logfile was in a samba share
- New aliases for display functions:
lb_warning()
->lb_display_warning()
lb_info()
->lb_display_info()
lb_debug()
->lb_display_debug()
- New aliases for dialogs functions:
lbg_critical()
->lbg_display_critical()
lbg_error()
->lbg_display_error()
lbg_warning()
->lbg_display_warning()
lbg_info()
->lbg_display_info()
lbg_debug()
->lbg_display_debug()
- New function:
lb_date2timestamp()
to convert a date to a timestamp - New function:
lb_timestamp2date()
to convert a timestamp to a date - New debian package available to deploy libbash files in
/usr/lib/libbash
- Minor improvements in code and documentation
- New function:
lb_group_members()
to get users members of a group (works only on Linux systems) - New function:
lb_set_config()
for setting values - Support for config INI files for
lb_read_config()
andlb_import_config()
: ';' lines are comments, sections supported - New options for
lb_read_config()
andlb_import_config()
to filter by config sections - Removed multiple files support for
lb_import_config()
- Improvements in documentation
- Improved speed of config reading in
lb_read_config()
andlb_import_config()
- Improvements in documentation
- New function:
lb_read_config()
to read a config file (likelb_import_config()
without assigning to variables) - Fixed a bug in
lb_import_config()
for values containing the=
character - Huge performance improvements in
lb_import_config()
- Add support in
lb_df_fstype()
for Linux systems withoutlsblk
command
- Various performance improvements
- Changed results of
lb_df_space_left()
in KB instead of bytes to avoid differences between Linux and macOS - Add test and error code for files not readable in
lb_import_config()
- New function:
lb_import_config()
to read a file and import values into variables - New function:
lbg_open_directory()
to open a GUI file browser - New
--multiple
option inlb_choose_option()
to let user choose multiple options - Changed arguments for
lb_input_password()
andlbg_input_password()
(this does not break backward compatibility) - Minor code improvements
- Removed \n printed on Windows dialogs
- Fixed a very specific case for cscript on Windows that cannot run vbscripts from an absolute path
- Added Windows GUI support for
lbg_input_text()
,lbg_choose_option()
andlbg_choose_directory()
- Improve results of
lb_df_fstype()
andlb_df_uuid()
usinglsblk
command on Linux (see documentation) lbg_input_text()
now supports backslashes entries without putting doubles- Various improvements in source code and documentation
- Fixed a bug in
lb_compare_versions()
that caused bad results when comparing 0.x versions
- Major bugfix in arguments loading that caused bugs for
getopts
command in user scripts
- Add support for Windows systems powered by Cygwin!
- New variable and options to run a command when
lb_exit()
is called (see documentation) - New functions:
lb_user_exists()
andlb_in_group()
- New function:
lb_is_email()
to test if a string is a valid email - New display level support with functions:
lb_get_display_level()
andlb_set_display_level()
(since now, the display level was the same as the log level) - New variables:
$lb_current_user
(current user name),$lb_path
(libbash.sh path),$lbg_path
(libbash.sh GUI path) and$lb_directory
(libbash.sh directory) - New option in
lb_input_password()
andlbg_input_password()
to check minimum size of a password - New options to load libbash GUI and locales
- Automatic loading of locales for user language
- Renamed
lb_get_loglevel()
tolb_get_log_level()
andlb_set_loglevel()
tolb_set_log_level()
(+ added aliases to not break compatibility) - Renamed
lb_detect_os()
tolb_current_os()
(+ added alias to not break compatibility) - Many improvements and optimizations in source code
- Improvements in documentation
- New function:
lb_trim()
- Fix missing quotes that could cause bugs in paths with spaces
- New functions:
lb_is_boolean()
,lb_compare_versions()
andlb_generate_password()
- Minor code improvements
- New
$lb_current_os
variable with current OS lbg_set_gui()
with no argument now sets the default GUI tool (useful when reseting)- Delete
lb_log()
write error messages
- Fix bug on zenity notifications that hung scripts (removed the
--listen
option)
- Bugfixes and improvements on
lb_result()
,lb_short_result()
andlb_exit()
- New
--error-exitcode
option forlb_result()
andlb_short_result()
to set a custom exit code if error - WARNING: the former
-e
option alias used for--save-exitcode
is renamed to-s
inlb_result()
andlb_short_result()
- Documentation: add script examples and demo
- New function:
lb_abspath()
- New function:
lb_is_comment()
- Console size detection and improvements for the dialog command
- Add
--absolute-path
options tolbg_choose_file()
andlbg_choose_directory()
- Change behaviour for
lb_result()
on exit to return$lb_exitcode
variable and not command result - Renamed option
--save-exit-code
to--save-exitcode
forlb_result()
andlb_short_result()
- Set explicit returns to functions to avoid confusion and maybe errors
- New function:
lb_is_number()
- Add macOS support for
lb_df_fstype()
- Add macOS support for
lb_df_uuid()
- Better implementation of
lb_short_result()
: exit code argument is now an option
- Fix bug in
lb_exit()
: bad variable name
- Add a missing French translation
- First release on Github
libbash.sh is licensed under the MIT License. See LICENSE.md for the full license text.
Author: Jean Prunneaux http://jean.prunneaux.com