shellclear icon indicating copy to clipboard operation
shellclear copied to clipboard

[Bug]: Errors immediately, fish, macos: "mapping values are not allowed in this context"

Open rmartine-ias opened this issue 2 years ago • 3 comments

What happened?

Installed v0.4.4 via brew. My shell is fish. Sourced, ran shellclear find. Exited 1 with no output.

What type of Operating System?

macOS

Steps to produce this issue.

$ shellclear --init-shell | source
$ shellclear --log TRACE find
[2022-09-15T22:17:03Z DEBUG shellclear::state] state folder found: "/Users/rmartine/.shellclear"
[2022-09-15T22:17:03Z DEBUG shellclear::shell] shell PowerShell not found

     _          _ _      _
 ___| |__   ___| | | ___| | ___  __ _ _ __
/ __| '_ \ / _ \ | |/ __| |/ _ \/ _` | '__|
\__ \ | | |  __/ | | (__| |  __/ (_| | |
|___/_| |_|\___|_|_|\___|_|\___|\__,_|_| 0.4.4
[2022-09-15T22:17:03Z DEBUG shellclear::engine] app config folder not found in path: /Users/rmartine/shellclear
[2022-09-15T22:17:03Z DEBUG shellclear::engine] clear history commands from path: /Users/rmartine/.bash_history, params: is clear: false
[2022-09-15T22:17:03Z DEBUG shellclear::engine] time elapsed to read history file: 505.625µs. found 500 commands
[2022-09-15T22:17:03Z DEBUG shellclear::engine] time elapsed for detect sensitive commands: 10.821583ms
[2022-09-15T22:17:03Z DEBUG shellclear::engine] clear history commands from path: /Users/rmartine/.zsh_history, params: is clear: false
[2022-09-15T22:17:03Z DEBUG shellclear::engine] time elapsed to read history file: 207.292µs. found 18 commands
[2022-09-15T22:17:03Z DEBUG shellclear::engine] time elapsed for detect sensitive commands: 143.667µs
[2022-09-15T22:17:03Z DEBUG shellclear::engine] clear history commands from path: /Users/rmartine/.local/share/fish/fish_history, params: is clear: false
[2022-09-15T22:17:03Z DEBUG shellclear] mapping values are not allowed in this context at line 2563 column 58

    Caused by:
        mapping values are not allowed in this context at line 2563 column 58

rmartine-ias avatar Sep 15 '22 22:09 rmartine-ias

@rmartine-ias, which fish version are you using? check the version by running the command fish --version

kaplanelad avatar Sep 17 '22 17:09 kaplanelad

@kaplanelad fish, version 3.5.1

rmartine-ias avatar Sep 19 '22 20:09 rmartine-ias

Having the same issue, it trips on : scp file 10.0.0.10: cat something | cut -d ' ' -f3 | sed "s/^/- ip : /g" curl -H "Host: something" https://10.0.0.10

It's unusable if you have curl with headers in your fish history.

Also, when I managed to make it work by cleaning 200k lines of history, the clear command rewrote my history file in a wrong format ...

fish, version 3.6.0

clmssz avatar Jun 14 '23 21:06 clmssz