Giter Site home page Giter Site logo

42sh's Introduction

42sh

Build Status Codacy Badge

FEATURES

  • Édition de ligne

    • Éditer la ligne à l’endroit où se trouve le curseur.
    • Déplacer le curseur vers la gauche et vers la droite.
    • Les flèches du haut et du bas pour naviguer dans l’historique.
    • Couper, copier et/ou coller tout ou partie d’une ligne. ctrl+K ctrl+B ctrl+P
    • Se déplacer par "mot" vers la gauche et vers la droite. ctrl+LEFT ctrl+RIGHT
    • Aller directement au début et à la fin d’une ligne. home end
    • Écrire ET éditer une commande sur plusieurs lignes.
    • Saut d’une ligne à l’autre. ctrl+UP ctrl+DOWN
    • Retour à la ligne partie parenthésée de la commande non refermée.
    • ctrl+D et ctrl+C dans l’édition de la ligne.
    • Gérer complètement les quotes et doubles quotes, (hors expansions).
  • Builtins

    • cd [-L|-P] [directory]
    • echo [string...]
    • exit [n]
    • env [-i] [name=value]... [utility [argument...]]
    • setenv
    • unsetenv
    • unset [-fv] name...
    • export [-p] name[=word]...
    • history
  • Exécution

    • Exécution de commandes avec leurs paramètres et gestion du PATH.
    • Gestion des erreurs et de la valeur de retour des commandes.
    • Les redirection suivantes : ">", ">>", "<".
    • Les pipes “|”.
    • Les opérateurs logiques "&&" et "||".
    • Les back quotes "‘".
    • Le séparateur ";".
  • Shell

    • Les variables locales.
    • Les inhibiteurs """ (double quote), "’" (simple quote) et "" (backslash).
  • Signaux

    • ctrl+D
    • ctrl+C
  • Bonus

    • Le heredoc "<<".
    • Complétion dynamique.
    • Le Job control, job, fg et bg, et l’operateur "&".
    • Les aggrégations de descripteurs de fichiers 2>&- etc.
    • Rechercher dans l’historique avec ctrl+R.
  • Structure

    • init
    • edit input
    • break input
    • parse input
    • word expansion
    • redirection
    • execution
    • wait

42sh's People

Contributors

lsimonne avatar m5oul avatar n0izn0iz avatar pilespin avatar zbtr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

42sh's Issues

Segv history

./42sh
entrée puis fleche haut

Program received signal SIGSEGV, Segmentation fault.
0x0000000000405784 in str_to_list (ed=0x60c338 <get_editor.ed>, str=0x0)
at srcs/read_input/event_callbacks/history.c:18
18 while (*str)

History print & \n

either leave the \n => change history_to_file & history_load + needs removing during substitution
or trim it

Toue ce qu'il y a dans la section 2 des mans

Qqun avait vu que dans les fonctions autorisée il y avait ça ????

EV_SET.2
FD_CLR.2
FD_COPY.2
FD_ISSET.2
FD_SET.2
FD_ZERO.2
_exit.2
accept.2
access.2
acct.2
adjtime.2
aio_cancel.2
aio_error.2
aio_read.2
aio_return.2
aio_suspend.2
aio_write.2
audit.2
auditctl.2
auditon.2
bind.2
brk.2
chdir.2
chflags.2
chmod.2
chown.2
chroot.2
clonefile.2
clonefileat.2
close.2
connect.2
connectx.2
creat.2
disconnectx.2
dup.2
dup2.2
exchangedata.2
execve.2
faccessat.2
fchdir.2
fchflags.2
fchmod.2
fchmodat.2
fchown.2
fchownat.2
fclonefileat.2
fcntl.2
fgetattrlist.2
fgetxattr.2
fhopen.2
flistxattr.2
flock.2
fork.2
fpathconf.2
fremovexattr.2
fsetattrlist.2
fsetxattr.2
fstat.2
fstat64.2
fstatat.2
fstatfs.2
fstatfs64.2
fsync.2
ftruncate.2
futimes.2
getattrlist.2
getattrlistat.2
getattrlistbulk.2
getaudit.2
getaudit_addr.2
getauid.2
getdirentries.2
getdirentriesattr.2
getdtablesize.2
getegid.2
getentropy.2
geteuid.2
getfh.2
getfsstat.2
getgid.2
getgroups.2
gethostuuid.2
getitimer.2
getlogin.2
getpeername.2
getpgid.2
getpgrp.2
getpid.2
getppid.2
getpriority.2
getrlimit.2
getrusage.2
getsid.2
getsockname.2
getsockopt.2
gettimeofday.2
getuid.2
getxattr.2
i386_get_ldt.2
i386_set_ldt.2
intro.2
ioctl.2
issetugid.2
kevent.2
kevent64.2
kevent_qos.2
kill.2
killpg.2
kqueue.2
lchown.2
link.2
linkat.2
listen.2
listxattr.2
lseek.2
lstat.2
lstat64.2
madvise.2
mincore.2
minherit.2
mkdir.2
mkdirat.2
mkfifo.2
mknod.2
mlock.2
mmap.2
mount.2
mprotect.2
msync.2
munlock.2
munmap.2
nanosleep.2
nfsclnt.2
nfssvc.2
open.2
openat.2
pathconf.2
pipe.2
poll.2
posix_madvise.2
posix_spawn.2
posix_spawnp.2
pread.2
profil.2
pselect.2
pthread_kill.2
pthread_setugid_np.2
pthread_sigmask.2
ptrace.2
pwrite.2
quotactl.2
read.2
readlink.2
readlinkat.2
readv.2
reboot.2
recv.2
recvfrom.2
recvmsg.2
removexattr.2
rename.2
renameat.2
renameatx_np.2
renamex_np.2
revoke.2
rmdir.2
sbrk.2
searchfs.2
select.2
sem_close.2
sem_open.2
sem_post.2
sem_trywait.2
sem_unlink.2
sem_wait.2
semctl.2
semget.2
semop.2
send.2
sendfile.2
sendmsg.2
sendto.2
setattrlist.2
setaudit.2
setaudit_addr.2
setauid.2
setegid.2
seteuid.2
setgid.2
setgroups.2
setitimer.2
setlogin.2
setpgid.2
setpgrp.2
setpriority.2
setregid.2
setreuid.2
setrlimit.2
setsid.2
setsockopt.2
settimeofday.2
setuid.2
setxattr.2
shm_open.2
shm_unlink.2
shmat.2
shmctl.2
shmdt.2
shmget.2
shutdown.2
sigaction.2
sigaltstack.2
sigblock.2
sigmask.2
sigpause.2
sigpending.2
sigprocmask.2
sigsetmask.2
sigstack.2
sigsuspend.2
sigvec.2
sigwait.2
socket.2
socketpair.2
stat.2
stat64.2
statfs.2
statfs64.2
symlink.2
symlinkat.2
sync.2
truncate.2
umask.2
undelete.2
unlink.2
unlinkat.2
unmount.2
utimes.2
vfork.2
wait.2
wait3.2
wait4.2
waitpid.2
write.2
writev.2

&& || associativity is bad

42sh

[n0iz@arch-vm ~/Projects/42sh]$ false && echo PASS || echo FAIL
PASS

sh

sh-4.4$ false && echo PASS || echo FAIL
FAIL

Make works CUnits test on macOS

To continue #20 discussion.
I want to make tests works on 42's macOS.

I installed automake:

brew install automake
Warning: automake-1.15 already installed

and it still doesn't works:

/Users/mazimi/projects/42sh/tests}-> make
BUILDING CUNIT:
tar -xf /Users/mazimi/projects/42sh/tests/CUnit-2.1-3.tar.bz2
cd /Users/mazimi/projects/42sh/tests/CUnit-2.1-3 && mv configure.in configure.ac
cd /Users/mazimi/projects/42sh/tests/CUnit-2.1-3 && aclocal
/bin/sh: aclocal: command not found
make: *** [/Users/mazimi/projects/42sh/tests/CUnit-2.1-3/install/lib/libcunit.a] Error 127

I will try to make it works on my GNU/Linux distro.

Prompt dynamique

Ce serait possible de faire un prompt modifiable dans le code ? Je peux le faire si c'est possible et que personne est déter'

Need test

need test for:
cd
setenv
unsetenv
get_variables_for_execution()
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.