3

I keep getting an error when I cd to my project root directory that is on github:

> cd ~/go/src/github.com/mygithub/myapp

The below message auto pops up because I am using tide prompt which links with github status.

> exec: Failed to execute process '/usr/bin/git': An argument or exported variable exceeds the OS argument length limit.

I don't have many args in my fish_path

❯ echo $PATH

/opt/flutter/bin /opt/flutter /usr/bin /home/chris/go /home/chris/go/bin /usr/lib/go /usr/local/sbin /usr/local/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl
❯ cat config.fish

if status is-interactive
    # Commands to run in interactive sessions can go here
end

abbr --add cl clear
abbr --add goapp cd /home/chris/go/src/github.com/mygithub/

fish_add_path /usr/lib/go
fish_add_path /home/chris/go/bin
fish_add_path /home/chris/go
fish_add_path /usr/bin  
fish_add_path /opt/flutter
fish_add_path /opt/flutter/bin
fish_add_path /usr/bin/flutter
fish_add_path /usr/bin/ninja

I don't have the set -U... line in my .config file as indicated by a similar issue on github fish/issues.

How do I fix this?

EDIT:

❯ printenv | awk -F= '{k=$1; $1=""; print k,length() }' | sort -nrk2 | head
LS_COLORS 1754
PATH 175
SESSION_MANAGER 68
GIO_LAUNCHED_DESKTOP_FILE 42
ALACRITTY_SOCKET 39
INVOCATION_ID 33
DBUS_SESSION_BUS_ADDRESS 29
ALACRITTY_LOG 25
XAUTHORITY 24
MAIL 22
❯ uname -r

6.2.8-arch1-1-surface
❯ fish -v
fish, version 3.6.1

EDIT:

:- ~ ──────────────────────────────────────────────────────────────────────────────────────────────
❯ set fish_trace 1

:- ~ ──────────────────────────────────────────────────────────────────────────────────────────────
❯ cd go/src/github.com/chuckd853/fabric/frontend/client_app/
> cd go/src/github.com/chuckd853/fabric/frontend/client_app/
--> set -l MAX_DIR_HIST 25
--> if
---> count go/src/github.com/chuckd853/fabric/frontend/client_app/
---> test go/src/github.com/chuckd853/fabric/frontend/client_app/ = --
---> echo 1
--> test 1 -gt 1
--> end if
--> if
--> status --is-command-substitution
--> end if
--> set -l previous /home/chris
--> if
--> test go/src/github.com/chuckd853/fabric/frontend/client_app/ = -
--> end if
--> cd go/src/github.com/chuckd853/fabric/frontend/client_app/
--> set -l cd_status 0
--> if
--> test 0 -eq 0 -a /home/chris/go/src/github.com/chuckd853/fabric/frontend/client_app != /home/chris
---> set -q dirprev
---> set -l dirprev
---> set -q 'dirprev[25]'
---> set -U -q dirprev
---> set -g -a dirprev /home/chris
---> set -U -q dirnext
---> set -e dirnext
---> set -U -q __fish_cd_direction
---> set -g __fish_cd_direction prev
--> end if
--> return 0

:- ~/go/src/github.com/chuckd853/fabric/frontend/client_app ───────────────────────────────────────
❯ exec: Failed to execute process '/usr/bin/git': An argument or exported variable exceeds the OS argument length limit.

-: ~/go/src/github.com/chuckd853/fabric/frontend/client_app : gitmain ─────────────────────── ⬢ 19.8.1
❯

If I hit return on the bottom line teh error message repeats. The gitmain part reads the github status as part of tide prompt.

I repeated in bash and everything worked. I removed the tide prompt:

fisher install IlanCosman/tide@v5

and everything works....

I reinstalled tide and the problem reappeared.

Looks like it is a either a tide issue or something in my tide config. I will follow up with them on github.

Thanks all for your time.

3
  • Please edit your question and tell us what command produces the error. Also, please add the output of printenv | awk -F= '{k=$1; $1=""; print k,length() }' | sort -nrk2 | head so we can see the longest variable values in your environment.
    – terdon
    Commented Apr 4, 2023 at 23:28
  • If you set the fish_trace environment variable to 1, fish will output the commands which are run, and you can figure out which one has too many arguments. Commented Apr 5, 2023 at 0:15
  • fish_trace did not show any obvious errors. Thanks for the pointer. See my answer. Looks like it has to do with tide.
    – chuckd833
    Commented Apr 5, 2023 at 0:55

2 Answers 2

1

I repeated the steps to create the error in bash and there was no error. I removed the tide prompt:

fisher remove IlanCosman/tide@v5

and re-ran the steps in FISH and everything worked

I reinstalled tide, re-ran the cd to/project/dir and the problem reappeared.

Looks like it is a either a tide issue or something in my tide config. I will follow up with them on github.

Thanks all for your time.

1

It's a bug in the tide prompt: https://github.com/IlanCosman/tide/issues/394

Fixed a week ago, so I'm assuming the fix hasn't made it to your system yet (for which tide may need to make a release?)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .