diff options
author | Olivier Brunel | 2014-11-17 15:15:12 +0100 |
---|---|---|
committer | Olivier Brunel | 2015-06-08 19:26:10 +0200 |
commit | 63c15cbc85b0a37751daa70bb9da655676ed71d4 (patch) | |
tree | 08023e0965c3ced7e7a61267cf3e3afa5edb094d /0001-Add-compilation-option-for-login-completion.patch | |
parent | e934eb506f9f0fdbad50695cd63c1400d8bbcdc0 (diff) | |
download | aur-63c15cbc85b0a37751daa70bb9da655676ed71d4.tar.gz |
xlsh-without-x: Tweak PKGBUILD and add some patches
Refresh things a bit in the PKGBUILD, I've now forked xlsh and maintain my
changes in a git repo; so we'll use the patches from there instead of one big
"patch" file.
Also adding patches that:
- don't block signals, as this caused issues (e.g. w/ systemd on shutdown)
- set up environment from PAM, so we get variables set from pam_env or logind
Signed-off-by: Olivier Brunel <jjk@jjacky.com>
Diffstat (limited to '0001-Add-compilation-option-for-login-completion.patch')
-rw-r--r-- | 0001-Add-compilation-option-for-login-completion.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/0001-Add-compilation-option-for-login-completion.patch b/0001-Add-compilation-option-for-login-completion.patch new file mode 100644 index 000000000000..2032ff11ebef --- /dev/null +++ b/0001-Add-compilation-option-for-login-completion.patch @@ -0,0 +1,59 @@ +From 1ee25d8e41581ac178545bde6dfa00229e3f809a Mon Sep 17 00:00:00 2001 +From: Olivier Brunel <jjk@jjacky.com> +Date: Tue, 15 Nov 2011 15:02:59 +0100 +Subject: [PATCH 1/8] Add compilation option for login completion + +Signed-off-by: Olivier Brunel <jjk@jjacky.com> +--- + include/config.h | 1 + + src/xlsh.c | 6 ++++++ + 2 files changed, 7 insertions(+) + +diff --git a/include/config.h b/include/config.h +index 743eaf0..3f6567e 100644 +--- a/include/config.h ++++ b/include/config.h +@@ -25,6 +25,7 @@ + #define XLSH_PAM_TTY "login" + #define XLSH_PAM_X11 "xlshd" + ++#define XLSH_COMPLETION_LOGIN 0 + #define XLSH_COMPLETION_SHOWROOT 1 + #define XLSH_COMPLETION_MINUID 1000 + #define XLSH_COMPLETION_MAXUID 65534 +diff --git a/src/xlsh.c b/src/xlsh.c +index b8181e2..b22b4e4 100644 +--- a/src/xlsh.c ++++ b/src/xlsh.c +@@ -516,6 +516,7 @@ static char* xlsh_cmd_match_command(const char* text, int state) + return NULL; + } + ++#if XLSH_COMPLETION_LOGIN + static char* xlsh_cmd_match_user(const char* text, int state) + { + static size_t len; +@@ -540,6 +541,7 @@ static char* xlsh_cmd_match_user(const char* text, int state) + endpwent(); + return NULL; + } ++#endif + + static char** xlsh_cmd_complete(const char* text, int start, int end) + { +@@ -552,8 +554,12 @@ static char** xlsh_cmd_complete(const char* text, int start, int end) + return rl_completion_matches(const_cast.c, + xlsh_cmd_match_command); + else ++#if XLSH_COMPLETION_LOGIN + return rl_completion_matches(const_cast.c, + xlsh_cmd_match_user); ++#else ++ return NULL; ++#endif + } + + int xlsh_cmd_loop(void) +-- +2.1.3 + |