summaryrefslogtreecommitdiffstats
path: root/lsx.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lsx.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/lsx.c b/lsx.c
deleted file mode 100644
index cb016cf..0000000
--- a/lsx.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#include <dirent.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/stat.h>
-
-static void lsx(const char *dir);
-
-static int status = EXIT_SUCCESS;
-
-int
-main(int argc, char *argv[]) {
- int i;
-
- if(argc < 2)
- lsx(".");
- else for(i = 1; i < argc; i++)
- lsx(argv[i]);
- return status;
-}
-
-void
-lsx(const char *dir) {
- char buf[PATH_MAX];
- struct dirent *d;
- struct stat st;
- DIR *dp;
-
- for(dp = opendir(dir); dp && (d = readdir(dp)); errno = 0)
- if(snprintf(buf, sizeof buf, "%s/%s", dir, d->d_name) < (int)sizeof buf
- && access(buf, X_OK) == 0 && stat(buf, &st) == 0 && S_ISREG(st.st_mode))
- puts(d->d_name);
-
- if(errno != 0) {
- status = EXIT_FAILURE;
- perror(dir);
- }
- if(dp)
- closedir(dp);
-}
r' /> BanceDev 1-5/+26 2024-09-09added support for init.lua for configuring shellGravatar BanceDev 8-38/+180 2024-09-09docs: update pathGravatar Christopher Lane 1-1/+1 Updated the path to the example script and fixed a typo in the readme 2024-09-08added getenv and putenv to Lua APIGravatar BanceDev 2-5/+33 fixed bug where terminal closed upon encountering Lua error 2024-09-08added lua api functions for indexing historyGravatar BanceDev 2-0/+35 2024-09-08added support for cli args for lua scriptsGravatar BanceDev 4-3/+28 2024-09-07added --version flagGravatar BanceDev 1-1/+9 2024-09-07fixed error in install.sh instructionsGravatar BanceDev 1-1/+1 2024-09-07fixed bug with cursor alignment when adding text within the bufferGravatar BanceDev 1-1/+11 2024-09-06added API guide to readmeGravatar BanceDev 1-1/+5 2024-09-06Update README.mdGravatar Lance Borden 1-1/+1 2024-09-06better readmeGravatar BanceDev 2-2/+14