b4c23f2409
Consolidated winwidth/winheight into winsize variable, which makes
...
things a little more straightforward.
2019-11-01 17:19:25 +01:00
3f7730be98
Removed nprocs variable, as it was a potential source of errors if it
...
got out of sync.
2019-11-01 17:15:38 +01:00
7bdced0f1c
Removed bb +execute:
as it was not used.
2019-11-01 17:10:49 +01:00
a97ea1d19b
Fix for improperly initialized variable.
2019-11-01 17:08:56 +01:00
1ae460a02b
Oops, I guess it was needed after all.
2019-11-01 16:54:47 +01:00
a6096af13e
Removed unnnecessary variable
2019-11-01 16:53:03 +01:00
478e6a9023
Cleanup/overhaul of how symlinks are handled and how paths are parsed.
...
Now `bb` will fail on `bb nonexistant/..` and will display
`/foo/baz/atfoo/` as `/foo/` if `atfoo` is a symlink to `/foo`
2019-11-01 16:46:39 +01:00
2086cc6598
Fix for errors that occur before initializing the terminal.
2019-11-01 16:46:12 +01:00
f960755b13
Fixed "bb +." being broken.
2019-11-01 14:53:50 +01:00
3fd5ed860d
Moved dirty
from being a bit on bb
to being a global, which
...
simplifies the code a bit, plus some other minor cleanups.
2019-11-01 14:50:44 +01:00
02beee84fc
Better warning messages.
2019-10-30 13:43:49 +01:00
55d3f0e160
Mostly finalized working version of better signal handling, including
...
allowing for suspended/resuming processes (bb +fg) and cleaner linked
list handling code.
2019-10-27 14:58:23 -07:00
dc6ecc4e7f
Removed (broken) code to escape newlines in output. If you care about
...
files with newlines, just use '-0'. Otherwise, newlines will just be
printed like every other character.
2019-10-13 21:48:43 -07:00
6a22cda2e9
More code cleanup and guards to check tty_in/out exist
2019-10-13 21:48:31 -07:00
ff8c2f9c62
More code cleanup: consolidating cd_to() and populate_files() into just
...
populate_files(), cleaner startup behavior, less duplicative environment
variable setting, misc.
2019-10-13 21:20:00 -07:00
5ad09087c2
Slightly better warning message with +
2019-10-13 19:36:25 -07:00
55daca6a2f
More code cleanup, including tweaking matches_cmd() to figure out if
...
there are required arguments or not, and refactoring run_bbcmd() to no
longer return a value (which was ignored), but instead just spit out error messages to
stderr if necessary.
2019-10-13 19:34:16 -07:00
d77907783f
Code cleanup.
2019-10-13 18:56:09 -07:00
7e373e12b2
Fixed max depth str length to be closer to actual range of lengths.
2019-10-13 18:43:07 -07:00
6ffe39308b
Deprecated support for piping commands in to bb at startup (undocumented). Users should use xargs if they want to do that sort of thing.
2019-10-13 18:41:48 -07:00
e40feed849
Cleaned up the command parsing code a bit to be slightly more correct
...
and more compact. Now uses if-else-if chain instead of nested switch
statements. This may be very slightly less performant, but probably not
noticeable and much cleaner code.
2019-10-13 18:33:46 -07:00
9e4e0ee314
verhaul of terminal keypress handling and labeling to support more
...
functionality for mouse clicking/dragging/left clicking/middle
clicking/double clicking and to have more standardized behavior for key
names and better handling of key modifiers (Ctrl, Alt, Meta, Shift).
Also moved Ctrl-c and Ctrl-z to custom key bindings with (bb +kill and
bb +suspend). Mouse clicking is now also handled in key bindings.
2019-10-12 16:04:19 -07:00
220d0dc402
Set default columns to what the startup commands were doing by default,
...
so that's no longer needed in the startup commands.
2019-10-08 19:30:37 -07:00
7f0fcdeea4
Removed some unnecessary +refreshes, no longer enable cursor by default,
...
but instead have ask() etc. make the cursor visible. Also cleaned up
some of the failure cases for better feedback.
2019-10-03 14:57:34 -07:00
97bae88a1e
For +deselect, allow +deselect (no colon) to mean "deselect everything"
...
to make it a simple command instead of +deselect: "$@"
2019-10-03 14:13:27 -07:00
6b63ea5d40
Added +execute (for, e.g. `bb +e:"bb +goto:$(ls | pick "Go to file:
...
")"`)
2019-10-03 13:35:53 -07:00
38497d5619
Overhaul/cleanup of command line argument parsing. Now properly handles
...
startup commands in the order: bbstartup.sh, bb +cmd, echo +cmd | bb
2019-10-03 13:26:31 -07:00
2be2c575b2
Reordering startup commands and cleaning up piped in input.
2019-10-02 13:52:44 -07:00
b9cb1e34c9
Moved some variables out of global scope that weren't needed there.
2019-10-02 13:29:49 -07:00
e25eaf9b92
Default behavior for invalid bb commands is now to print an error
...
message to stdout on the default console screen and otherwise ignore it
instead of exiting.
2019-10-02 13:14:28 -07:00
f0016a2d10
Removed BB_QUIT
2019-10-02 13:08:07 -07:00
f0e37a95f1
Fixed an issue with /etc/bb instead of /etc/xdg/bb and moved the startup
...
command into bb.h with the other bb shell script stuff.
2019-09-30 17:22:17 -07:00
10ea5c1eb0
Updated comment.
2019-09-30 17:07:30 -07:00
3daa54df98
Moved config.h -> bb.h and did some cleanup, moving function
...
declarations and constants out of bb.c and into bb.h. Also
re-alphabetized the functions and updated the docs.
2019-09-30 17:06:27 -07:00
7a666d5195
Overhaul of how binding commands works. It's now all handled through
...
bbstartup.sh, which loads bindings.bb and parses it to
+bind:<keys>:<script> commands.
2019-09-30 15:46:24 -07:00
6e41b2f2e2
Only toggle sort direction if it was the first sort and it was ~'d.
2019-09-22 19:47:59 -07:00
0f0bacceb4
Now $@ is *always* the selected files, even if there are none. Cleaned
...
up the default bindings a bit to be more explicit about manipulating the
cursor file vs. manipulated selected files. Added support for `ask -n`
and generally confirming with a single 'y' keystroke instead of 'y<enter>'
Also added a binding for `rename`-command batch renaming.
2019-09-22 17:51:27 -07:00
b9346fb3fe
Changed sorting to support '~' meaning toggle current direction.
2019-09-21 21:17:21 -07:00
149056033a
Added support for default shell other than sh (e.g. dash, in case sh
...
links to bash)
2019-09-21 21:14:59 -07:00
f55c6a5c82
Fix for ctrl-z not restoring cursor visibility
2019-09-21 19:00:53 -07:00
eca5a5a8b1
Version bump.
2019-09-21 18:06:21 -07:00
a50e439b42
Some tweaks to how the help menu displays bindings and added BBSHELLFUNC
...
for allowing the `bb` function to be used in the ':' and '|' bindings
2019-09-21 18:05:13 -07:00
23bed00467
Fix for weird terminal behavior (e.g. not echoing user input for
...
subprocesses if bb was started with the terminal attributes set with NOECHO) by setting up a "default" termios struct with sane settings instead of relying on bb being launched with sane settings.
2019-09-21 16:38:53 -07:00
ba7b44a3e7
Fix for broken behavior in the help menu (hanging when reaching the end,
...
due to not close()ing the file descriptor, and exiting on ctrl-c)
2019-09-21 13:40:35 -07:00
651e58c9c9
Removed +bind functionality.
2019-09-12 18:56:27 -07:00
e1e34bc6ed
Replaced marks system with something a little more elegant using
...
symbolic links in ~/.config/bb/marks/. The new version is a little more
flexible (arbitrary mark names), persistent across bb sessions, and uses
a bit less code.
2019-09-12 18:41:15 -07:00
52a2b30692
Fixed mistake in bb
function conditional
2019-09-07 21:47:22 -07:00
5927e68bb7
Fix for potential buffer overflow.
2019-07-15 22:21:08 -07:00
47f66e49a7
Added fallback for if binding has no description.
2019-07-12 16:24:27 -07:00
da6bb91763
Overhaul to use a shell function for internal commands instead of bb
...
itself, which lets bb work when not yet installed.
2019-07-12 16:19:31 -07:00