Commit graph

68 commits

Author SHA1 Message Date
Mark Tiefenbruck
ee9c0a34ba Patch from Dmytro Bagrii
Fix fbrun completion search for last directory in PATH
2021-07-06 16:10:30 -07:00
Pete Beardmore
248b15c25f fbrun, add horizontal padding option 2018-03-14 07:49:50 +01:00
kottroll
05d860eda7 rm not needed newlines 2018-03-11 13:35:56 +01:00
Thomas Lübking
507782e5d4 escape special chars in filenames
This follows the escaped chars in bash completion and allows to pass
filenames with spaces etc.
Using quotes would be another option but requires special handling of
"~" and, what's worse, either hand-correcting the cursor position (into
the quoted area) or more completion mumbo-jumbo to handle the quotes.
2016-09-22 21:04:01 +02:00
Thomas Lübking
39b34a9109 fix segfault when completing ~ or .
ie. w/o any / in the given path we'll get an irregular split point and
thus out of bounds array access
2016-09-22 21:03:35 +02:00
Thomas Lübking
baaf477d46 add support for dedicated completion data
This allows to complete random things, useful along the -print flag but
also to limit the commands to those found my menumaker etc.
2016-07-23 16:58:04 +02:00
Thomas Lübking
0ca5daf997 limit fbrun history size
the default is 1024-1025, values are read from the FBRUN_HISTORY_SIZE
environment variable
NOTICE: the limit isn't hard, but will typically be n+1 and only n if
the new entry is already present in the last n entries

REQUEST: 202
2016-07-23 16:58:04 +02:00
Thomas Lübking
e85dc01d28 add autocompletion support to fbrun 2016-07-23 16:58:04 +02:00
Thomas Lübking
d741b6fe6e improve fbrun completion
- streamline code
- indicate completion by making use of selection
- fix buggy behavior (notably subsequent completions and FS path
  following)
- support "~" in paths
- support chunk completion
  (ie. "mp[layer] ~/vid[eos/favporn.mp4]" can be completed in both
   tokens; buggy with paths including spaces in non-leafs)

REQUEST: 223
2016-07-23 16:58:04 +02:00
Mathias Gumz
a3c0b049bf Fix corruption of fbrun-history
This commit fixes issues #72 (brought up + different solution by Mattias
Guns; I received a similar patch by 'Nable 80' via ML and discussed the
issue in #fluxbox with 'Nable 80'), patch #73 (Mattias Guns) and finally
patch #162 (Ulrich Eckhardt; this commit is heavily based upon Ulrich's
work).

The original code was overly complex. It tried to avoid writing
bytes to the disk at the expense of comprehensibility and as a result it
was buggy. I looked at both patches from Mattias and 'Nable 80' which address
the bug with skipping entries in the history-file (my fault: incorrect use
of outfile.ignore(1, '\n')): They provided a proper fix for the problem
but I decided to use Ulrich's code since it improves the whole code by making
it a lot simpler.

So, kudos to all of you.
2015-01-02 17:08:44 +01:00
Mathias Gumz
0e8a27e931 Fix loading fbrun-history
Previous code add one additional entry on loading the history. This
commit is one part of the patch #162 (see [1] and [2]), written
by Ulrich Eckhardt <doomster@knuut.de>.

[1]: https://sourceforge.net/p/fluxbox/patches/162/
[2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=fbrun-bug636632.patch;att=1;bug=636632
2015-01-02 16:45:39 +01:00
Sami Kerola
73b7958770 build-sys: include config.h to all files using automake
Do not try to be too smart which compilations need config.h, as most of
them will simply because of the config.h has information about system
capabilities.
2013-05-26 10:38:10 +01:00
Vladimir A. Pavlov
7a404e7fbc Store XClassHint on stack, not in dynamic memory 2012-12-30 12:27:37 +01:00
Ryan Pavlik
d70bdbe675 Check .empty() instead of .size() == 0
Found with cppcheck.
2012-01-04 07:54:46 +01:00
Ryan Pavlik
3ca61475fb FbRun.cc: Fix on windows where there is no fork 2011-10-31 10:54:09 -05:00
Mathias Gumz
690d926ac4 introduced FbTk::BidiString
a 'BidiString' holds both the logical content and the visual reordered
version of the content of a string. this helps to reduce the number of
calls to reorder the string before drawing it (as introduced in the patch
from Ken Bloom) and to be more consistent in menus and textboxes (drawing
cursors and underlining text).
2010-09-08 20:17:21 +02:00
Mathias Gumz
df81e1f774 minor cosmetics 2009-05-25 08:04:41 +02:00
Mark Tiefenbruck
e6570b61f3 add -print option to fbrun to return result to stdout instead of executing it 2008-10-04 14:01:31 -07:00
Mark Tiefenbruck
9c105111d2 remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
markt
8da54ca0eb add some decorations to torn menus, and fix restart without an argument 2007-07-31 23:16:05 +00:00
mathias
6f8a5c7a8d small fix for the /bin/sh issue .. just using /bin/zsh now 2007-06-09 17:44:27 +00:00
mathias
dff2aa3356 fix for the following problem:
on *bsd /bin/sh is not just a symlink to /bin/bash as on most linux's 
  but a real standalone shell. and it behaves differently from "bash -c"
  behavior .. it doesnt exec the command given but waits till the command
  finishes. as a result a lot of "rogue" a flying around. solution is now 

     ( $SHELL or /bin/sh ) -c exec <cmd>
2007-06-06 06:22:37 +00:00
mathias
e5e76e7761 Cosmetic patch from Slava Semushin 2006-10-30 19:31:15 +00:00
mathias
a15d9af3c7 Cleanup unneeded headers (thanks Slava Semushin) 2006-04-25 06:46:06 +00:00
simonb
cb65dae95f fbrun: Move the cursor to the end when tab completing
+ thanks Jonas Koelker, sf.net rfe #1333003, patch #1475578
2006-04-25 02:42:05 +00:00
simonb
b2105a62c3 fix fbrun positioning code to use hints properly 2006-04-17 14:00:28 +00:00
simonb
78f3b0ada4 fix compiler warnings in fbrun too 2006-04-17 08:04:12 +00:00
mathias
ae05ad9a01 updated copyright info 2006-02-16 06:53:05 +00:00
mathias
318d76b47c fix from vadim for fbrun-tabcompletion 2005-05-09 07:20:17 +00:00
mathias
6c057c6903 Fix for #1160244, #1099704, #1094107:
if the xkb-extension is enabled and the user switches between his/her
keyboardlayouts fluxbox's keybhandling doesn't work well anymore because
xkeyevent.state contains also xkb-related flags and thus we have to handle
that with caution.

KeyUtils now contain 'isolateModifierMask()' to really work only on the
modifiers. why not as part of cleanMods() ? because the XLookupString return
false results, eg TextBox's would only print chars from the first
keyboardlayout.
2005-05-06 09:22:53 +00:00
mathias
1789d0c31f copyright date 2005-01-24 18:49:01 +00:00
mathias
6fbe0e44d6 applied patches from openbsd-ports, closed #1105041 (sf)
execl needs a terminating NULL at the end, a '0' would be
    converted to "int 0" on 64bit-systems
2005-01-20 12:30:35 +00:00
mathias
1910d5af46 fix the no-writing-history issue for fbrun 2004-12-24 03:02:48 +00:00
mathias
b3fa5c2428 * moved FbTk/Directory.cc/hh over to FbTk/FileUtil.cc/hh which contain now
file and directory - helproutines.

* created the FileUtil-namespace which contains file-related functions, moved
  those functions out of Directory - code

* changes to the rest of the files to follow those changes
2004-12-18 01:29:22 +00:00
mathias
ee8b44813e keypad-enter should work with fbrun now 2004-11-18 03:25:08 +00:00
akir
4e05252172 fbrun switches between file-search and path-to-file-search now correctly (i think) 2004-10-10 16:35:29 +00:00
akir
07f1a6e457 fixes #1026929 (sourceforge) 2004-09-29 00:51:29 +00:00
rathnor
d17bf39a43 add autoconf check for std c++ headers 2004-08-31 15:26:40 +00:00
fluxgen
9fce121737 path completion, and load apps on first tab press, patch from Mathias Gumz 2004-04-22 21:01:58 +00:00
rathnor
217af49664 add unistd include for fork 2004-04-21 14:58:44 +00:00
fluxgen
1355708ae2 using fbtk directory, patch from Mathias Gumz 2004-04-19 18:10:44 +00:00
fluxgen
4e360624e6 minor fix 2004-04-18 18:57:24 +00:00
fluxgen
facca1f6f9 tab complete on all apps in PATH, patch from Mathias Gumz 2004-04-18 14:16:09 +00:00
fluxgen
bd7c2ecf07 fixed invinite loop, patch from Mathias Gumz 2004-02-28 10:43:20 +00:00
fluxgen
25957274a4 cycle tabcompletion, patch from Mathias Gumz 2004-02-25 18:37:47 +00:00
fluxgen
b10add4abe minor fix 2003-12-31 01:34:33 +00:00
rathnor
1aeefbe2fb fix modifier cleaning in fbrun (was missing capslock) 2003-09-16 16:10:32 +00:00
rathnor
41cf43a02d portability fix 2003-09-16 14:49:49 +00:00
fluxgen
352e863c5f fixed scroll lock and num lock mask 2003-09-06 15:50:25 +00:00
fluxgen
b039f2076e using GContext and FbPixmap 2003-08-27 14:04:12 +00:00