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.
printenv | awk -F= '{k=$1; $1=""; print k,length() }' | sort -nrk2 | head
so we can see the longest variable values in your environment. – terdon Apr 04 '23 at 23:28fish_trace
environment variable to 1, fish will output the commands which are run, and you can figure out which one has too many arguments. – ridiculous_fish Apr 05 '23 at 00:15fish_trace
did not show any obvious errors. Thanks for the pointer. See my answer. Looks like it has to do withtide
. – chuckd833 Apr 05 '23 at 00:55