{"id":25268266,"url":"https://github.com/gabrieldiem/shell-with-history","last_synced_at":"2026-05-06T04:32:43.354Z","repository":{"id":276700120,"uuid":"930014370","full_name":"gabrieldiem/shell-with-history","owner":"gabrieldiem","description":" A bash-like shell implementation in C11 (plus POSIX.1-2008) using Linux syscalls, with command history, built-in commands and IO redirection with pipes","archived":false,"fork":false,"pushed_at":"2025-02-09T22:49:08.000Z","size":263,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T04:19:38.736Z","etag":null,"topics":["7508","c","c11","clang","fiuba","io-redirection","linux","pipes","posix","shell","shell-history"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabrieldiem.png","metadata":{"files":{"readme":"README.md","changelog":"history.c","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-09T22:42:44.000Z","updated_at":"2025-02-09T22:48:54.000Z","dependencies_parsed_at":"2025-02-09T23:36:36.140Z","dependency_job_id":null,"html_url":"https://github.com/gabrieldiem/shell-with-history","commit_stats":null,"previous_names":["gabrieldiem/shell-with-history"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gabrieldiem/shell-with-history","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrieldiem%2Fshell-with-history","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrieldiem%2Fshell-with-history/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrieldiem%2Fshell-with-history/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrieldiem%2Fshell-with-history/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabrieldiem","download_url":"https://codeload.github.com/gabrieldiem/shell-with-history/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrieldiem%2Fshell-with-history/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32678611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["7508","c","c11","clang","fiuba","io-redirection","linux","pipes","posix","shell","shell-history"],"created_at":"2025-02-12T10:24:29.772Z","updated_at":"2026-05-06T04:32:43.336Z","avatar_url":"https://github.com/gabrieldiem.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shell\n\nRepositorio para el esqueleto del [TP: shell](https://fisop.github.io/website/tps/shell) del curso Mendez-Fresia de **Sistemas Operativos (7508) - FIUBA**\n\n## Integrantes\n\n- Victoria Avalos - 108434\n- Julieta Perez Goldstein - 107997\n- Walter Gabriel Diem - 105618\n- Gonzalo Ranzani - 105933\n\n## Challenge resuelto: HISTORY\n\nFeatures soportadas:\n\n- Comando `history [n]` con `n` siendo el argumento opcional para imprimir los últimos _n_ comandos, y si se ejecuta sin argumentos opcionales, es decir, sólo `history`, se imprimen todos los comandos del historial.\n- Las teclas \u003ckbd\u003e↑\u003c/kbd\u003e (arrow up) y \u003ckbd\u003e↓\u003c/kbd\u003e (arrow down) para moverse entre los comandos del historial y simplemente presionar enter para re-ejecutarlos.\n- La tecla \u003ckbd\u003eBackspace\u003c/kbd\u003e para borrar comandos de hasta una línea de largo.\n- La combinación de teclas \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eD\u003c/kbd\u003e termina la ejecución de la shell.\n- Variable de entorno `HISTFILE`. Por defecto, al iniciar la shell, esta variable apunta al path resuelto del path `~/.fisop_history`. Se expande como otras variables ejecutando, por ejemplo, `echo $HISTFILE`. Para cambiar su valor se puede ejecutar `HISTFILE=./.new_histfile history 2`, como si se tratara de una variable temporaria. Si `~/.fisop_history` no existe, se crea al iniciar la shell, si existiese, se cargan todos los comandos para poder seguir usando comandos de una sesión anterior. Este archivo usa el formato estándar para guardar comandos de historial, es decir, el comando seguido de un salto de línea y nada más. Cada vez que se ejecuta un comando, este se guarda en el historial.\n- Designadores de eventos `!!` y `!-n`. Donde al escribir `!!` y presionar la tecla \u003ckbd\u003eEspacio\u003c/kbd\u003e o \u003ckbd\u003eTab\u003c/kbd\u003e, se reemplaza por el último comando ejecutado, o no se reemplaza por nada si el historial está vacío. Análogamente, al escribir `!-n` y presionar \u003ckbd\u003eEspacio\u003c/kbd\u003e o \u003ckbd\u003eTab\u003c/kbd\u003e pero con el comando correspondiente a retroceder _n_ comandos hacia atrás.\n\n## Respuestas teóricas\n\nUtilizar el archivo `shell.md` provisto en el repositorio\n\n## Compilar\n\n```bash\nmake\n```\n\n## Pruebas\n\n- Ejecutar todas las pruebas\n\n```bash\nmake test\n```\n\n- Ejecutar una **única** prueba\n\n```bash\nmake test-TEST_NAME\n```\n\nPor ejemplo:\n\n```bash\nmake test-env_empty_variable\n```\n\nCada identificador de una prueba se muestra entre paréntesis `(TEST_NAME)` al lado de cada _test_ cuando se ejecutan todas las pruebas.\n\n```\n=== Temporary files will be stored in: /tmp/tmp0l10br1k-shell-test ===\n\nPASS 1/26: cd . and cd .. work correctly by checking pwd (no prompt) (cd_back)\nPASS 2/26: cd works correctly by checking pwd (no prompt) (cd_basic)\nPASS 3/26: cd with no arguments takes you home (/proc/sys :D) (cd_home)\nPASS 4/26: empty variables are not substituted (env_empty_variable)\n...\n```\n\n## Ejecutar\n\n```bash\n./sh\n```\n\n## Linter\n\n```bash\nmake format\n```\n\nPara efectivamente subir los cambios producidos por `make format`, hay que hacer `git add .` y `git commit`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrieldiem%2Fshell-with-history","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrieldiem%2Fshell-with-history","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrieldiem%2Fshell-with-history/lists"}