setuid, getgid and sticky bit now handled :D
This commit is contained in:
parent
a341bcf800
commit
aaa463be6a
4 changed files with 55 additions and 24 deletions
|
|
@ -8,11 +8,11 @@ if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
||||||
let s:wipebuf = bufnr('%')
|
let s:wipebuf = bufnr('%')
|
||||||
endif
|
endif
|
||||||
set shortmess=aoO
|
set shortmess=aoO
|
||||||
badd +98 src/lib_ls_long2.c
|
badd +51 src/lib_ls_long2.c
|
||||||
badd +23 src/ft_ls_long.c
|
badd +23 src/ft_ls_long.c
|
||||||
badd +7 includes/ft_ls.h
|
badd +1 includes/ft_ls.h
|
||||||
badd +60 ~/.tmux.conf
|
badd +60 ~/.tmux.conf
|
||||||
badd +52 src/lib_ls_long.c
|
badd +28 src/lib_ls_long.c
|
||||||
badd +35 src/lib_lsdata.c
|
badd +35 src/lib_lsdata.c
|
||||||
badd +92 src/lib_parse.c
|
badd +92 src/lib_parse.c
|
||||||
badd +22 libft/src/ft_printf/lib_pad.c
|
badd +22 libft/src/ft_printf/lib_pad.c
|
||||||
|
|
@ -44,14 +44,14 @@ badd +25 libft/src/lst/ft_lst_removeif.c
|
||||||
badd +42 ~/.vimrc
|
badd +42 ~/.vimrc
|
||||||
badd +12 src/ft_ent_has_dir.c
|
badd +12 src/ft_ent_has_dir.c
|
||||||
badd +35 src/ft_ent_get_dirs.c
|
badd +35 src/ft_ent_get_dirs.c
|
||||||
badd +20 src/lib_ent.c
|
badd +1 src/lib_ent.c
|
||||||
badd +11 .Makefile.swp
|
badd +11 .Makefile.swp
|
||||||
badd +18 ~/dotfiles/vim.symlink/plugins.vim
|
badd +18 ~/dotfiles/vim.symlink/plugins.vim
|
||||||
badd +22 libft/src/str/ft_strsub.c
|
badd +22 libft/src/str/ft_strsub.c
|
||||||
badd +0 libft/Makefile
|
badd +1 libft/Makefile
|
||||||
badd +14 libft/src/btree/btree_print.c
|
badd +14 libft/src/btree/btree_print.c
|
||||||
badd +14 libft/src/printing/ft_putaddr.c
|
badd +14 libft/src/printing/ft_putaddr.c
|
||||||
badd +0 ~/ft_ls/libft/src/str/ft_strinsert.c
|
badd +1 libft/src/str/ft_strinsert.c
|
||||||
args src/lib_ls_long2.c
|
args src/lib_ls_long2.c
|
||||||
edit includes/ft_ls.h
|
edit includes/ft_ls.h
|
||||||
set splitbelow splitright
|
set splitbelow splitright
|
||||||
|
|
@ -63,8 +63,8 @@ set nosplitbelow
|
||||||
set nosplitright
|
set nosplitright
|
||||||
wincmd t
|
wincmd t
|
||||||
set winheight=1 winwidth=1
|
set winheight=1 winwidth=1
|
||||||
exe 'vert 1resize ' . ((&columns * 101 + 101) / 202)
|
exe 'vert 1resize ' . ((&columns * 90 + 90) / 181)
|
||||||
exe 'vert 2resize ' . ((&columns * 100 + 101) / 202)
|
exe 'vert 2resize ' . ((&columns * 90 + 90) / 181)
|
||||||
argglobal
|
argglobal
|
||||||
setlocal fdm=manual
|
setlocal fdm=manual
|
||||||
setlocal fde=0
|
setlocal fde=0
|
||||||
|
|
@ -75,7 +75,7 @@ setlocal fml=1
|
||||||
setlocal fdn=20
|
setlocal fdn=20
|
||||||
setlocal fen
|
setlocal fen
|
||||||
silent! normal! zE
|
silent! normal! zE
|
||||||
let s:l = 61 - ((44 * winheight(0) + 40) / 80)
|
let s:l = 61 - ((45 * winheight(0) + 40) / 81)
|
||||||
if s:l < 1 | let s:l = 1 | endif
|
if s:l < 1 | let s:l = 1 | endif
|
||||||
exe s:l
|
exe s:l
|
||||||
normal! zt
|
normal! zt
|
||||||
|
|
@ -93,15 +93,15 @@ setlocal fml=1
|
||||||
setlocal fdn=20
|
setlocal fdn=20
|
||||||
setlocal fen
|
setlocal fen
|
||||||
silent! normal! zE
|
silent! normal! zE
|
||||||
let s:l = 17 - ((16 * winheight(0) + 40) / 80)
|
let s:l = 17 - ((16 * winheight(0) + 40) / 81)
|
||||||
if s:l < 1 | let s:l = 1 | endif
|
if s:l < 1 | let s:l = 1 | endif
|
||||||
exe s:l
|
exe s:l
|
||||||
normal! zt
|
normal! zt
|
||||||
17
|
17
|
||||||
normal! 011l
|
normal! 011l
|
||||||
wincmd w
|
wincmd w
|
||||||
exe 'vert 1resize ' . ((&columns * 101 + 101) / 202)
|
exe 'vert 1resize ' . ((&columns * 90 + 90) / 181)
|
||||||
exe 'vert 2resize ' . ((&columns * 100 + 101) / 202)
|
exe 'vert 2resize ' . ((&columns * 90 + 90) / 181)
|
||||||
tabedit src/main.c
|
tabedit src/main.c
|
||||||
set splitbelow splitright
|
set splitbelow splitright
|
||||||
set nosplitbelow
|
set nosplitbelow
|
||||||
|
|
@ -134,8 +134,8 @@ set nosplitbelow
|
||||||
set nosplitright
|
set nosplitright
|
||||||
wincmd t
|
wincmd t
|
||||||
set winheight=1 winwidth=1
|
set winheight=1 winwidth=1
|
||||||
exe 'vert 1resize ' . ((&columns * 101 + 101) / 202)
|
exe 'vert 1resize ' . ((&columns * 90 + 90) / 181)
|
||||||
exe 'vert 2resize ' . ((&columns * 100 + 101) / 202)
|
exe 'vert 2resize ' . ((&columns * 90 + 90) / 181)
|
||||||
argglobal
|
argglobal
|
||||||
setlocal fdm=manual
|
setlocal fdm=manual
|
||||||
setlocal fde=0
|
setlocal fde=0
|
||||||
|
|
@ -151,7 +151,7 @@ if s:l < 1 | let s:l = 1 | endif
|
||||||
exe s:l
|
exe s:l
|
||||||
normal! zt
|
normal! zt
|
||||||
38
|
38
|
||||||
normal! 011l
|
normal! 01l
|
||||||
wincmd w
|
wincmd w
|
||||||
argglobal
|
argglobal
|
||||||
edit src/ft_ls.c
|
edit src/ft_ls.c
|
||||||
|
|
@ -171,9 +171,31 @@ normal! zt
|
||||||
49
|
49
|
||||||
normal! 026l
|
normal! 026l
|
||||||
wincmd w
|
wincmd w
|
||||||
exe 'vert 1resize ' . ((&columns * 101 + 101) / 202)
|
exe 'vert 1resize ' . ((&columns * 90 + 90) / 181)
|
||||||
exe 'vert 2resize ' . ((&columns * 100 + 101) / 202)
|
exe 'vert 2resize ' . ((&columns * 90 + 90) / 181)
|
||||||
tabedit ~/ft_ls/libft/src/str/ft_strinsert.c
|
tabedit src/lib_ls_long2.c
|
||||||
|
set splitbelow splitright
|
||||||
|
set nosplitbelow
|
||||||
|
set nosplitright
|
||||||
|
wincmd t
|
||||||
|
set winheight=1 winwidth=1
|
||||||
|
argglobal
|
||||||
|
setlocal fdm=manual
|
||||||
|
setlocal fde=0
|
||||||
|
setlocal fmr={{{,}}}
|
||||||
|
setlocal fdi=#
|
||||||
|
setlocal fdl=0
|
||||||
|
setlocal fml=1
|
||||||
|
setlocal fdn=20
|
||||||
|
setlocal fen
|
||||||
|
silent! normal! zE
|
||||||
|
let s:l = 1 - ((0 * winheight(0) + 40) / 80)
|
||||||
|
if s:l < 1 | let s:l = 1 | endif
|
||||||
|
exe s:l
|
||||||
|
normal! zt
|
||||||
|
1
|
||||||
|
normal! 0
|
||||||
|
tabedit libft/src/str/ft_strinsert.c
|
||||||
set splitbelow splitright
|
set splitbelow splitright
|
||||||
set nosplitbelow
|
set nosplitbelow
|
||||||
set nosplitright
|
set nosplitright
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/07 15:00:05 by jhalford #+# #+# */
|
/* Created: 2016/11/07 15:00:05 by jhalford #+# #+# */
|
||||||
/* Updated: 2016/11/21 14:34:29 by jhalford ### ########.fr */
|
/* Updated: 2016/11/21 17:22:13 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/07 14:59:51 by jhalford #+# #+# */
|
/* Created: 2016/11/07 14:59:51 by jhalford #+# #+# */
|
||||||
/* Updated: 2016/11/16 17:59:58 by jhalford ### ########.fr */
|
/* Updated: 2016/11/21 17:22:25 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/07 15:01:01 by jhalford #+# #+# */
|
/* Created: 2016/11/07 15:01:01 by jhalford #+# #+# */
|
||||||
/* Updated: 2016/11/16 17:51:27 by jhalford ### ########.fr */
|
/* Updated: 2016/11/21 17:29:24 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -16,13 +16,22 @@ void ft_ls_long_rights(mode_t m)
|
||||||
{
|
{
|
||||||
ft_putchar(m & S_IRUSR ? 'r' : '-');
|
ft_putchar(m & S_IRUSR ? 'r' : '-');
|
||||||
ft_putchar(m & S_IWUSR ? 'w' : '-');
|
ft_putchar(m & S_IWUSR ? 'w' : '-');
|
||||||
ft_putchar(m & S_IXUSR ? 'x' : '-');
|
if (m & S_ISUID)
|
||||||
|
ft_putchar(m & S_IXUSR ? 's' : 'S');
|
||||||
|
else
|
||||||
|
ft_putchar(m & S_IXUSR ? 'x' : '-');
|
||||||
ft_putchar(m & S_IRGRP ? 'r' : '-');
|
ft_putchar(m & S_IRGRP ? 'r' : '-');
|
||||||
ft_putchar(m & S_IWGRP ? 'w' : '-');
|
ft_putchar(m & S_IWGRP ? 'w' : '-');
|
||||||
ft_putchar(m & S_IXGRP ? 'x' : '-');
|
if (m & S_ISGID)
|
||||||
|
ft_putchar(m & S_IXGRP ? 's' : 'S');
|
||||||
|
else
|
||||||
|
ft_putchar(m & S_IXGRP ? 'x' : '-');
|
||||||
ft_putchar(m & S_IROTH ? 'r' : '-');
|
ft_putchar(m & S_IROTH ? 'r' : '-');
|
||||||
ft_putchar(m & S_IWOTH ? 'w' : '-');
|
ft_putchar(m & S_IWOTH ? 'w' : '-');
|
||||||
ft_putchar(m & S_IXOTH ? 'x' : '-');
|
if (m & S_ISVTX)
|
||||||
|
ft_putchar(m & S_IXOTH ? 't' : 'T');
|
||||||
|
else
|
||||||
|
ft_putchar(m & S_IXOTH ? 'x' : '-');
|
||||||
}
|
}
|
||||||
|
|
||||||
int ft_ls_long_lnk(t_lsdata *data)
|
int ft_ls_long_lnk(t_lsdata *data)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue