[hackers] [PATCH] Implement -p for xargs(1)

2016-02-15 Thread =?UTF-8?q?Pekka=20Jylh=C3=A4-Ollila?=
This patch implements prompting for user input before executing commands. Input is read from /dev/tty as per posix 2013 spec. --- README | 2 +- xargs.1 | 6 +- xargs.c | 28 +--- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/README b/README index

Re: [hackers] [sbase][PATCH] Add -d, -f and -i flags to sort(1)

2016-02-15 Thread pekka . jylha . ollila
Here's the patch with updated manpage and usage(). --- sort.1 | 8 +++- sort.c | 63 ++- 2 files changed, 69 insertions(+), 2 deletions(-) diff --git a/sort.1 b/sort.1 index 8fd5ee9..52c73dc 100644 --- a/sort.1 +++ b/sort.1 @@

Re: [hackers] [sbase] tar: don't change modes for hardlinks on extraction || Eivind Uggedal

2016-02-15 Thread Dimitris Papastamos
On Mon, Feb 15, 2016 at 12:08:16PM -0600, Brad Barden wrote: > > tar: don't change modes for hardlinks on extraction > > > > Changing timestamps, modes and ownership of hardlinks > > makes no sense. > > See also my earlier email on this subject (Dec 6). I'm glad it's fixed. Yes

Re: [hackers] [sbase] tar: don't change modes for hardlinks on extraction || Eivind Uggedal

2016-02-15 Thread Brad Barden
> tar: don't change modes for hardlinks on extraction > > Changing timestamps, modes and ownership of hardlinks > makes no sense. See also my earlier email on this subject (Dec 6). I'm glad it's fixed.

Re: [hackers][vis][PATCH] Handle quote matching in its own function

2016-02-15 Thread Silvan Jegen
On Mon, Feb 15, 2016 at 05:50:12PM +0100, Marc André Tanner wrote: > On Mon, Feb 15, 2016 at 04:01:48PM +0100, Silvan Jegen wrote: > > [...] > > What would be more interesting is to add a way to define motions and > text objects in Lua. Integration with the LPeg based lexers should > then be

[hackers] [PATCH] [slock] Revert "No need for usage()"

2016-02-15 Thread Markus Teich
This reverts most of commit a6dc051e3744ce5b14c54d2d246d3e8258207e76 and fixes some related stuff: - keep spelling fixes from original commit - make -h and -v also work when followed by more arguments - any unknown flag prints usage - fix output of -v to display "slock: version 1.3" instead of

[hackers] [PATCH] [slock] revert using argv0 and minor fixup

2016-02-15 Thread Markus Teich
- use hardcoded "slock" instead of argv[0] - add "slock: " to fprintf calls, where it was missing - revert `argc--, argv++` shifting --- slock.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/slock.c b/slock.c index a0ffed0..2aa395e 100644 --- a/slock.c +++

Re: [hackers] [slock] No need for usage() || FRIGN

2016-02-15 Thread Anselm R Garbe
On 14 February 2016 at 02:00, wrote: > commit a6dc051e3744ce5b14c54d2d246d3e8258207e76 > Author: FRIGN > AuthorDate: Sun Feb 14 01:48:48 2016 +0100 > Commit: FRIGN > CommitDate: Sun Feb 14 02:00:14 2016 +0100 > > No need for usage()

Re: [hackers] [slock] Use argv0 instead of passing "slock:" to die every time || FRIGN

2016-02-15 Thread Anselm R Garbe
On 14 February 2016 at 02:14, wrote: > commit b02c4d452a7942d4be3c69e6f98dafd35a2e4e78 > Author: FRIGN > AuthorDate: Sun Feb 14 02:13:54 2016 +0100 > Commit: FRIGN > CommitDate: Sun Feb 14 02:13:54 2016 +0100 > > Use argv0 instead of

Re: [hackers] [slock] No need for usage() || FRIGN

2016-02-15 Thread Dimitris Papastamos
On Mon, Feb 15, 2016 at 11:51:00AM +0100, FRIGN wrote: > On Mon, 15 Feb 2016 11:47:30 +0100 > Markus Teich wrote: > > Hey Markus, > > > then we would have to assume users don't have *any* binary starting with a > > `-` > > that they might want to run after locking,

Re: [hackers] [slock] No need for usage() || FRIGN

2016-02-15 Thread Dimitris Papastamos
On Mon, Feb 15, 2016 at 11:47:30AM +0100, Markus Teich wrote: > Dimitris Papastamos wrote: > > On Mon, Feb 15, 2016 at 11:35:11AM +0100, FRIGN wrote: > > > My considerations here were that it was quite arbitrary not to document > > > -h, > > > given we "allow" a command to be passed to slock as

Re: [hackers] [slock] No need for usage() || FRIGN

2016-02-15 Thread Markus Teich
Dimitris Papastamos wrote: > On Mon, Feb 15, 2016 at 11:35:11AM +0100, FRIGN wrote: > > My considerations here were that it was quite arbitrary not to document -h, > > given we "allow" a command to be passed to slock as second + further > > arguments. However, I respect your stances on this and

Re: [hackers] [slock] Use argv0 instead of passing "slock:" to die every time || FRIGN

2016-02-15 Thread Dimitris Papastamos
On Mon, Feb 15, 2016 at 11:37:15AM +0100, FRIGN wrote: > On Mon, 15 Feb 2016 10:34:15 + > Dimitris Papastamos wrote: > > Hey Dimitris, > > > Yes this pattern is used in sbase. There is no point however > > replicating it to other projects. > > so how would you approach

Re: [hackers] [slock] Use argv0 instead of passing "slock:" to die every time || FRIGN

2016-02-15 Thread Markus Teich
FRIGN wrote: > we came up with this in sbase/ubase as an idiomatic way to set argv0 > for tools that don't use arg.h. > We need argv0 here because I moved the prepending of the argv[0] into > die(), and thus we need to store the argv0 in a global variable. Heyho frign, sure, but I asked why you

Re: [hackers] [slock] No need for usage() || FRIGN

2016-02-15 Thread Dimitris Papastamos
On Mon, Feb 15, 2016 at 11:35:11AM +0100, FRIGN wrote: > On Mon, 15 Feb 2016 11:15:50 +0100 > Markus Teich wrote: > > Hey Markus, > > > I have to agree with Christoph here. People running off git can just use > > the rev > > id they are using. I don't get what you

Re: [hackers] [slock] Use argv0 instead of passing "slock:" to die every time || FRIGN

2016-02-15 Thread FRIGN
On Mon, 15 Feb 2016 10:34:15 + Dimitris Papastamos wrote: Hey Dimitris, > Yes this pattern is used in sbase. There is no point however > replicating it to other projects. so how would you approach this? If slock was only a main()-function, one could've thought to just pass

Re: [hackers] [slock] No need for usage() || FRIGN

2016-02-15 Thread FRIGN
On Mon, 15 Feb 2016 11:15:50 +0100 Markus Teich wrote: Hey Markus, > I have to agree with Christoph here. People running off git can just use the > rev > id they are using. I don't get what you mean with the attack surface sentence. it was a rather weak argument by

Re: [hackers] [slock] Use argv0 instead of passing "slock:" to die every time || FRIGN

2016-02-15 Thread FRIGN
On Mon, 15 Feb 2016 11:22:08 +0100 Markus Teich wrote: Hey Markus, > why this `argc--, argv++` shenanigans? I think it's more confusing rather than > helping. we came up with this in sbase/ubase as an idiomatic way to set argv0 for tools that don't use arg.h. We

[hackers] [sbase] tar: support -f - for stdin/out || Eivind Uggedal

2016-02-15 Thread git
commit e13f571d119cdd6fedef3f748a264bb143cecc70 Author: Eivind Uggedal AuthorDate: Mon Feb 15 09:48:32 2016 + Commit: sin CommitDate: Mon Feb 15 10:20:12 2016 + tar: support -f - for stdin/out diff --git a/tar.1 b/tar.1 index

Re: [hackers] [slock] Use argv0 instead of passing "slock:" to die every time || FRIGN

2016-02-15 Thread Markus Teich
g...@suckless.org wrote: > + argv0 = argv[0], argc--, argv++; > - if (argc >= 2 && fork() == 0) { > + if (argc >= 1 && fork() == 0) { > if (dpy) > close(ConnectionNumber(dpy)); > - execvp(argv[1], argv+1); > - die("slock:

Re: [hackers] [slock] No need for usage() || FRIGN

2016-02-15 Thread Markus Teich
Christoph Lohmann wrote: > On Sun, 14 Feb 2016 10:46:52 +0100 g...@suckless.org wrote: > > 1) if you are running off git, -v will show the last stable > >release, effectively making this option useless. > >people running stable versions leave open an

[hackers] [sbase] ls: only display directory headers when more than one directory is specified || tty0

2016-02-15 Thread git
commit b107489bf2cda579ca53551206270b9eee80c059 Author: tty0 AuthorDate: Mon Feb 15 09:56:11 2016 + Commit: sin CommitDate: Mon Feb 15 09:59:09 2016 + ls: only display directory headers when more than one directory is specified diff --git

[hackers] [sbase] Makefile: add sbase-box-uninstall rule || Mattias Andrée

2016-02-15 Thread git
commit d9c85a2d79cd0cc9e1c338a28bedbcfa39182ac6 Author: Mattias Andrée AuthorDate: Mon Feb 15 09:47:16 2016 + Commit: sin CommitDate: Mon Feb 15 09:49:54 2016 + Makefile: add sbase-box-uninstall rule Signed-off-by: Mattias Andrée

[hackers] [sbase] Fix uninstall target || sin

2016-02-15 Thread git
commit 6ca2a046f8f680131046fc152031a899db4182d2 Author: sin AuthorDate: Mon Feb 15 09:44:27 2016 + Commit: sin CommitDate: Mon Feb 15 09:44:27 2016 + Fix uninstall target The installed tool is called install not xinstall. diff --git

Re: [hackers] [sbase][PATCH] Add -d, -f and -i flags to sort(1)

2016-02-15 Thread Dimitris Papastamos
On Fri, Feb 12, 2016 at 06:06:18PM +0200, Pekka Jylhä-Ollila wrote: > Hey, here's a patch that adds support to the -d, -f and -i flags to sort. > The added code uses libutf for string comparisons when the flags are used. > > --- > sort.c | 61