- unquoted * ? and [...] (including [!...]) are expanded to the
matching file names, sorted, per path component
- hidden files only match if the pattern starts with a dot, a trailing /
only matches directories, a pattern without match is kept as is
- quoted or escaped characters and values of variables are never
expanded
- redirections to a pattern must match exactly one file
- completion escapes * ? [ and $ in file names
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- tokenizer recognizes unquoted |, <, >, >>, N>, N>>, N>&M, N<&M,
&> and &>>; only a word of unquoted digits is a file descriptor
- pipelines run concurrently, the status is the one of the last command,
errors of earlier stages are printed
- redirections are applied left to right (fds 0-2), a redirection
without a command creates/truncates the file
- pwd and help can be redirected and piped; cd, set, export, exit and
quit are rejected in pipelines
- syntax errors have exit status 2
- completion: commands after |, ;, && and ||, files after redirections;
operator characters are escaped in completed names
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- split input at unquoted ;, && and || and run the commands like sh;
variables are expanded per command when it runs
- $? and ${?} expand to the exit status of the last command,
exit/quit without argument use it
- syntax errors for missing commands around operators (status 2)
- "command not found" message instead of the raw exec error, no more
"exit status N" message when a command fails
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- gosh -c 'command' runs the command and exits, so gosh works as login
shell for ssh host command, scp and rsync
- gosh script runs a script file, lines starting with # are skipped
- without a terminal, commands are read from stdin (byte by byte, so
started commands can read the rest of stdin)
- the exit status is the one of the last command (127 not found,
126 not executable, 128+n killed by signal n)
- -i forces interactive mode, -l/--login is accepted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- add -version flag (besides --version and -V)
- help output includes the version
- commit and branch are set via ldflags by goreleaser; plain go build
falls back to the VCS revision embedded by Go
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GOSH_COLORS='user=..:root=..:path=..' with ANSI SGR codes,
empty value disables the color for that part
- only digits and ';' are accepted, invalid entries are ignored
- read before every prompt, so 'set GOSH_COLORS=...' takes effect immediately
- document in help and README, including example color schemes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- user@host in bold green (bold red for root), directory in bold blue
- colors are disabled with NO_COLOR, TERM=dumb or when stdout is not a terminal
- parts are sanitized before adding the color codes
- only replace the home directory with ~ on a path boundary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- build static binaries for linux, darwin and freebsd
- create deb and rpm packages that register gosh in /etc/shells
- publish releases to Gitea
- add --version flag, set at build time via ldflags
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>