mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-31 14:22:33 +00:00
Fix detection of login shell from passwd
This commit is contained in:
parent
99d0c2d846
commit
53c00ac631
1 changed files with 2 additions and 2 deletions
|
|
@ -125,7 +125,7 @@ using_id() {
|
|||
if [ -n "$cmd" ]; then
|
||||
output=$($cmd -P $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
|
||||
|
|
@ -137,7 +137,7 @@ using_passwd() {
|
|||
if [ -n "$cmd" ]; then
|
||||
output=$($cmd "^$USER:" /etc/passwd 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue