mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-11 18:32:12 +02:00
Add tests for the individual login_shell detection functions
This commit is contained in:
@@ -87,9 +87,6 @@ if [ -x "$(command -v tic)" ]; then
|
||||
if [ "$rc" != "0" ]; then die "$tic_out"; fi
|
||||
fi
|
||||
|
||||
# If a command was passed to SSH execute it here
|
||||
EXEC_CMD
|
||||
|
||||
shell_integration_dir="$HOME/SHELL_INTEGRATION_DIR"
|
||||
|
||||
login_shell_is_ok() {
|
||||
@@ -113,7 +110,7 @@ using_getent() {
|
||||
if [ -n "$cmd" ]; then
|
||||
output=$($cmd passwd $USER 2>/dev/null)
|
||||
if [ $? = 0 ]; then
|
||||
login_shell=$(echo $output | cut -d: -f7);
|
||||
login_shell=$(echo $output | grep -o '[^:]*$');
|
||||
if login_shell_is_ok; then return 0; fi
|
||||
fi
|
||||
fi
|
||||
@@ -162,6 +159,9 @@ execute_with_python() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
# If a command was passed to SSH execute it here
|
||||
EXEC_CMD
|
||||
|
||||
LOGIN_SHELL="OVERRIDE_LOGIN_SHELL"
|
||||
if [ -n "$LOGIN_SHELL" ]; then
|
||||
login_shell="$LOGIN_SHELL"
|
||||
|
||||
Reference in New Issue
Block a user