Recent activity

Re: [PATCH] Add hash builtin. 4 months ago

From Dragnel to ~emersion/mrsh-dev

On Saturday 18 May 2019 18:22, Simon Ser <contact@emersion.fr> wrote:
    

>     All in all, I wonder if it's worth it to support hash at all. We could
>     simply have a dumb implementation that always reports nothing (since
>     the format isn't specified, this is okay) and never saves anything.
>     Then we could do some benchmarks and see if it's really worth it to add
>     it.
>     

>     What do you think?
Maybe we can keep the output just to act like dash or others but
don't use it when we want to exec some command.
And if we have some valuable benchmarks and all the case are

[PATCH] Add hash builtin. 5 months ago

From dragnel to ~emersion/mrsh-dev

---
 builtin/builtin.c    |  1 +
 builtin/command.c    |  1 +
 builtin/hash.c       | 47 ++++++++++++++++++++++++++++++++++++++++++++
 include/builtin.h    |  1 +
 include/mrsh/shell.h |  1 +
 meson.build          |  1 +
 shell/path.c         |  7 +++++++
 test/hash.sh         | 10 ++++++++++
 test/meson.build     |  1 +
 9 files changed, 70 insertions(+)
 create mode 100644 builtin/hash.c
 create mode 100644 test/hash.sh
[message trimmed]

[PATCH v4] Add command -v builtin. 5 months ago

From dragnel to ~emersion/mrsh-dev

---

I've already rebased with git pull; git rebase master mybranch.
The tests are passing, and history shows
56a63e1 (HEAD -> features) Add command -v builtin.
57e0022 (origin/master, origin/HEAD, master) Fix builtins I/O redirections
what is wrong ?

 builtin/builtin.c |  1 +
 builtin/command.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++
 include/builtin.h |  1 +
 meson.build       |  1 +
 test/command.sh   | 25 +++++++++++++++
 test/meson.build  |  1 +
[message trimmed]

[PATCH v4] Add command -v builtin. 5 months ago

From dragnel to ~emersion/mrsh-dev

---
 builtin/builtin.c |  1 +
 builtin/command.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++
 include/builtin.h |  1 +
 meson.build       |  1 +
 test/command.sh   | 26 +++++++++++++++
 test/meson.build  |  1 +
 6 files changed, 110 insertions(+)
 create mode 100644 builtin/command.c
 create mode 100644 test/command.sh

diff --git a/builtin/builtin.c b/builtin/builtin.c
index 48b4f0e..aaeac2b 100644
--- a/builtin/builtin.c
[message trimmed]

[PATCH] upd git 5 months ago

From dragnel to ~dragnel/email-test-workflow

---
 config/.gitconfig | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/config/.gitconfig b/config/.gitconfig
index acf0a9a..6db6203 100644
--- a/config/.gitconfig
+++ b/config/.gitconfig
@@ -1,13 +1,19 @@
+[core]
+    editor = "nvim"
+    excludesfile = ~/.config/git/ignore
+
 [user]
[message trimmed]

[PATCH] add nvim 5 months ago

From dragnel to ~dragnel/email-test-workflow

---
 config/.config/nvim/init.vim | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 config/.config/nvim/init.vim

diff --git a/config/.config/nvim/init.vim b/config/.config/nvim/init.vim
new file mode 100644
index 0000000..e69de29
-- 
2.17.1

Re: [PATCH v3] Add command -v builtin. 5 months ago

From Dragnel to ~emersion/mrsh-dev

I still have issue with the test, I removed the -e but I think there is a thing with stdout and stderr.

$ ninja test -C build
...
--- stderr ---
Running with mrsh
Running with reference shell
/home/xant0me/dev/mrsh/test/./command.sh: mismatch

mrsh: 0
exists if 0
exits cd 0
exists ls 0
exists ll 0

Re: [PATCH v3] Add command -v builtin. 5 months ago

From Dragnel to ~emersion/mrsh-dev

What is this style, gnu ? Maybe I can add an option in vim to force the style. It will be easier to me because this style is completly unnatural to me. I didn't see any guidelines either. Do you plan to add one ?

> Using -e makes us exit when a command fails. The last`command` call fails.
> Since we print all return codes anyway, I'd just remove it.
> This makes us exit with 127, while bash exits with 1. POSIX says to exit with
> a non-zero code. We should just compare $? with zero instead.

Ok this explains everything.

[PATCH v3] Add command -v builtin. 5 months ago

From dragnel to ~emersion/mrsh-dev

---
Hi, thx for review.
I have a little problem through, test is passing only if I remove
the echos in test/command.sh

 builtin/builtin.c |  1 +
 builtin/command.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++
 include/builtin.h |  1 +
 meson.build       |  1 +
 test/command.sh   | 20 ++++++++++++
 test/meson.build  |  1 +
 6 files changed, 101 insertions(+)
 create mode 100644 builtin/command.c
 create mode 100644 test/command.sh
[message trimmed]

[PATCH v2] Add command -v builtin. 6 months ago

From dragnel to ~emersion/mrsh-dev

---
 builtin/builtin.c |   1 +
 builtin/command.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++
 include/builtin.h |   1 +
 meson.build       |   1 +
 test/command.sh   |  20 +++++++++
 5 files changed, 135 insertions(+)
 create mode 100644 builtin/command.c
 create mode 100644 test/command.sh

diff --git a/builtin/builtin.c b/builtin/builtin.c
index 0f0c563..20ed598 100644
--- a/builtin/builtin.c
[message trimmed]