if that wait is interrupted by a trapped signal. A later wait for the
same pid would return status 127 (process not found) even though the
process was still running (and still in bash's jobs table).
This was a bug introduced in bash 5.1 (does not occur in 5.0 or earlier).
This patch should be removed when bash is next updated (to 5.2 or beyond)
(the change will be in the bash codebase) or if a patch is released from
upstream to fix this problem.
PGKREVISION++
{ This change is not significant enough to warrant an entry in doc/CHANGES. }
The new patches:
Patch 5: Fix memory leaks when using assigning arrays using ...
Patch 6: Use correct process group for command substitution processes
Patch 7: Fix readline version checking in inputrc files
Patch 8: Clean up FIFOs used for process substitutions properly
- This is oksh-6.9, matching ksh(1) from OpenBSD 6.9 with portability
additions.
From the OpenBSD 6.9 changelog:
- Fixed ksh(1) redrawing of a multiline PS1 prompt in vi mode and added
support for ^R (redraw) in insert mode.
Changelog from AN-2021-01-05:
- Bourne Shell: When we introduced ${.sh.path} in February 2020, we did
use the "new" and POSIX-only function realpath() that is not present
on e.g. Ultrix. We now use abspath() from libschily if realpath() is
missing.
Note that abspath() is better than realpath(), as it supports path
names longer than PATH_MAX, but since ${.sh.path} is only used to
return the absolute pathname for the current shell binary, this is
not a problem and on the other side, we can avoid linking against
libschily this way, so shell scripting with lazy linking is faster
since less libraries need to be linked at startup.
Changelog from AN-2021-04-21:
- Bourne Shell: gmatch.c: The new version no longer aborts with an
illegal multi byte sequence as "no match". As a result, the "*"
now again matches any filename - even if the filename contains an
illegal multi-byte sequence. This is a problem that did not exist
on the original Bourne Shell from Solaris that used gmatch() from
the AT&T libgen, but since we added our private portable gmatch.c.
to get better portability.
Thanks to Stephane Chazelas for reporting the problem related to
multi-byte to wide character conversion and illegal multi byte
sequences in the case statement and filesystem globbing.
- Bourne Shell: word.c::readwc() no longer uses prwc() but rather
a loop on the original multi-byte stream to print the "set -v"
output. This permits to output the original input data in any
case instead of stumbling over illegal multi-byte sequences.
Thanks to Stephane Chazelas for reporting the general problem
with input byte sequences that cause an EILSEQ error.
- Bourne Shell: struct fileblk now remembers lastwc and the related
input string as fileblk->mbs[] in order to avoid incorrect
conversions via wctomb() in case that the input wide char was a
result from an EILSEQ conversion and thus has no related multi
byte string.
An important visible result of that change is that input read
by the builtin command read(1) correctly forwards input that
caused an EILSEQ error.
It could not be verified whether this covers all possible similar
cases, but it is at least very close to a completely correct
solution.
Thanks to Stephane Chazelas for reporting the general problem
with input byte sequences that cause an EILSEQ error.
- Bourne Shell: xec.c: Cstyle changes
- Bourne Shell: the Copyright messages now mention 2021
Changelog from AN-2021-01-05:
- Bourne Shell: When we introduced ${.sh.path} in February 2020, we did
use the "new" and POSIX-only function realpath() that is not present
on e.g. Ultrix. We now use abspath() from libschily if realpath() is
missing.
Note that abspath() is better than realpath(), as it supports path
names longer than PATH_MAX, but since ${.sh.path} is only used to
return the absolute pathname for the current shell binary, this is
not a problem and on the other side, we can avoid linking against
libschily this way, so shell scripting with lazy linking is faster
since less libraries need to be linked at startup.
Changelog from AN-2021-04-21:
- Bourne Shell: gmatch.c: The new version no longer aborts with an
illegal multi byte sequence as "no match". As a result, the "*"
now again matches any filename - even if the filename contains an
illegal multi-byte sequence. This is a problem that did not exist
on the original Bourne Shell from Solaris that used gmatch() from
the AT&T libgen, but since we added our private portable gmatch.c.
to get better portability.
Thanks to Stephane Chazelas for reporting the problem related to
multi-byte to wide character conversion and illegal multi byte
sequences in the case statement and filesystem globbing.
- Bourne Shell: word.c::readwc() no longer uses prwc() but rather
a loop on the original multi-byte stream to print the "set -v"
output. This permits to output the original input data in any
case instead of stumbling over illegal multi-byte sequences.
Thanks to Stephane Chazelas for reporting the general problem
with input byte sequences that cause an EILSEQ error.
- Bourne Shell: struct fileblk now remembers lastwc and the related
input string as fileblk->mbs[] in order to avoid incorrect
conversions via wctomb() in case that the input wide char was a
result from an EILSEQ conversion and thus has no related multi
byte string.
An important visible result of that change is that input read
by the builtin command read(1) correctly forwards input that
caused an EILSEQ error.
It could not be verified whether this covers all possible similar
cases, but it is at least very close to a completely correct
solution.
Thanks to Stephane Chazelas for reporting the general problem
with input byte sequences that cause an EILSEQ error.
- Bourne Shell: xec.c: Cstyle changes
- Bourne Shell: the Copyright messages now mention 2021
fish 3.2.2 (released April 7, 2021)
====================================
This release of fish fixes a number of additional issues identified in the fish 3.2 series:
- The command-not-found handler used suggestions from ``pacman`` on Arch Linux, but this caused major slowdowns on some systems and has been disabled (:issue:`7841`).
- fish will no longer hang on exit if another process is in the foreground on macOS (:issue:`7901`).
- Certain programs (such as ``lazygit``) could create situations where fish would not receive keystrokes correctly, but it is now more robust in these situations (:issue:`7853`).
- Arguments longer than 1024 characters no longer trigger excessive CPU usage on macOS (:issue:`7837`).
- fish builds correctly on macOS when using new versions of Xcode (:issue:`7838`).
- Completions for ``aura`` (:issue:`7865`) and ``tshark`` (:issue:`7858`) should no longer produce errors.
- Background jobs no longer interfere with syntax highlighting (a regression introduced in fish 3.2.1, :issue:`7842`).
If you are upgrading from version 3.1.2 or before, please also review the release notes for 3.2.1 and 3.2.0 (included below).
fish 3.2.1 (released March 18, 2021)
====================================
This release of fish fixes the following problems identified in fish 3.2.0:
- Commands in key bindings are run with fish's internal terminal modes, instead of the terminal modes typically used for commands. This fixes a bug introduced in 3.2.0, where text would unexpectedly appear on the terminal, especially when pasting (:issue:`7770`).
- Prompts which use the internal ``__fish_print_pipestatus`` function will display correctly rather than carrying certain modifiers (such as bold) further than intended (:issue:`7771`).
- Redirections to internal file descriptors is allowed again, reversing the changes in 3.2.0. This fixes a problem with Midnight Commander (:issue:`7769`).
- Universal variables should be fully reliable regardless of operating system again (:issue:`7774`).
- ``fish_git_prompt`` no longer causes screen flickering in certain terminals (:issue:`7775`).
- ``fish_add_path`` manipulates the ``fish_user_paths`` variable correctly when moving multiple paths (:issue:`7776`).
- Pasting with a multi-line command no longer causes a ``__fish_tokenizer_state`` error (:issue:`7782`).
- ``psub`` inside event handlers cleans up temporary files properly (:issue:`7792`).
- Event handlers declared with ``--on-job-exit $fish_pid`` no longer run constantly (:issue:`7721`), although these functions should use ``--on-event fish_exit`` instead.
- Changing terminal modes inside ``config.fish`` works (:issue:`7783`).
- ``set_color --print-colors`` no longer prints all colors in bold (:issue:`7805`)
- Completing commands starting with a ``-`` no longer prints an error (:issue:`7809`).
- Running ``fish_command_not_found`` directly no longer produces an error on macOS or other OSes which do not have a handler available (:issue:`7777`).
- The new ``type`` builtin now has the (deprecated) ``--quiet`` long form of ``-q`` (:issue:`7766`).
It also includes some small enhancements:
- ``help`` and ``fish_config`` work correctly when fish is running in a Chrome OS Crostini Linux VM (:issue:`7789`).
- The history file can be made a symbolic link without it being overwritten (:issue:`7754`), matching a similar improvement for the universal variable file in 3.2.0.
- An unhelpful error ("access: No error"), seen on Cygwin, is no longer produced (:issue:`7785`).
- Improvements to the ``rsync`` completions (:issue:`7763`), some completion descriptions (:issue:`7788`), and completions that use IP address (:issue:`7787`).
- Improvements to the appearance of ``fish_config`` (:issue:`7811`).
If you are upgrading from version 3.1.2 or before, please also review
the release notes for 3.2.0 (included below).
pkgsrc changes:
* Stop pretending that share/bash-completion.d is supported, it isn't.
Packages that are installing files there should install them into
share/bash-completion/completions instead.
* Stop installing profile.d script, only really makes sense under /etc,
and it wasn't correctly handled as a configuration file anyway.
bash-completion (2.11)
[ Alexander Meshcheryakov ]
* _known_hosts_real: check that ruptime is present before calling
(#390)
[ Andrew Gaul ]
* totem: reuse kaffeine completions (#372)
[ Damien Nadé ]
* __reassemble_comp_words_by_ref: avoid triggering nounset on
indirect references
[ Felix Lechner ]
* lintian: complete paths for Ubuntu's .ddeb and Debian's buildinfo
files (#397)
[ Felix Yan ]
* ip: complete route add table arg
* ip: style fixes similar to ip-netns
* ip: add more completions for ip-rule
* ip: add support for netns (#391)
* ip: improve completion of route subcommands (#326)
[ Hans-Christoph Steiner ]
* unzip, zipinfo: complete *.aar (#428)
[ Jakub Jelen ]
* ssh: add new -Q completions in OpenSSH 8.2p1 (#400)
[ Kevin Locke ]
* python: support executables with minor version (#389)
[ Michal Suchánek ]
* insmod, modinfo, modprobe: support xz compressed modules (#401)
[ Phan Duc Nhat Minh ]
* tshark: complete -r arg with all filenames (#422)
[ Sebastian Jakubiak ]
* openssl: update -starttls completions (#403)
* _filedir*: update link to bug-bash discussion on -X (#404)
* test/python: add testcase for submodule completion
[ Ville Skyttä ]
* Release 2.11
* extra/make-changelog: check and output usage message
* pre-commit: anchor exclude patterns
* pytest: rewrite in bash, support toplevel funcs, avoid nondef ones
and classes
* test/xfreerdp: skip --help failure cases
* test/tshark: fix multiple -O completion with no http2 support
* test/ant: avoid complete-ant-cmd.pl interference with ANT_ARGS
* _xinetd_services: avoid nounset error on bash 4.2
* pre-commit: upgrade isort to 5.1.4
* pre-commit: upgrade pyupgrade to 2.7.2
* pre-commit: add pyupgrade, run it
* test/ant: gitignore all target cache files
* _known_hosts_real: exclude Host negations
* pre-commit: upgrade isort to 5.0.7
* pre-commit: update shellcheck-py URL
* test/inputrc: do not set print-completions-horizontally
* test/inputrc: comment typo fix
* pytest: complete async test class methods
* __get_cword_at_cursor_by_ref: fix regression on bash 4.2
* test: upgrade markdownlint-cli to 0.23.2
* _known_hosts_real: avoid errors in nounset mode on Ubuntu 14 and
16
* _longopt: exclude too many dashes, allow underscores, require ends
with alnum
* _included_ssh_config_files: support globs
* _known_hosts_real: prevent unwanted pathname expansion on host
entries
* test/shfmt: upgrade to 3.1.2, reformat with it
* test/_known_hosts_real: add explicit no globbing test case
* test: upgrade mypy to 0.782
* CONTRIBUTING.md: add posix and nounset mode item
* test: upgrade mypy to 0.781
* test: upgrade perltidy to 20200619
* _known_hosts_real: fix completion of Host entries after a wildcard
etc
* _known_hosts_real: fix # handling in ssh configs
* test: upgrade flake8 to 3.8.3
* test/xhost: multiple expected result handling fixes
* test/slapt-src: single expected result handling fixes
* test: partial hostname completion fixes
* test: simplify completion parsing
* test/dpkg-query: mark as xfail on non-Debian based systems
* .gitignore: clean up some no longer needed ignores
* test/lspci: skip -A arg test if lspci fails -A help, e.g. busybox
lspci
* test: regex escape our magic mark for completeness
* test: upgrade mypy to 0.780
* test/_known_hosts_real: don't modify class scoped base expected
list
* test/_known_hosts_real: reset COMP_KNOWN_HOSTS_WITH_HOSTFILE
between tests
* test/_known_hosts_real: tolerate duplicates
* bash_completion: trivial cleanups
* gcc: avoid errors in nounset mode
* pytest: fix test class method completion with BSD awk
* man, mutt: avoid errors in nounset mode on Ubuntu 14 and 16
* java, make: avoid errors in nounset mode on Ubuntu 14 and 16
* README: document GNU make build requirement
* pytest: add test class method completion
* _known_hosts: avoid errors in nounset mode and no arguments
* bash_completion: fix array set checks with empty elements in them
* *: avoid more errors in nounset mode
* cfrun: fix $hostfile leak
* _command_offset, route: cleanups
* *: avoid more errors in nounset mode
* qemu: add -machine arg completion
* qemu, sbopkg: avoid unintentional globbing on option arg
completions
* test: enable shellcheck SC2035
* *: drop support for bash 4.1
* _init_completion: fix unassigned redirect completion in nounset
mode
* ip: route shfmt, arithmetic evaluation
* _filedir: avoid unbound variable error on Ubuntu 14 and 16
* _pids, _pgids, _pnames: improve shfmt formatting
* scp, sftp, ssh: fix completion on options bundled with -4/-6
* modprobe, tshark, _included_ssh_config_files: use [[ ]] instead of
[ ]
* test/runLint: warn about [ ] instead of [[ ]] use
* test: skip various tests if we don't get a useful usage message
* *: mark nounset mode as supported, issues with it are bugs now
* *: avoid more errors in nounset mode
* *: avoid more errors in nounset mode
* *: avoid more errors in nounset mode
* test/inputrc: comment and whitespace tweaks
* *: avoid more errors in nounset mode
* test/unit: sort files included in dist
* test/unit: include test_unit_known_hosts_real.py in dist
* bash_completion: line wrapping tweaks, NFC
* 7z: fix -o/-w attached arg completion
* postfix: try to arrange a fake tty so we can tickle the usage
message out
* _bashcomp_try_faketty: new function to try running command with a
fake tty
* mr: avoid herestrings, simplify command parsing
* test/mr: handle missing "clean" with skipif
* test: mark known non-ASCII issues with test suite as xfail
* dpkg-deb: add --raw-extract and -X arg completions
* test: add some dpkg-query test cases
* dpkg-deb: fix --show/-W completion
* test: upgrade markdownlint-cli to 0.23.1
* *: use more arithmetic evaluation
* test: try harder to restore environment and cwd on failures
* *: use $ifs for storing/restoring $IFS
* test/irb: xfail options test if --help is not available
* test: upgrade flake8 to 3.8.1
* test: pre-commit config cleanups, ordering
* test: upgrade pre-commit to 2.4.0+, drop shfmt kludge
* test: sync shfmt and shellcheck configs
* test: shfmt bashrc
* test: remove unused run-shellcheck, shellcheck is in pre-commit
now
* test: remove old test suite code no longer used \o/
* test/_known_hosts_real: port remaining test cases to
pytest+pexpect
* test: remove more no longer needed old test suite code
* test/_known_hosts_real: port more test cases to pytest+pexpect
* test/_get_cword: port remaining test case to pytest+pexpect
* test: replace some echos with printfs
* test/_filedir: fix shutil.rmtree on Python < 3.6
* test/_expand: port remaining test cases to pytest+pexpect
* test: drop some no longer needed old test suite code
* test/_filedir: port remaining test cases to pytest+pexpect
* test: run all Travis jobs on dist: bionic
* test: drop not needed sudo on Travis
* test/_filedir: port more test cases to pytest+pexpect
* test/__expand_tilde_by_ref: port remaining test cases to
pytest+pexpect
* test/_get_comp_words_by_ref: convert remaining test cases to
pytest+pexpect
* test: run pytest --verbose in docker
* lftp: use "bookmark list" command to list bookmarks
* test: drop some no longer needed old test suite code
* test/slapt-src: convert remaining test case to pytest+pexpect
* _xfunc: simplify
* apt-cache: avoid nonzero exit code from _apt_cache_packages
* test/slapt-get: convert remaining test case to pytest+pexpect
* test/secret-tool: add to test command list
* test/scp: port remaining test case to pytest+pexpect
* test/umount: convert remaining test case to pytest+pexpect
* secret-tool: new completion
* apt-get: complete build-dep with dirs
* travis: use golang 1.14 for shfmt
* *: run all shell code through shfmt -s
* pre-commit etc: add shfmt
* test: fix incorrect fixtures/shared/default xfails/expectations
* test: upgrade markdownlint to 0.23.0
* nmap: simplify help scraping a bit, don't try to emit unnecessary
newlines
* test: prefix fake test commands with underscore
* test: port most umount test cases to pytest+pexpect
* test: add note about unescaped assert_complete single return
values
* editorconfig: apply yaml settings to .yaml too
* pre-commit: use local perlcritic hook
* *: doc and comment link updates
* pre-commit, *.md: add markdownlint, address findings
* README: clarify loading automatically on demand
* ssh-keygen: -O arg updates and improvements
* ssh-keygen: add -b arg completions according to specified -t
* ssh-keygen: option and arg completion updates for new versions
* _command: improve commentary
* reportbug, scp, sftp, svn: use compgen -c instead of _command
* find: fix -exec etc argument and its completion
* extra: trigger docker builds only on test-cmd-list.txt changes
* test: add script to maintain list of executables for full test
coverage
* test: run lint tests on Travis in a quickish separate first stage
* test/make: mark more cases as requiring command
* make: add bmake alias
* test: run pre-commit on host instead of docker
* test: add perlcritic to pre-commit, run on all perl
* *: remove some unused variables, thanks to shellcheck SC2034
* *: various loop iteration improvements
* crontab: fix loop over already given args
* apt-cache: fix command mode handling
* doc: add loop variable naming guideline
* test: make at-point completion tests easier
* ssh, xsltproc: address shellcheck SC2006
* scp: work around shellcheck SC1003
* mutt: address shellchec SC2236
* wget: address shellcheck SC2116
* pytest: address shellcheck SC2002
* bash_completion, java, tipc: for loop whitespace consistency
tweaks
* *: more arithmetic evaluation cleanups, thanks to shellcheck
SC2004
* __reassemble_comp_words_by_ref, java: address and work around
shellcheck SC2102
* test: enable parallel pre-commit shellcheck
* test: remove shellcheck severity filter, add explicit disables
instead
* doc: recommend arithmetic evaluation
* *: array subscript cleanups
* ssh-keygen: -s and -n completion improvements
* *: enable and address shellcheck SC2053
* bash_completion, invoke-rc.d, svcadm: trivial cleanups
* *: replace various conditional expressions with arithmetic
evaluation
* carton: fix command parsing with BSD sed
* nmap: fix option parsing with BSD sed
* test/alias: port remaining test case to pytest+pexpect
* test: generalize complete at point test
* test/cd: fix test_dir_at_point for setups that repeat "trailer"
* pytest: add some option arg (non-)completions
* pytest: complete test classes
* pgrep, pkill: add --ns and --nslist arg completions
* test: run skipif and xfail commands without caring if they output
or not
* test: make it possible to not care whether command did output or
not
* test/xfreerdp: skip xfreerdp kbd test if kbd-list returns empty
* test: tolerate duplicates from compgen actions
* test: bump shellcheck severity to warning + some disables
* *: address shellcheck SC2046
* test/lib/library.sh: address shellcheck SC2125
* java, pkgadd, sysbench: address shellchec SC2124
* scp: address shellcheck SC2089 and SC2090
* _filedir_xspec: address shellcheck SC2140
* rpm, ssh, umount.linux: address shellcheck SC2120
* cvs, modprobe, sh: address shellcheck SC2209
* mutt: address shellcheck SC2088
* _upvar, _upvars, _variables, rpm: address shellcheck SC1083
* test/run: address shellcheck SC2164
* renice: address shellcheck SC2254
* tipc: comment grammar and spelling fixes
* man, perl, route, tipc: address shellcheck SC2053
* info, java: address shellcheck SC2153
* quote_readline: fix $ret leak
* test: upgrade shellcheck to 0.7.1
* test/printenv: xfail if --help doesn't contain options (e.g.
busybox)
* test/aptitude: require command where necessary
* _known_hosts_real, op: address shellcheck SC2184
* test: don't run shellcheck on completions/.gitignore
* protoc: complete all --*_out without more specific handling with
dirs
* sysbench: add --test= deprecation TODO
* pkgadd: indentation fix
* chronyc, wvdial: address shellcheck SC2178
* java, pkgadd, sysbench: address shellcheck SC2124
* mplayer: address shellcheck SC1078 false positive
* smartctl: hush shellcheck SC2054 false positives
* *: address shellcheck SC2221 and SC2222
* bash_completion: address shellcheck SC2220
* crontab, wodim: silence shellcheck SC2191 and SC2192
* aptitude: add some option arg (non)completions
* aptitude: parse options list from --help, hardcode less
* test/aptitude: add some test cases
* *: argument interation improvements
* *: whitespace tweaks
* apt-get etc: use _apt_cache_packages from apt-cache
* pre-commit: run most python checks on helpers/python too
* test/ldd: xfail if --help is not implemented
* test/printenv: require command for arg completion test
* printenv: indentation fixes
* test: upgrade mypy to 0.770
* test: split dependencies requiring Python 3.6.1+ to requirements-
dev.txt
* git: trigger docker rebuild on pre-commit config change
* test: require openssl command for option argument tests
* test: move perltidy to pre-commit, run with --converge
* test: move shellcheck to pre-commit
* test: ignore flake8 messages that are in black's domain
* _xinetd_services: look up from $BASHCOMP_XINETDDIR, add some unit
tests
* printenv: new completion
* copyright: add 2020
* test: fix CompletionResult.__eq__ UnboundLocalError
* test: run pre-commit in tools container
* test: shellcheck tweaks
* test: add isort to pre-commit, run it
* test: add flake8-bugbear
* test: install black for Python 3.6 too
* pre-commit: add config with black, flake8, and mypy
* test: drop redundant black args from docker runs
* *: python type hint fixes and improvements
* extra/make-changelog: run through black
* test/totem: add basic test case
* test/cd: remove unused import
* openssl: complete -writerand with filenames
* openssl: parse available options from $command -help
* openssl: support getting digest list from more recent openssl
versions
* nmap: handle options split on equals sign
* nmap: parse options from -h output
* test/cd: make dir_at_point produce better debuggable failures
* test/cd: convert remaining test case to pytest+pexpect
* test: remove some no longer needed old test suite code
* test/chown,sudo: parametrize special case test, improve xfail
targeting
* test/tsig-keygen: require command for test_options
* test/upgradepkg: port remaining test case to pytest+pexpect
* tsig-keygen: new completion
* test: host helper lint and usage fixes
* test: port some _known_hosts_real unit tests to pytest+pexpect
* test: remove some no longer needed tcl/expect code
* test: fix spurious hosts fixture failure without avahi-browse
installed
* test: port some scp test cases to pytest+pexpect
* test: port remaining finger, sftp, ssh, and xhost cases to
pytest+pexpect
* lilo: work around shellcheck false positive
* test/ipcalc: fix tests with busybox ipcalc
* chromium-browser, firefox: complete on *.txt (#379)
* README.md: add introduction
* ipcalc: new completion
* *: complete commands when prefixed with a backslash
* test/wol: don't fail MAC test if test system has /etc/ethers
entries
* test/dnssec-keygen: allow more alternatives in algorithm
completion
* lilo: don't complete on commented out labels
* lilo: honor -C when completing labels
* lilo: add -B and -E completions
[ beantaxi ]
* Source user completion only if it's a file (#409)
[ hugoziviani ]
* jarsigner: complete on *.apk too (#386)
* cryptsetup: add luksChangeKey arg completion (#380)
-- Ville Skyttä <ville.skytta@iki.fi> Sat, 25 Jul 2020 11:25:09 +0300
bash-completion (2.10)
[ Felix Lechner ]
* perltidy: associate *.t (#338)
[ Gabriel F. T. Gomes ]
* perl: fix completion with space between option and argument
[ Grisha Levit ]
* _variables: add TERM and LC_* completion (#353)
[ Iñigo Martínez ]
* autotools: Replace pkgdatadir with datadir
* pkg-config: Relative paths
* pkg-config: generate Name from autotools PACKAGE
[ Jakub Jelen ]
* ssh: option and argument completion updates (#332)
[ Michał Górny ]
* test_arp: Skip if ARP tables are empty
* test_chromium_browser: Skip test_2 if 'chromium-browser --help'
fails
* test_rpm2tgz: Fix expected output
[ Sebastian ]
* cppcheck: Add new standards to --std option. (#356)
[ Tomasz N ]
* apt-get: fix pkg version completion if it contains a colon (#351)
[ Ville Skyttä ]
* test: bump black to >=19.10b0
* ssh, scp, sftp, ssh-copy-id, curl: improve identity file
completion
* update-rc.d: indentation fix
* update-rc.d: remove dead code
* screen: add serial device basic arg (non)completion
* screen: add //telnet completion
* test: add some trivial perl -E/-e cases
* perl: indentation fixes
* curl: make @filename completion do the right thing with dirs
* _filedir: avoid duplicate dirs internally, and a compgen -d call
for files
* _filedir: remove unused $x
* bash_completion.sh: shellcheck SC2086 fixes
* test: shellcheck config cleanups
* shellcheck: add some option arg (non)completions
* test: fix cpio users test in presence of usernames with whitespace
* test: python typing fixes
* test: add minimal mypy config
* .gitignore: mypy cache
* makepkg: fix option completion
* test: mark dcop and mr testcases requiring the cmd as such
* CONTRIBUTING: disable e-mail bug gateway due to spam
* carton: new completion
* op: direct command parsing stderr to /dev/null
* test: adjust java expectations based on whether jars can be listed
* valgrind: look tool names from lib/*-linux-gnu dirs too
* test: xfail locale-gen option completion if --help is not
available
* _sysvdirs: always return 0
* java: don't assume jar is installed
* travis: test with Debian 10
* wine: install for wine-development and wine-stable too
* travis: generate dist tarball on alpine
* dmypy: new completion
* test: add require_longopt xfail helper, use it
* test: mark more tests that parse command output as requiring
command
* sysctl: invoke completed sysctl instead of one from path to get
variables
* screen, smartctl, update-alternatives: _parse_help, drop hardcoded
option list
* lintian-info: _parse_help, add more option arg (non)completions
* gprof: _parse_usage, drop hardcoded option list
* test: fix retrieving command to test from request
* travis: pass NETWORK as env var, so we can actually use it
* test: xfail MAC address completion without networking
* test: ignore _makepkg_bootstrap in makepkg test env
* test: hush flake8-bugbear B010
* test: don't sort expected completion lists under the hood
* test: add bunch of basic option parsing test cases
* test: always run tests which don't require tested command
* test: explodepkg and upgradepkg test fixes
* test: mark sbcl-mt xfail due to whitespace split issues
* _terms: search directly from various terminfo dirs
* _terms: combine and simplify somewhat
* pkg-get: fix $i leak
* pkgutil: fix $i leak
* test: portinstall/upgrade test case and setup fixes
* lvm pv*, vg*: parse help instead of hardcoding option list
* ipv6calc: parse help instead of hardcoding option list
* test: avoid some sed -r/-E runLint false positives
* test: use sh +* as ccache command test case
* java: make jar/zip listing work with unzip
* test: installpkg test fixes
* test: fix acroread fixture dir
* test: remove unnecessary returns after pytest.skip
* test: avoid gnome-mplayer core dump on Ubuntu 14
* xvfb-run: new completion
* test: skip gssdp-discover --message-type when option not available
* test: expect failures for bc without --help useful with _longopt
* test: don't expect a .tox dir in fixture
* test: drop sourcing our no longer existing profile.d script
* tox: include -- in option completions
* tox: complete defaults after a --
* gssdp-discover: new completion
* test: register our pytest markers to hush warnings from 4.5+
* test: fix required pytest version
* ip: invoke the tool as $1
* README: drop distro badges, link to Repology instead
* chromium-browser: add --proxy-server arg completion
* test: source our profile.d test env script in docker
* influx: new completion
* README: badge title tweaks
* tox: do simple parse on tox.ini if --listenvs* yields nothing
* test: add basic tox fixture
* man: fall back to _parse_usage for _parse_help
* test_wsimport: xfail options test on unparseable -help
* test: don't try to install black on Python < 3.6
* pgrep: fix fallback to _parse_usage
* test: xfail unparseable mock and munin-node-configure --help cases
* test_pwdx: xfail more unparseable help cases
* build: make pytest executable configurable, look for pytest-3 too
* test: enforce minimum pytest version
* test: zopflipng flake8 fix
* test: xfail getent and pwdx option completions with unparseable
--help
* test: add more basic _parse_help use test cases
* test: add bunch of basic _parse_help use test cases
* .gitignore: add configure.lineno
* badblocks: fix $i leak
* postfix: option completion is expected to fail at the moment
* cal: try _parse_help before _parse_usage
* test: add bunch of basic _parse_usage use test cases
* chsh, pwck: try _parse_help before _parse_usage
* test: add basic autossh test
* test: convert more _filedir unit tests to pytest+pexpect
* test: flake8 fix
* test: convert bunch of _filedir unit tests to pytest+pexpect
* test: convert finger partial test case to pytest+pexpect
* README: add some badges, tweak existing
* test: port _variables unit tests to pytest+pexpect
* test: port compgen and quote tests to pytest+pexpect
* iconv, lz4, tipc, xsltproc: replace some seds with compgen -X
* test: disallow Alpine failure on Travis
* _pnames: adapt for busybox ps, rewrite in pure bash
* test: run our docker script in test containers by default
* test: use one Dockerfile for all dists
* test_ifup: accept short option completions too
* timeout: fallback to _parse_usage from _parse_help
* test_wget: test --s instead of --h
* test_lsusb: xfail with unparseable --help
* test: expect failures for various completions without useful
--help
* test: support xfail in our markers like skipif, use it a lot
* test: add Alpine Linux container, allow failures for now
* iconv: weed out ... from encoding completions
* test_iconv: add basic file completion test
* test_iconv: skip option completion if --help fails
* test_getconf: skip if -a doesn't output any POSIX_V*
* test_feh, test_makepkg: invoke grep as "command grep"
* test: generalize check whether we're being run in a container
* tar: simplify locating tarball from command line
* pkg_delete: don't limit to FreeBSD
* test: reformat test_chromium_browser.py source
* test: set up BASH_COMPLETION_COMPAT_DIR in bashrc (only)
* test: more thorough system location interference avoidance
* test: bashrc comment and whitespace tweaks
* build: makefile whitespace tweaks
* build: really reset return value before completions check
* build: simplify symlink setup
* tar: add missing bsdtar, gtar, and star symlinks
* README: use light gray badges for unknown versions
* README: link to cygwin package
[ Wolf ]
* ri: hush some warnings
[ andreabravetti ]
* unrar: complete on *.exe (#337)
[ ezr ]
* chromium-browser: Add support for .mhtml files
[ jerkey ]
* screen: complete first arg with serial devices
[ marxin ]
* gcc: support new --completion option (#222)
[ pcc ]
* unzip, zipinfo: complete *.aab (#340)
[ versat ]
* cppcheck: Remove deprecated option 'posix' for '--std='
-- Ville Skyttä <ville.skytta@iki.fi> Thu, 05 Dec 2019 17:04:26 +0200
bash-completion (2.9)
[ Antonio Terceiro ]
* dpkg-source: Add --before-build --after-build --commit, and
--print-format
[ Gabriel F. T. Gomes ]
* xm: Deprecate completion for obsolete command (#284)
* _filedir_xspec: Fallback to suggesting all files if requested
(#260)
* tar: Support completions for zstd compression extensions (#255)
* dpkg: List held packages (#250)
* cvs: Add completion for the log command
[ Guillaume Mella ]
* unzip, zipinfo: Associate with *.xar (eXist-db application
package) (#257)
[ Igor Susman ]
* mplayer: Associate with *.w64
[ Jaak Ristioja ]
* okular: Added support for xz-compressed files.
[ John Swinbank ]
* _xspecs: Declare as global on bash >= 4.2
[ Kevin Locke ]
* test: Increase expect pty to 160 columns
* test: avoid interrupting magic mark output
[ Per Lundberg ]
* 7z: add .msi support
[ Peter Wu ]
* tshark: speed up tshark -O completion
* tshark: fix completion of -Xlua_script option
* tshark: Support preferences (-o) completion with memoization
* test: fix misinterpretation of completion output in tests
* test: fix flake8 complaints about unused imports
* conftest: fix RemovedInPytest4Warning due to use of
node.get_marker
* chromium-browser: consider chrome and chromium as aliases
* tshark: support .gz and .cap files for -r expansion
* tshark: prevent a single-character file from breaking -G
completion
* tshark: update -T and -t completions
[ Russell Davis ]
* man: Fix completion when failglob option is enabled (#225)
[ Timo Taipalus ]
* mplayer: Add common supported module music formats
[ Tomasz N ]
* _longopt: pick first long option on a line, not last
[ Ville Skyttä ]
* *: avoid shellcheck SC1007 and SC1010
* 7z: add some TODO notes on parsing "i" output for extensions
* ssh: make -o protocol completion less hardcoded
* ssh: make option completion case insensitive
* ssh: fix suboption completion with combined -*o
* xvnc4viewer: code cleanups
* doc/testing: remove lots of legacy info, add some new
* CONTRIBUTING: add upstream vs bash-completion considerations
* CONTRIBUTING: note runLint and run-shellcheck
* __parse_options, 7z: avoid herestrings
* arp, ccze, ifstat, inotifywait, makepkg: invoke sed with "command"
* shellcheck: disable bunch of warnings when in "-S warning" mode
* test: move default shell option from run-shellcheck to
.shellcheckrc
* test: make runLint search for herestrings
* tar, valgrind: avoid some herestrings
* travis: run shellcheck on bash_completion.sh.in too
* travis: fail on shellcheck errors
* make: quote eval array definitions to work around shellcheck
SC1036 bug
* test: add make -C test case
* *: shellcheck error fixes
* _included_ssh_config_files: store found included files in an array
* _included_ssh_config_files: doc grammar fixes
* test: add invoke-rc.d test case for not repeating already given
options
* ebtables: improve existing table arg parsing
* test: add script to run shellcheck, run it in Travis, allowing
failure for now
* iptables: improve existing table arg parsing
* test: shorten long gdb test core file name so tar doesn't croak on
it
* AUTHORS: remove unrelated project association from my entry
* apt-get: protect source against regex specials
* mypy, mysql, xmms: don't complete unknown split long option args
* synclient: remove unused local variable "split"
* test: adjust _get_comp_words_by_ref test to changed error output
* apt-cache: protect showsrc against regex specials
* test: improve tshark -O arg completion test
* tshark: ignore stderr when parsing -G, -L, and -h output
* *: error output consistency, use bash_completion prefix
* _upvar: deprecate in favor of _upvars
* *: add missing "ex: filetype=sh"
* phing: fix getting just a tab for options on CentOS 6
* phing: don't complete -l with files
* various: apply file vs dir special cases also when invoked with
full path
* *: whitespace tweaks
* ssh: don't offer protocol v1 specific options if it's not
supported
* test: add some gdb non-core files
* _parse_help: look for long options somewhat more eagerly
* gdb: relax core filename pattern
* test/tools: fix exit status incrementation
* *: arithmetic expression related cleanups
* test/tools: run all tools, don't stop at first failure
* test: check for perltidy errors and warnings
* *: format Perl code with perltidy
* *: format Python code with black
* .dir-locals.el: use flycheck-sh-bash-args
* valgrind: look up tools from libexec dirs too
* *: make _parse_usage fallbacks more concise
* svn, svk, wget: use _iconv_charsets
* *: spelling fixes
* msynctool: code cleanups
* *: remove whitespace after redirections
* *: remove spaces immediately within $()
* bzip2: recognize *.tbz2 as bzipped
* modprobe: module parameter boolean values
* ping, tracepath: parse options primarily with _parse_help
* ulimit: new completion
* shellcheck: new completion
* dnssec-keygen: new completion
* modprobe: append = to module parameter completions
* test: include test_unit_longopt.py in dist
* test: add some _longopt unit tests
* _longopt: simplify regex, use printf instead of echo, drop
unnecessary sort
* nsupdate: new completion
* _longopt: don't complete --no-* with file/dirname arg
* copyright: add 2019
* pytest: complete --pythonwarnings/-W arg
* python: make warning action list reusable
* test: use pytest-xdist
* extra: add git pre-push hook for triggering Docker Hub builds
* post-commit: trigger on test/requirements.txt too
* pytest: complete pytest-xdist --dist, --numprocesses, and
--rsyncdir
* test: remove no longer needed completion/*.exp
* xfreerdp: reinstate support for old versions with dash option
syntax
* test: rewrite "generate" in Python, fix trailing backslash in
EXTRA_DIST
* test: sort t/Makefile.am EXTRA_DIST in C locale
* ssh: support RemoteCommand and SyslogFacility options
* test: Expect failure for chown all users test as non-root
* test: Fix declare test case with bash 5.0
* adb: Deprecate in favor of one shipped with the Android SDK
* xfreerdp: Update for more modern xfreerdp
* jsonschema: New completion
* test: Remove unnecessary ri xfail
* test: Clean up man tmp dir
* .gitignore: Add .python-version (for pyenv)
* test: Remove unnecessary autouse=True from fixtures
* ifstat: Make work with iproute2 version
* iperf, iperf3: Add some option arg (non-)completions
* test: Fix test generation wrt results checking improvements
* ifstat: New completion
* __parse_options: Avoid non-zero exit status
* test: Refactor/improve completion results checking
* test: Match Python's default locale unaware sort in bash setup
* test: Rename completion.line to .output
* test: Add man failglob test case
* test: Add pre_cmds support for completion fixture
* inotifywatch: New completion, common with inotifywait
* inotifywait: Fix -e completion with BSD sed
* inotifywait: Avoid some false positive event names
* test: extend _ip_addresses unit tests some
* _ip_addresses: Avoid completing ipv4 ones with -6
* inotifywait: New completion
* test: Mark some xfails based on if in docker instead of in CI
* test: Skip ifup options test if it doesn't grok --help, not in CI
* test: Clean up and docker-ignore __pycache__ dirs
* build: Include test/t in dist tarball
* test/t: Avoid trailing backslash in Makefile.am's to appease
automake
* test: Remove some no longer used old test suite code
* _xspecs: Simplify bash version check
* chmod: Fix "-" completion
* sysctl: Treat -f as alias for -p/--load
* .gitignore: Add pytestdebug.log
* chmod: Fix file completion after modes starting with a dash
* _count_args: Add 3rd arg for treating option-like things as args
* test: Fix _count_args test_7 to test intended case
* pydocstyle: New completion
* Travis: Remove unused PYTEST env var
* doc: Note email issues gateway
* tcpdump: Various option and their arg completion updates
* test: Fix arp CI (non)expectations, remove redundant test case
* test: Be more consistent with "CI" env var examination and xfails
* arp: New completion, somewhat incomplete
* test: Expect failure in gkrellm if there's no X display
* doc: Update docs on generating simple tests
* doc: Some test dependency doc updates
* test: Add requirements.txt for installing dependencies
* grpck: Parse options with _parse_help, falling back to
_parse_usage
* grpck: Add --root/-R arg completion
* test suite: Ignore _scp_path_esc in env for ssh-copy-id
* ssh-copy-id: Add -i and -o arg (non-)completions
* tar: Clean up some redundant code
* cancel: Split long line
* cancel: Add some option arg (non-)completions
* locale-gen: New completion
* makepkg: Don't apply to other than Slackware makepkg
* test: Allow unknowns options in makepkg option completion
* makepkg: Use _parse_help instead of hardcoding option list
* mypy: New completion
* op: New completion
* hunspell: New completion
* xmllint: Improve --encode, --pretty, and --xpath arg
(non-)completions
* test: Remove leftover completion/ls.exp
* gcc: Add g++, gcc, gccgo, and gfortran *-[568] aliases
* perlcritic: New completion
* gnome-screenshot: New completion
* isort: New completion
* freeciv: Option and arg completion updates
* freeciv-gtk2: Install for freeciv and freeciv-gtk3, rename to
freeciv
* mplayer etc: Complete on *.crdownload partial downloads in
addition to *.part
* chromium-browser, google-chrome*: New non-xspec completion
* firefox etc: New non-xspec completion
* Merge branch 'master' into wip-pexpect
* nc: Add some more option (non-)completions
* test: Mark MANPATH without leading/trailing colons test an xfail
on CI CentOS 6
* test: Remove kill, killall remnants
* test: Make case specific env entries shell code, not escaped
* Merge branch 'master' into wip-pexpect
* unzip, zipinfo: Associate with *.whl
* __load_completion: Avoid unnecessary lookups from nonexistent dirs
* Merge branch 'master' into wip-pexpect
* gcc: Add g++, gcc, gccgo, and gfortran *-7 aliases
* test: Use test_unit_* prefix for unit tests, to avoid name clashes
* test: Support setting cmd=None to require no command, for unit
tests
* test: Misc test suite fixes
* test: Fix jq and scrub skipif commands
* test: Don't require complete marker on test methods
* test: Add support for per-test env modifications
* test: Use more conventional Python file names for tests
* test: Sort completion results in Python for ease of use in Python
tests
* test: Allow __load_completion to fail
* test: chdir to fixtures dir in Python as well
* test: Mark xfreerdp as expected failure for now
* test: Replace + with Plus in test class names
* test: Implement load_completion_for using assert_bash_exec
* test: Add ability to selectively ignore diffs in environment
* test: Fixture reorganization
* test: Pass through $HOME and $DISPLAY to test bash
* test: Log pexpect interaction to $BASHCOMP_TEST_LOGFILE if set
* test: Rename BASHCOMP_* test env variables to BASHCOMP_TEST_*
* test: Add python3 test case
* test: Add class level skipif based on bash exec result
* test: Include command name in test class name, use numbered test
method names
* test: Fix some regressions introduced in recent test conversions
* test: Add support for running test case in a specified dir
* test: Add support for skipping individual tests based on shell
command status
* test: Make test base work with Python 3.3+
* test: Add some iperf, iperf3 and xmodmap test cases
* xmodmap: Use _parse_help instead of hardcoded option list
* iperf: Improve client/server specific option parsing
* iperf: Install for iperf3 too
* iperf: Add g/G to --format completions
* xmodmap: Use _parse_help instead of hardcoded option list
* iperf: Improve client/server specific option parsing
* iperf: Install for iperf3 too
* iperf: Add g/G to --format completions
* test: Use /root/.local/bin/pytest on ubuntu14 by default
* test: Add generated test files to t/Makefile.am automatically
* test: Add new test files to EXTRA_DIST
* test: Use /root/.local/bin/pytest on centos6 by default
* test: Use make pytest docker executable env-configurable, default
pytest-3
* test: Update generate for pytest+pexpect
* test: Convert majority of test cases to pytest+pexpect
* tox: Fall back to --listenvs for env list if --listenvs-all fails
* git-post-commit: Avoid some error trash when HEAD is not a
symbolic ref
* test: Add pylint-3 test case
* test: Limit number of pylint option completions
* pydoc, pylint: Determine python2/3 based on command basename only
* pylint: Bring -f/--format arg completion up to date with pylint
1.9.2
* pylint: Implement comma separated --confidence arg completion
* test: Fix buffer size option listing in run --help
* test: Bump expect's match_max to 20000 by default
* test: Run docker tests with --verbose
* _services: Try systemctl list-unit-files if systemctl list-units
fails
* extra/git-post-commit.sh: Add git post-commit Docker Hub trigger
hook
* gpgv: New completion
* pydoc, pylint: Skip module completion if current looks like a path
* travis: Run ubuntu14/bsd with no network
* travis: Split long lines in script
* test: Limit number of wget option completions to avoid unresolved
result
* test: Mark flake8 untested if it seems broken
* pylint: Option arg completion improvements
* tshark: Get available interfaces from -D output
* ngrep: Add "any" to -d arg completions
* fio: New completion
* test: Fix iwspy test case
* uscan: Use _parse_help instead of hardcoded option list
* urlsnarf: Add -p arg completion
* tracepath: Add -m and -p arg non-completions
* tracepath: Actually use our separate completion instead of
_known_hosts
* test: Skip jq option completion test if its --help doesn't list
them
* xdg-settings: Make help parsing work on BSD
* test: Support running with local BSD binaries, do it w/ ubuntu14
in CI
* jq, sqlite3: Protect against negative array subscripts
* sudo: Improve long option arg handling
* sysctl: Recognize --pattern/-r and --load options
* test: Add sysctl option parsing test case
* sudo: Parse options from help/usage output, add some long option
support
* strace: Use _parse_help instead of hardcoded option list
* sshow: Add -p arg completion
* sqlite3: Add some option arg (non-)completions
* tune2fs: Update -o/-O argument lists
* jq: New completion
* reportbug: Run _parse_help and apt-cache more selectively
* querybts: Use _parse_help, not hardcoded option list, misc
improvements
* pyvenv: Support versioned 3.6-3.8 executables
* passwd: Try _parse_help before _parse_usage to parse options
* profile.d: Avoid tested variable values being confused as [ ]
operators
* cryptsetup: Add some option arg (non-)completions
* cryptsetup, nc, sh: Skip option args when counting arguments
* modinfo: Fall back to _parse_usage if _parse_help yields no
results
* mysql, mysqladmin: Complete --ssl-{ca,cert,key} option arg
* mysqladmin: Reuse --default-character-set completion from mysql
* modinfo: Use _parse_help instead of hardcoded option list
* minicom: Use _parse_help instead of hardcoded option list
* mplayer: Associate with *.S[3T]M, *.med, *.MED
* completions/Makefile.am: Use install-data-hook, not install-data-
local
* ifup etc: Add option and option argument completion
* _count_args: Add support for not counting specified option args
* ifquery: New ifup alias completion
* ngrep, tshark: Complete on *.pcapng too
* rpm: Complete --licensefiles with -q
* pytest: Rename from py.test to follow upstream recommended name
* README: Add instructions for overriding completions system wide
* README: Note $BASH_COMPLETION_USER_DIR
* test: Mark psql etc test cases untested if --help doesn't work
* aclocal, automake: Support versioned 1.16 executables
* __load_completion: Avoid bad array subscript on "commands" ending
with slash
* lzma: Use _parse_help instead of hardcoded option list
* test: Run perlcritic and flake8 on perl and python helpers in
Travis
* build: Improve cleanup of test/log and test/tmp dirs
* pkg-config: Complete on *.pc files
* build: Use AC_PROG_SED to locate sed
* build: Do cmake, pc, and profile variable replacements in Makefile
* README: Add Q/A on overriding a completion, modernize local
install answer
* json_xs: New completion
* chmod: New completion
* iperf, nc: Include IPv6 addresses in bind address completions
* links: Major rework, parse options from --help, add option arg
completion
* _ip_addresses: Add option to complete all/v4/v6 addresses, add
unit test
* wget: Remove nonexistent arg to _ip_addresses
* _filedir: Drop unnecessary evals
* iconv: Split charset completion to _iconv_charsets, add test case
* links: Install completion for links2 too
* xgamma: Comment spelling fix
* lftp: handle -s
* test: Skip scrub -p test when its --help doesn't list available
patterns
* ecryptfs-migrate-home: New completion
* scrub: New completion
* ether-wake: Install for etherwake as well
* *: Support completing arg of last bundled short option
* dselect: Parse options with _parse_help
* dhclient: Add some option arg (non-)completions
* dhclient: Parse options with _parse_usage
* chage, chpasswd: Add -R/--root arg completion
* reportbug: Add bunch of option arg (non-)completions
* .dir-locals.el: Set -O extglob for flycheck bash checks
* mount, umount: Deprecate on Linux in favor of util-linux >= 2.28
ones
* _known_hosts_real: Reimplement known hosts file parsing in pure
bash
* test: Add comment line to fixtures/_known_hosts_real/known_hosts
* ssh: Complete all *File option args with _filedir
* README: Point Debian and openSUSE badges towards unstable and
Tumbleweed
* README: Link to various distro packages
* apt-get: Add -h/-v/-o non-completions
* apt-get: Sync option list with apt 1.5.1
* apt-get: Simplify -t and friends completion, support Ubuntu
* apt-get: Add indextargets to list of suggested commands
* apt-get: Complete install package=versions
* ssh: Sync config option lists with OpenSSH 7.5p1, add some value
completions
* ssh: Sync query type list with OpenSSH 7.5p1
* ssh: Order various switch cases closer to alphabetical
* completions/Makefile: Fix check-local in VPATH builds
[ dmerge ]
* _filedir: Refactor to remove heredoc-dependent loop
[ marxin ]
* gccgo: Add as a GCC completion target (#227)
[ ovf ]
* xrandr: match the output name exactly for --mode
-- Ville Skyttä <ville.skytta@iki.fi> Sat, 27 Apr 2019 11:50:12 +0300
fish 3.2.0 (released March 1, 2021)
===================================
Notable improvements and fixes
------------------------------
- **Undo and redo support** for the command-line editor and pager search (:issue:`1367`). By default, undo is bound to Control+Z, and redo to Alt+/.
- **Builtins can now output before all data is read**. For example, ``string replace`` no longer has to read all of stdin before it can begin to output.
This makes it usable also for pipes where the previous command hasn't finished yet, like::
# Show all dmesg lines related to "usb"
dmesg -w | string match '*usb*'
- **Prompts will now be truncated** instead of replaced with ``"> "`` if they are wider than the terminal (:issue:`904`).
For example::
~/dev/build/fish-shell-git/src/fish-shell/build (makepkg)>
will turn into::
…h-shell/build (makepkg)>
It is still possible to react to the ``COLUMNS`` variable inside the prompt to implement smarter behavior.
- **fish completes ambiguous completions** after pressing :kbd:`Tab` even when they
have a common prefix, without the user having to press :kbd:`Tab` again
(:issue:`6924`).
- fish is less aggressive about resetting terminal modes, such as flow control, after every command.
Although flow control remains off by default, enterprising users can now enable it with
``stty`` (:issue:`2315`, :issue:`7704`).
- A new **"fish_add_path" helper function to add paths to $PATH** without producing duplicates,
to be used interactively or in ``config.fish`` (:issue:`6960`, :issue:`7028`).
For example::
fish_add_path /opt/mycoolthing/bin
will add /opt/mycoolthing/bin to the beginning of $fish_user_path without creating duplicates,
so it can be called safely from config.fish or interactively, and the path will just be there, once.
- **Better errors with "test"** (:issue:`6030`)::
> test 1 = 2 and echo true or false
test: Expected a combining operator like '-a' at index 4
1 = 2 and echo true or echo false
^
This includes numbering the index from 1 instead of 0, like fish lists.
- **A new theme for the documentation and Web-based configuration** (:issue:`6500`, :issue:`7371`, :issue:`7523`), matching the design on fishshell.com.
- ``fish --no-execute`` **will no longer complain about unknown commands**
or non-matching wildcards, as these could be defined differently at
runtime (especially for functions). This makes it usable as a static syntax checker (:issue:`977`).
- ``string match --regex`` now integrates **named PCRE2 capture groups as fish variables**, allowing variables to be set directly from ``string match`` (:issue:`7459`). To support this functionality, ``string`` is now a reserved word and can no longer be wrapped in a function.
- Globs and other **expansions are limited to 512,288 results** (:issue:`7226`). Because operating systems limit the number of arguments to commands, larger values are unlikely to work anyway, and this helps to avoid hangs.
- A new **"fish for bash users" documentation page** gives a quick overview of the scripting differences between bash and fish (:issue:`2382`), and the completion tutorial has also been moved out into its own document (:issue:`6709`).
Syntax changes and new commands
-------------------------------
- Range limits in index range expansions like ``$x[$start..$end]`` may be omitted: ``$start`` and ``$end`` default to 1 and -1 (the last item) respectively (:issue:`6574`)::
echo $var[1..]
echo $var[..-1]
echo $var[..]
All print the full list ``$var``.
- When globbing, a segment which is exactly ``**`` may now match zero directories. For example ``**/foo`` may match ``foo`` in the current directory (:issue:`7222`).
Scripting improvements
----------------------
- The ``type``, ``_`` (gettext), ``.`` (source) and ``:`` (no-op) functions
are now implemented builtins for performance purposes (:issue:`7342`, :issue:`7036`, :issue:`6854`).
- ``set`` and backgrounded jobs no longer overwrite ``$pipestatus`` (:issue:`6820`), improving its use in command substitutions (:issue:`6998`).
- Computed ("electric") variables such as ``status`` are now only global in scope, so ``set -Uq status`` returns false (:issue:`7032`).
- The output for ``set --show`` has been shortened, only mentioning the scopes in which a variable exists (:issue:`6944`).
In addition, it now shows if a variable is a path variable.
- A new variable, ``fish_kill_signal``, is set to the signal that terminated the last foreground job, or ``0`` if the job exited normally (:issue:`6824`, :issue:`6822`).
- A new subcommand, ``string pad``, allows extending strings to a given width (:issue:`7340`, :issue:`7102`).
- ``string sub`` has a new ``--end`` option to specify the end index of
a substring (:issue:`6765`, :issue:`5974`).
- ``string split`` has a new ``--fields`` option to specify fields to
output, similar to ``cut -f`` (:issue:`6770`).
- ``string trim`` now also trims vertical tabs by default (:issue:`6795`).
- ``string replace`` no longer prints an error if a capturing group wasn't matched, instead treating it as empty (:issue:`7343`).
- ``string`` subcommands now quit early when used with ``--quiet`` (:issue:`7495`).
- ``string repeat`` now handles multiple arguments, repeating each one (:issue:`5988`).
- ``printf`` no longer prints an error if not given an argument (not
even a format string).
- The ``true`` and ``false`` builtins ignore any arguments, like other shells (:issue:`7030`).
- ``fish_indent`` now removes unnecessary quotes in simple cases (:issue:`6722`)
and gained a ``--check`` option to just check if a file is indented correctly (:issue:`7251`).
- ``fish_indent`` indents continuation lines that follow a line ending in a backslash, ``|``, ``&&`` or ``||``.
- ``pushd`` only adds a directory to the stack if changing to it was successful (:issue:`6947`).
- A new ``fish_job_summary`` function is called whenever a
background job stops or ends, or any job terminates from a signal (:issue:`6959`, :issue:`2727`, :issue:`4319`).
The default behaviour can now be customized by redefining it.
- ``status`` gained new ``dirname`` and ``basename`` convenience subcommands
to get just the directory to the running script or the name of it,
to simplify common tasks such as running ``(dirname (status filename))`` (:issue:`7076`, :issue:`1818`).
- Broken pipelines are now handled more smoothly; in particular, bad redirection mid-pipeline
results in the job continuing to run but with the broken file descriptor replaced with a closed
file descriptor. This allows better error recovery and is more in line with other shells'
behaviour (:issue:`7038`).
- ``jobs --quiet PID`` no longer prints "no suitable job" if the job for PID does not exist (eg because it has finished) (:issue:`6809`, :issue:`6812`).
- ``jobs`` now shows continued child processes correctly (:issue:`6818`)
- ``disown`` should no longer create zombie processes when job control is off, such as in ``config.fish`` (:issue:`7183`).
- ``command``, ``jobs`` and ``type`` builtins support ``--query`` as the long form of ``-q``, matching other builtins.
The long form ``--quiet`` is deprecated (:issue:`7276`).
- ``argparse`` no longer requires a short flag letter for long-only options (:issue:`7585`)
and only prints a backtrace with invalid options to argparse itself (:issue:`6703`).
- ``argparse`` now passes the validation variables (e.g. ``$_flag_value``) as local-exported variables,
avoiding the need for ``--no-scope-shadowing`` in validation functions.
- ``complete`` takes the first argument as the name of the command if the ``--command``/``-c`` option is not used,
so ``complete git`` is treated like ``complete --command git``,
and it can show the loaded completions for specific commands with ``complete COMMANDNAME`` (:issue:`7321`).
- ``set_color -b`` (without an argument) no longer prints an error message, matching other invalid invocations of this command (:issue:`7154`).
- ``exec`` no longer produces a syntax error when the command cannot be found (:issue:`6098`).
- ``set --erase`` and ``abbr --erase`` can now erase multiple things in one go, matching ``functions --erase`` (:issue:`7377`).
- ``abbr --erase`` no longer prints errors when used with no arguments or on an unset abbreviation (:issue:`7376`, :issue:`7732`).
- ``test -t``, for testing whether file descriptors are connected to a terminal, works for file descriptors 0, 1, and 2 (:issue:`4766`).
It can still return incorrect results in other cases (:issue:`1228`).
- Trying to execute scripts with Windows line endings (CRLF) produces a sensible error (:issue:`2783`).
- Trying to execute commands with arguments that exceed the operating system limit now produces a specific error (:issue:`6800`).
- An ``alias`` that delegates to a command with the same name no longer triggers an error about recursive completion (:issue:`7389`).
- ``math`` now has a ``--base`` option to output the result in hexadecimal or octal (:issue:`7496`) and produces more specific error messages (:issue:`7508`).
- ``math`` learned bitwise functions ``bitand``, ``bitor`` and ``bitxor``, used like ``math "bitand(0xFE, 5)"`` (:issue:`7281`).
- ``math`` learned tau for those who don't like typing "2 * pi".
- Failed redirections will now set ``$status`` (:issue:`7540`).
- fish sets exit status in a more consistent manner after errors, including invalid expansions like ``$foo[``.
- Using ``read --silent`` while fish is in private mode was adding these potentially-sensitive entries to the history; this has been fixed (:issue:`7230`).
- ``read`` can now read interactively from other files, and can be used to read from the terminal via ``read </dev/tty`` (if the operating system provides ``/dev/tty``) (:issue:`7358`).
- A new ``fish_status_to_signal`` function for transforming exit statuses to signal names has been added (:issue:`7597`, :issue:`7595`).
- The fallback ``realpath`` builtin supports the ``-s``/``--no-symlinks`` option, like GNU realpath (:issue:`7574`).
- ``functions`` and ``type`` now explain when a function was defined via ``source`` instead of just saying ``Defined in -``.
- Significant performance improvements when globbing, appending to variables or in ``math``.
- ``echo`` no longer interprets options at the beginning of an argument (eg ``echo "-n foo"``) (:issue:`7614`).
- fish now finds user configuration even if the ``HOME`` environment variable is not set (:issue:`7620`).
- fish no longer crashes when started from a Windows-style working directory (eg ``F:\path``) (:issue:`7636`).
- ``fish -c`` now reads the remaining arguments into ``$argv`` (:issue:`2314`).
- The ``pwd`` command supports the long options ``--logical`` and ``--physical``, matching other implementations (:issue:`6787`).
- ``fish --profile`` now only starts profiling after fish is ready to execute commands (all configuration is completed). There is a new ``--profile-startup`` option that only profiles the startup and configuration process (:issue:`7648`).
- Builtins return a maximum exit status of 255, rather than potentially overflowing. In particular, this affects ``exit``, ``return``, ``functions --query``, and ``set --query`` (:issue:`7698`, :issue:`7702`).
- It is no longer an error to run builtin with closed stdin. For example ``count <&-`` now prints 0, instead of failing.
- Blocks, functions, and builtins no longer permit redirecting to file descriptors other than 0 (standard input), 1 (standard output) and 2 (standard error). For example, ``echo hello >&5`` is now an error. This prevents corruption of internal state (#3303).
Interactive improvements
------------------------
- fish will now always attempt to become process group leader in interactive mode (:issue:`7060`). This helps avoid hangs in certain circumstances, and allows tmux's current directory introspection to work (:issue:`5699`).
- The interactive reader now allows ending a line in a logical operators (``&&`` and ``||``) instead of complaining about a missing command. (This was already syntactically valid, but interactive sessions didn't know about it yet).
- The prompt is reprinted after a background job exits (:issue:`1018`).
- fish no longer inserts a space after a completion ending in ``.``, ``,`` or ``-`` is accepted, improving completions for tools that provide dynamic completions (:issue:`6928`).
- If a filename is invalid when first pressing :kbd:`Tab`, but becomes valid, it will be completed properly on the next attempt (:issue:`6863`).
- ``help string match/replace/<subcommand>`` will show the help for string subcommands (:issue:`6786`).
- ``fish_key_reader`` sets the exit status to 0 when used with ``--help`` or ``--version`` (:issue:`6964`).
- ``fish_key_reader`` and ``fish_indent`` send output from ``--version`` to standard output, matching other fish binaries (:issue:`6964`).
- A new variable ``$status_generation`` is incremented only when the previous command produces an exit status (:issue:`6815`). This can be used, for example, to check whether a failure status is a holdover due to a background job, or actually produced by the last run command.
- ``fish_greeting`` is now a function that reads a variable of the same name, and defaults to setting it globally.
This removes a universal variable by default and helps with updating the greeting.
However, to disable the greeting it is now necessary to explicitly specify universal scope (``set -U fish_greeting``) or to disable it in config.fish (:issue:`7265`).
- Events are properly emitted after a job is cancelled (:issue:`2356`).
- ``fish_preexec`` and ``fish_postexec`` events are no longer triggered for empty commands (:issue:`4829`, :issue:`7085`).
- Functions triggered by the ``fish_exit`` event are correctly run when the terminal is closed or the shell receives SIGHUP (:issue:`7014`).
- The ``fish_prompt`` event no longer fires when ``read`` is used. If
you need a function to run any time ``read`` is invoked by a script,
use the new ``fish_read`` event instead (:issue:`7039`).
- A new ``fish_posterror`` event is emitted when attempting to execute a command with syntax errors (:issue:`6880`, :issue:`6816`).
- The debugging system has now fully switched from the old numbered level to the new named category system introduced in 3.1. A number of new debugging categories have been added, including ``config``, ``path``, ``reader`` and ``screen`` (:issue:`6511`). See the output of ``fish --print-debug-categories`` for the full list.
- The warning about read-only filesystems has been moved to a new "warning-path" debug category
and can be disabled by setting a debug category of ``-warning-path`` (:issue:`6630`)::
fish --debug=-warning-path
- The enabled debug categories are now printed on shell startup (:issue:`7007`).
- The ``-o`` short option to fish, for ``--debug-output``, works correctly instead of producing an
invalid option error (:issue:`7254`).
- fish's debugging can now also be enabled via ``FISH_DEBUG`` and ``FISH_DEBUG_OUTPUT`` environment variables.
This helps with debugging when no commandline options can be passed, like when fish is called in a shebang (:issue:`7359`).
- Abbreviations are now expanded after all command terminators (eg ``;`` or ``|``), not just space,
as in fish 2.7.1 and before (:issue:`6970`), and after closing a command substitution (:issue:`6658`).
- The history file is now created with user-private permissions,
matching other shells (:issue:`6926`). The directory containing the history
file was already private, so there should not have been any private data
revealed.
- The output of ``time`` is now properly aligned in all cases (:issue:`6726`, :issue:`6714`) and no longer depends on locale (:issue:`6757`).
- The command-not-found handling has been simplified.
When it can't find a command, fish now just executes a function called ``fish_command_not_found``
instead of firing an event, making it easier to replace and reason about.
Previously-defined ``__fish_command_not_found_handler`` functions with an appropriate event listener will still work (:issue:`7293`).
- :kbd:`Control-C` handling has been reimplemented in C++ and is therefore quicker (:issue:`5259`), no longer occasionally prints an "unknown command" error (:issue:`7145`) or overwrites multiline prompts (:issue:`3537`).
- :kbd:`Control-C` no longer kills background jobs for which job control is
disabled, matching POSIX semantics (:issue:`6828`, :issue:`6861`).
- Autosuggestions work properly after :kbd:`Control-C` cancels the current commmand line (:issue:`6937`).
- History search is now case-insensitive unless the search string contains an uppercase character (:issue:`7273`).
- ``fish_update_completions`` gained a new ``--keep`` option, which improves speed by skipping completions that already exist (:issue:`6775`, :issue:`6796`).
- Aliases containing an embedded backslash appear properly in the output of ``alias`` (:issue:`6910`).
- ``open`` no longer hangs indefinitely on certain systems, as a bug in ``xdg-open`` has been worked around (:issue:`7215`).
- Long command lines no longer add a blank line after execution (:issue:`6826`) and behave better with :kbd:`Backspace` (:issue:`6951`).
- ``functions -t`` works like the long option ``--handlers-type``, as documented, instead of producing an error (:issue:`6985`).
- History search now flashes when it found no more results (:issue:`7362`)
- fish now creates the path in the environment variable ``XDG_RUNTIME_DIR`` if it does not exist, before using it for runtime data storage (:issue:`7335`).
- ``set_color --print-colors`` now also respects the bold, dim, underline, reverse, italic and background modifiers, to better show their effect (:issue:`7314`).
- The fish Web configuration tool (``fish_config``) shows prompts correctly on Termux for Android (:issue:`7298`) and detects Windows Services for Linux 2 properly (:issue:`7027`). It no longer shows the ``history`` variable as it may be too large (one can use the History tab instead). It also starts the browser in another thread, avoiding hangs in some circumstances, especially with Firefox's Developer Edition (:issue:`7158`). Finally, a bug in the Source Code Pro font may cause browsers to hang, so this font is no longer chosen by default (:issue:`7714`).
- ``funcsave`` gained a new ``--directory`` option to specify the location of the saved function (:issue:`7041`).
- ``help`` works properly on MSYS2 (:issue:`7113`) and only uses ``cmd.exe`` if running on WSL (:issue:`6797`).
- Resuming a piped job by its number, like ``fg %1``, works correctly (:issue:`7406`). Resumed jobs show the correct title in the terminal emulator (:issue:`7444`).
- Commands run from key bindings now use the same TTY modes as normal commands (:issue:`7483`).
- Autosuggestions from history are now case-sensitive (:issue:`3978`).
- ``$status`` from completion scripts is no longer passed outside the completion, which keeps the status display in the prompt as the last command's status (:issue:`7555`).
- Updated localisations for pt_BR (:issue:`7480`).
- ``fish_trace`` output now starts with ``->`` (like ``fish --profile``), making the depth more visible (:issue:`7538`).
- Resizing the terminal window no longer produces a corrupted prompt (:issue:`6532`, :issue:`7404`).
- ``functions`` produces an error rather than crashing on certain invalid arguments (:issue:`7515`).
- A crash in completions with inline variable assignment (eg ``A= b``) has been fixed (:issue:`7344`).
- ``fish_private_mode`` may now be changed dynamically using ``set`` (:issue:`7589`), and history is kept in memory in private mode (but not stored permanently) (:issue:`7590`).
- Commands with leading spaces may be retrieved from history with up-arrow until a new command is run, matching zsh's ``HIST_IGNORE_SPACE`` (:issue:`1383`).
- Importing bash history or reporting errors with recursive globs (``**``) no longer hangs (:issue:`7407`, :issue:`7497`).
- ``bind`` now shows ``\x7f`` for the del key instead of a literal DEL character (:issue:`7631`)
- Paths containing variables or tilde expansion are only suggested when they are still valid (:issue:`7582`).
- Syntax highlighting can now color a command as invalid even if executed quickly (:issue:`5912`).
- Redirection targets are no longer highlighted as error if they contain variables which will likely be defined by the current commandline (:issue:`6654`).
- fish is now more resilient against broken terminal modes (:issue:`7133`, :issue:`4873`).
- fish handles being in control of the TTY without owning its own process group better, avoiding some hangs in special configurations (:issue:`7388`).
- Keywords can now be colored differently by setting the ``fish_color_keyword`` variable (``fish_color_command`` is used as a fallback) (:issue:`7678`).
- Just like ``fish_indent``, the interactive reader will indent continuation lines that follow a line ending in a backslash, ``|``, ``&&`` or ``||`` (:issue:`7694`).
- Commands with a trailing escaped space are saved in history correctly (:issue:`7661`).
- ``fish_prompt`` no longer mangles Unicode characters in the private-use range U+F600-U+F700. (:issue:`7723`).
- The universal variable file, ``fish_variables``, can be made a symbolic link without it being overwritten (:issue:`7466`).
- fish is now more resilient against ``mktemp`` failing (:issue:`7482`).
New or improved bindings
^^^^^^^^^^^^^^^^^^^^^^^^
- As mentioned above, new special input functions ``undo`` (:kbd:`Control+\_` or :kbd:`Control+Z`) and ``redo`` (:kbd:`Alt-/`) can be used to revert changes to the command line or the pager search field (:issue:`6570`).
- :kbd:`Control-Z` is now available for binding (:issue:`7152`).
- Additionally, using the ``cancel`` special input function (bound to :kbd:`Escape` by default) right after fish picked an unambiguous completion will undo that (:issue:`7433`).
- ``fish_clipboard_paste`` (:kbd:`Control+V`) trims indentation from multiline commands, because fish already indents (:issue:`7662`).
- Vi mode bindings now support ``dh``, ``dl``, ``c0``, ``cf``, ``ct``, ``cF``, ``cT``, ``ch``, ``cl``, ``y0``, ``ci``, ``ca``, ``yi``, ``ya``, ``di``, ``da``, ``d;``, ``d,``, ``o``, ``O`` and Control+left/right keys to navigate by word (:issue:`6648`, :issue:`6755`, :issue:`6769`, :issue:`7442`, :issue:`7516`).
- Vi mode bindings support :kbd:`~` (tilde) to toggle the case of the selected character (:issue:`6908`).
- Functions ``up-or-search`` and ``down-or-search`` (:kbd:`Up` and :kbd:`Down`) can cross empty lines, and don't activate search mode if the search fails, which makes them easier to use to move between lines in some situations.
- If history search fails to find a match, the cursor is no longer moved. This is useful when accidentally starting a history search on a multi-line commandline.
- The special input function ``beginning-of-history`` (:kbd:`Page Up`) now moves to the oldest search instead of the youngest - that's ``end-of-history`` (:kbd:`Page Down`).
- A new special input function ``forward-single-char`` moves one character to the right, and if an autosuggestion is available, only take a single character from it (:issue:`7217`, :issue:`4984`).
- Special input functions can now be joined with ``or`` as a modifier (adding to ``and``), though only some commands set an exit status (:issue:`7217`). This includes ``suppress-autosuggestion`` to reflect whether an autosuggestion was suppressed (:issue:`1419`)
- A new function ``__fish_preview_current_file``, bound to :kbd:`Alt+O`, opens the
current file at the cursor in a pager (:issue:`6838`, :issue:`6855`).
- ``edit_command_buffer`` (:kbd:`Alt-E` and :kbd:`Alt-V`) passes the cursor position
to the external editor if the editor is recognized (:issue:`6138`, :issue:`6954`).
- ``__fish_prepend_sudo`` (:kbd:`Alt-S`) now toggles a ``sudo`` prefix (:issue:`7012`) and avoids shifting the cursor (:issue:`6542`).
- ``__fish_prepend_sudo`` (:kbd:`Alt-S`) now uses the previous commandline if the current one is empty,
to simplify rerunning the previous command with ``sudo`` (:issue:`7079`).
- ``__fish_toggle_comment_commandline`` (:kbd:`Alt-#`) now uncomments and presents the last comment
from history if the commandline is empty (:issue:`7137`).
- ``__fish_whatis_current_token`` (:kbd:`Alt-W`) prints descriptions for functions and builtins (:issue:`7191`, :issue:`2083`).
- The definition of "word" and "bigword" for movements was refined, fixing (eg) vi mode's behavior with :kbd:`e` on the second-to-last char, and bigword's behavior with single-character words and non-blank non-graphical characters (:issue:`7353`, :issue:`7354`, :issue:`4025`, :issue:`7328`, :issue:`7325`)
- fish's clipboard bindings now also support Windows Subsystem for Linux via PowerShell and clip.exe (:issue:`7455`, :issue:`7458`) and will properly copy newlines in multi-line commands.
- Using the ``*-jump`` special input functions before typing anything else no longer crashes fish.
- Completing variable overrides (``foo=bar``) could replace the entire thing with just the completion in some circumstances. This has been fixed (:issue:`7398`).
Improved prompts
^^^^^^^^^^^^^^^^
- The default and example prompts print the correct exit status for
commands prefixed with ``not`` (:issue:`6566`).
- git prompts include all untracked files in the repository, not just those in the current
directory (:issue:`6086`).
- The git prompts correctly show stash states (:issue:`6876`, :issue:`7136`) and clean states (:issue:`7471`).
- The Mercurial prompt correctly shows untracked status (:issue:`6906`), and by default only shows the branch for performance reasons.
A new variable ``$fish_prompt_hg_show_informative_status`` can be set to enable more information.
- The ``fish_vcs_prompt`` passes its arguments to the various VCS prompts that it calls (:issue:`7033`).
- The Subversion prompt was broken in a number of ways in 3.1.0 and has been restored (:issue:`6715`, :issue:`7278`).
- A new helper function ``fish_is_root_user`` simplifies checking for superuser privilege (:issue:`7031`, :issue:`7123`).
- New colorschemes - ``ayu Light``, ``ayu Dark`` and ``ayu Mirage`` (:issue:`7596`).
- Bugs related to multiline prompts, including repainting (:issue:`5860`) or navigating directory history (:issue:`3550`) leading to graphical glitches have been fixed.
- The ``nim`` prompt now handles vi mode better (:issue:`6802`)
Improved terminal support
^^^^^^^^^^^^^^^^^^^^^^^^^
- A new variable, ``fish_vi_force_cursor``, can be set to force ``fish_vi_cursor`` to attempt changing the cursor
shape in vi mode, regardless of terminal (:issue:`6968`). The ``fish_vi_cursor`` option ``--force-iterm`` has been deprecated.
- ``diff`` will now colourize output, if supported (:issue:`7308`).
- Autosuggestions appear when the cursor passes the right prompt (:issue:`6948`) or wraps to the next line (:issue:`7213`).
- The cursor shape in Vi mode changes properly in Windows Terminal (:issue:`6999`, :issue:`6478`).
- The spurious warning about terminal size in small terminals has been removed (:issue:`6980`).
- Dynamic titles are now enabled in Alacritty (:issue:`7073`) and emacs' vterm (:issue:`7122`).
- Current working directory updates are enabled in foot (:issue:`7099`) and WezTerm (:issue:`7649`).
- The width computation for certain emoji agrees better with terminals (especially flags). (:issue:`7237`).
- Long command lines are wrapped in all cases, instead of sometimes being put on a new line (:issue:`5118`).
- The pager is properly rendered with long command lines selected (:issue:`2557`).
- Sessions with right prompts can be resized correctly in terminals that handle reflow, like GNOME Terminal (and other VTE-based terminals), upcoming Konsole releases and Alacritty. This detection can be overridden with the new ``fish_handle_reflow`` variable (:issue:`7491`).
- fish now sets terminal modes sooner, which stops output from appearing before the greeting and prompt are ready (:issue:`7489`).
- Better detection of new Konsole versions for true color support and cursor shape changing.
- fish no longer attempts to modify the terminal size via ``TIOCSWINSZ``, improving compatibility with Kitty (:issue:`6994`).
Completions
^^^^^^^^^^^
- Added completions for
- ``7z``, ``7za`` and ``7zr`` (:issue:`7220`)
- ``alias`` (:issue:`7035`)
- ``alternatives`` (:issue:`7616`)
- ``apk`` (:issue:`7108`)
- ``asciidoctor`` (:issue:`7000`)
- ``avifdec`` and ``avifenc`` (:issue:`7674`)
- ``bluetoothctl`` (:issue:`7438`)
- ``cjxl`` and ``djxl`` (:issue:`7673`)
- ``cmark`` (:issue:`7000`)
- ``create_ap`` (:issue:`7096`)
- ``deno`` (:issue:`7138`)
- ``dhclient`` (:issue:`6684`)
- Postgres-related commands ``dropdb``, ``createdb``, ``pg_restore``, ``pg_dump`` and
``pg_dumpall`` (:issue:`6620`)
- ``dotnet`` (:issue:`7558`)
- ``downgrade`` (:issue:`6751`)
- ``gapplication``, ``gdbus``, ``gio`` and ``gresource`` (:issue:`7300`)
- ``gh`` (:issue:`7112`)
- ``gitk``
- ``groups`` (:issue:`6889`)
- ``hashcat`` (:issue:`7746`)
- ``hikari`` (:issue:`7083`)
- ``icdiff`` (:issue:`7503`)
- ``imv`` (:issue:`6675`)
- ``john`` (:issue:`7746`)
- ``julia`` (:issue:`7468`)
- ``k3d`` (:issue:`7202`)
- ``ldapsearch`` (:issue:`7578`)
- ``lightdm`` and ``dm-tool`` (:issue:`7624`)
- ``losetup`` (:issue:`7621`)
- ``micro`` (:issue:`7339`)
- ``mpc`` (:issue:`7169`)
- Metasploit's ``msfconsole``, ``msfdb`` and ``msfvenom`` (:issue:`6930`)
- ``mtr`` (:issue:`7638`)
- ``mysql`` (:issue:`6819`)
- ``ncat``, ``nc.openbsd``, ``nc.traditional`` and ``nmap`` (:issue:`6873`)
- ``openssl`` (:issue:`6845`)
- ``prime-run`` (:issue:`7241`)
- ``ps2pdf{12,13,14,wr}`` (:issue:`6673`)
- ``pyenv`` (:issue:`6551`)
- ``rst2html``, ``rst2html4``, ``rst2html5``, ``rst2latex``,
``rst2man``, ``rst2odt``, ``rst2pseudoxml``, ``rst2s5``,
``rst2xetex``, ``rst2xml`` and ``rstpep2html`` (:issue:`7019`)
- ``spago`` (:issue:`7381`)
- ``sphinx-apidoc``, ``sphinx-autogen``, ``sphinx-build`` and
``sphinx-quickstart`` (:issue:`7000`)
- ``strace`` (:issue:`6656`)
- systemd's ``bootctl``, ``coredumpctl``, ``hostnamectl`` (:issue:`7428`), ``homectl`` (:issue:`7435`), ``networkctl`` (:issue:`7668`) and ``userdbctl`` (:issue:`7667`)
- ``tcpdump`` (:issue:`6690`)
- ``tig``
- ``traceroute`` and ``tracepath`` (:issue:`6803`)
- ``windscribe`` (:issue:`6788`)
- ``wireshark``, ``tshark``, and ``dumpcap``
- ``xbps-*`` (:issue:`7239`)
- ``xxhsum``, ``xxh32sum``, ``xxh64sum`` and ``xxh128sum`` (:issue:`7103`)
- ``yadm`` (:issue:`7100`)
- ``zopfli`` and ``zopflipng`` (:issue:`6872`)
- Lots of improvements to completions, including:
- ``git`` completions can complete the right and left parts of a commit range like ``from..to`` or ``left...right``.
- Completion scripts for custom Git subcommands like ``git-xyz`` are now loaded with Git completions. The completions can now be defined directly on the subcommand (using ``complete git-xyz``), and completion for ``git xyz`` will work. (:issue:`7075`, :issue:`7652`, :issue:`4358`)
- ``make`` completions no longer second-guess make's file detection, fixing target completion in some cases (:issue:`7535`).
- Command completions now correctly print the description even if the command was fully matched (like in ``ls<TAB>``).
- ``set`` completions no longer hide variables starting with ``__``, they are sorted last instead.
- Improvements to the manual page completion generator (:issue:`7086`, :issue:`6879`, :issue:`7187`).
- Significant performance improvements to completion of the available commands (:issue:`7153`), especially on macOS Big Sur where there was a significant regression (:issue:`7365`, :issue:`7511`).
- Suffix completion using ``__fish_complete_suffix`` uses the same fuzzy matching logic as normal file completion, and completes any file but sorts files with matching suffix first (:issue:`7040`, :issue:`7547`). Previously, it only completed files with matching suffix.
For distributors
----------------
- fish has a new interactive test driver based on pexpect, removing the optional dependency on expect (and adding an optional dependency on pexpect) (:issue:`5451`, :issue:`6825`).
- The CHANGELOG was moved to restructured text, allowing it to be included in the documentation (:issue:`7057`).
- fish handles ncurses installed in a non-standard prefix better (:issue:`6600`, :issue:`7219`), and uses variadic tparm on NetBSD curses (:issue:`6626`).
- The Web-based configuration tool no longer uses an obsolete Angular version (:issue:`7147`).
- The fish project has adopted the Contributor Covenant code of conduct (:issue:`7151`).
Deprecations and removed features
---------------------------------
- The ``fish_color_match`` variable is no longer used. (Previously this controlled the color of matching quotes and parens when using ``read``).
- fish 3.2.0 will be the last release in which the redirection to standard error with the ``^`` character is enabled.
The ``stderr-nocaret`` feature flag will be changed to "on" in future releases.
- ``string`` is now a reserved word and cannot be used for function names (see above).
- ``fish_vi_cursor``'s option ``--force-iterm`` has been deprecated (see above).
- ``command``, ``jobs`` and ``type`` long-form option ``--quiet`` is deprecated in favor of ``--query`` (see above).
- The ``fish_command_not_found`` event is no longer emitted, instead there is a function of that name.
By default it will call a previously-defined ``__fish_command_not_found_handler``. To emit the event manually use ``emit fish_command_not_found``.
- The ``fish_prompt`` event no longer fires when ``read`` is used. If
you need a function to run any time ``read`` is invoked by a script,
use the new ``fish_read`` event instead (:issue:`7039`).
- To disable the greeting message permanently it is no longer enough to just run ``set fish_greeting`` interactively as it is
no longer implicitly a universal variable. Use ``set -U fish_greeting`` or disable it in config.fish with ``set -g fish_greeting``.
- The long-deprecated and non-functional ``-m``/``--read-mode`` options to ``read`` were removed in 3.1b1. Using the short form, or a never-implemented ``-B`` option, no longer crashes fish (:issue:`7659`).
- With the addition of new categories for debug options, the old numbered debugging levels have been removed.
For distributors and developers
-------------------------------
- fish source tarballs are now distributed using the XZ compression
method (:issue:`5460`).
- The fish source tarball contains an example FreeDesktop entry and icon.
- The CMake variable ``MAC_CODESIGN_ID`` can now be set to "off" to disable code-signing (:issue:`6952`, :issue:`6792`).
- Building on on macOS earlier than 10.13.6 succeeds, instead of failing on code-signing (:issue:`6791`).
- The pkg-config file now uses variables to ensure paths used are portable across prefixes.
- The default values for the ``extra_completionsdir``, ``extra_functionsdir``
and ``extra_confdir`` options now use the installation prefix rather than ``/usr/local`` (:issue:`6778`).
- A new CMake variable ``FISH_USE_SYSTEM_PCRE2`` controls whether fish
builds with the system-installed PCRE2, or the version it bundles. By
default it prefers the system library if available, unless Mac
codesigning is enabled (:issue:`6952`).
- Running the full interactive test suite now requires Python 3.5+ and the pexpect package (:issue:`6825`); the expect package is no longer required.
- Support for Python 2 in fish's tools (``fish_config`` and the manual page completion generator) is no longer guaranteed. Please use Python 3.5 or later (:issue:`6537`).
- The Web-based configuration tool is compatible with Python 3.10 (:issue:`7600`) and no longer requires Python's distutils package (:issue:`7514`).
- fish 3.2 is the last release to support Red Hat Enterprise Linux & CentOS version 6.
--------------
That is, 5.1 with the four post-release patches available so far.
This is a terse description of the new features added to bash-5.1 since
the release of bash-5.0. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
1. New Features in Bash
a. `bind -x' now supports different bindings for different editing modes and
keymaps.
b. Bash attempts to optimize the number of times it forks when executing
commands in subshells and from `bash -c'.
c. Here documents and here strings now use pipes for the expanded document if
it's smaller than the pipe buffer size, reverting to temporary files if it's
larger.
d. There are new loadable builtins: mktemp, accept, mkfifo, csv, cut/lcut
e. In posix mode, `trap -p' now displays signals whose disposition is SIG_DFL
and those that were SIG_IGN when the shell starts.
f. The shell now expands the history number (e.g., in PS1) even if it is not
currently saving commands to the history list.
g. `read -e' may now be used with arbitrary file descriptors (`read -u N').
h. The `select' builtin now runs traps if its internal call to the read builtin
is interrupted by a signal.
i. SRANDOM: a new variable that expands to a 32-bit random number that is not
produced by an LCRNG, and uses getrandom/getentropy, falling back to
/dev/urandom or arc4random if available. There is a fallback generator if
none of these are available.
j. shell-transpose-words: a new bindable readline command that uses the same
definition of word as shell-forward-word, etc.
k. The shell now adds default bindings for shell-forward-word,
shell-backward-word, shell-transpose-words, and shell-kill-word.
l. Bash now allows ARGV0 appearing in the initial shell environment to set $0.
m. If `unset' is executed without option arguments, bash tries to unset a shell
function if a name argument cannot be a shell variable name because it's not
an identifier.
n. The `test -N' operator uses nanosecond timestamp granularity if it's
available.
o. Bash posix mode now treats assignment statements preceding shell function
definitions the same as in its default mode, since POSIX has changed and
no longer requires those assignments to persist after the function returns
(POSIX interp 654).
p. BASH_REMATCH is no longer readonly.
q. wait: has a new -p VARNAME option, which stores the PID returned by `wait -n'
or `wait' without arguments.
r. Sorting the results of pathname expansion now uses byte-by-byte comparisons
if two strings collate equally to impose a total order; the result of a
POSIX interpretation.
s. Bash now allows SIGINT trap handlers to execute recursively.
t. Bash now saves and restores state around setting and unsetting posix mode,
instead of having unsetting posix mode set a known state.
u. Process substitution is now available in posix mode.
v. READLINE_MARK: a new variable available while executing commands bound with
`bind -x', contains the value of the mark.
w. Bash removes SIGCHLD from the set of blocked signals if it's blocked at shell
startup.
x. `test -v N' can now test whether or not positional parameter N is set.
y. `local' now honors the `-p' option to display all local variables at the
current context.
z. The `@a' variable transformation now prints attributes for unset array
variables.
aa. The `@A' variable transformation now prints a declare command that sets a
variable's attributes if the variable has attributes but is unset.
bb. `declare' and `local' now have a -I option that inherits attributes and
value from a variable with the same name at a previous scope.
cc. When run from a -c command, `jobs' now reports the status of completed jobs.
dd. New `U', `u', and `L' parameter transformations to convert to uppercase,
convert first character to uppercase, and convert to lowercase,
respectively.
ee. PROMPT_COMMAND: can now be an array variable, each element of which can
contain a command to be executed like a string PROMPT_COMMAND variable.
ff. `ulimit' has a -R option to report and set the RLIMIT_RTTIME resource.
gg. Associative arrays may be assigned using a list of key-value pairs within
a compound assignment. Compound assignments where the words are not of
the form [key]=value are assumed to be key-value assignments. A missing or
empty key is an error; a missing value is treated as NULL. Assignments may
not mix the two forms.
hh. New `K' parameter transformation to display associative arrays as key-
value pairs.
ii. Writing history to syslog now handles messages longer than the syslog max
length by writing multiple messages with a sequence number.
jj. SECONDS and RANDOM may now be assigned using arithmetic expressions, since
they are nominally integer variables. LINENO is not an integer variable.
kk. Bash temporarily suppresses the verbose option when running the DEBUG trap
while running a command from the `fc' builtin.
ll. `wait -n' now accepts a list of job specifications as arguments and will
wait for the first one in the list to change state.
mm. The associative array implementation can now dynamically increase the
size of the hash table based on insertion patterns.
nn. HISTFILE is now readonly in a restricted shell.
oo. The bash malloc now returns memory that is 16-byte aligned on 64-bit
systems.
pp. If the hash builtin is listing hashed filenames portably, don't print
anything if the table is empty.
qq. GLOBIGNORE now ignores `.' and `..' as a terminal pathname component.
rr. Bash attempts to optimize away forks in the last command in a function body
under appropriate circumstances.
ss. The globbing code now uses fnmatch(3) to check collation elements (if
available) even in cases without multibyte characters.
tt. The `fg' and `bg' builtins now return an error in a command substitution
when asked to restart a job inherited from the parent shell.
uu. The shell now attempts to unlink all FIFOs on exit, whether a consuming
process has finished with them or not.
vv. There is a new contributed loadable builtin: asort.
2. New Features in Readline
a. If a second consecutive completion attempt produces matches where the first
did not, treat it as a new completion attempt and insert a match as
appropriate.
b. Bracketed paste mode works in more places: incremental search strings, vi
overstrike mode, character search, and reading numeric arguments.
c. Readline automatically switches to horizontal scrolling if the terminal has
only one line.
d. Unbinding all key sequences bound to a particular readline function now
descends into keymaps for multi-key sequences.
e. rl-clear-display: new bindable command that clears the screen and, if
possible, the scrollback buffer (bound to emacs mode M-C-l by default).
f. New active mark and face feature: when enabled, it will highlight the text
inserted by a bracketed paste (the `active region') and the text found by
incremental and non-incremental history searches. This is tied to bracketed
paste and can be disabled by turning off bracketed paste.
g. Readline sets the mark in several additional commands.
h. Bracketed paste mode is enabled by default.
i. Readline tries to take advantage of the more regular structure of UTF-8
characters to identify the beginning and end of characters when moving
through the line buffer.
j. The bindable operate-and-get-next command (and its default bindings) are
now part of readline instead of a bash-specific addition.
k. The signal cleanup code now blocks SIGINT while processing after a SIGINT.
- Fix build on musl-libc platforms (#49)
- Default CFLAGS of -g -O2 if user didn't specify any
- Fix a bug on Linux systems (#48)
- Add an OKSH_VERSION variable that gives the user the oksh version
(KSH_VERSION and SH_VERSION are still their original values)
- Default to ST_MTIM when using --no-thanks
- Allow some code to be commented out when not compiling with curses
Changelog from AN-2020-11-04:
- Makefile system: include/schily/nlsdefs.h no longer by default defines
the macro __() because this is in conflict with definitions that are
present in the system include files from newer HP-UX versions.
Thanks to Rudi Blom for reporting.
- Bourne Shell: If a background job did finish during an implicit wait
for a foreground job, the exit code for the background job was lost.
This was caused by a forgotten call to statjob(jp, &si, 0, 0) in
the function waitjob();
Thanks to Koichi Nakashima for reporting.
- Bourne Shell: The changes from 2020-10-09 to keep the exit code from
jobs like "(sleep 10; exit 17)&" in the job list, caused a command like
cat /etc/termcap |more
to stop after the first page of output because "more" died from trying
to read the answer for continuing the output as it was not in the
current foreground process group from the tty. This was the result of
a forgotten call to monitor = ismonitor(xflags); in xec.c
- Bourne Shell: The changes from 2020-10-09 to keep the exit code from
jobs like "(sleep 10; exit 17)&" could cause some wait commands to hang
infinitely because the job list had an endless loop. The new code
avoids to create the endless loop in the job list.
Thanks to Koichi Nakashima for reporting.
- Bourne Shell: The changes for jobcontrol in schily-2020-10-09 could.
cause bosh to dump core with the builtin fg(1) command because "thisjob".
was a NULL pointer.
We add a new lastthisjob variable to work around this problem.
Thanks for Noci Sonack for reporting.
- bsh/Bourne Shell: str2sig() has been enhanced to support e.g.
RTMIN+20 or RTMAX-20 as alias on platforms with 30 RT signals.
Note that this currently only works on non-POSIX platforms like Linux
where our private implementation is used. On Solaris, this would need
to wait until compatibility to POSIX issue 8 has been implemented
in the libc from Solaris.
Changelog from AN-2020-11-25:
- Makefile System: Added support for MacOS on arm64
Thanks to a hint from Ryan Schmidt from macports
Note that due to outstanding replies to recent changes in configure,
it could up to now not be verified that all configure tests now work in
a way that results in correct overall results. See below for an in
depth report on the changes.
- Makefile System: autoconf (config.guess & config.sub) now supports
the new arm64 Apple systems.
Thanks to Ryan Schmidt from macports for provinding the needed uname(1)
output.
- Makefile System: Added a new shell script "autoconf/uname" that helps
to create shell scrips that allow to emulate an alien host system in
order to test the correct behavior of configure.guess and configure.sub
on the main development platform.
This helps to adapt configure.guess and configure.sub to new platforms
in the future.
- Makefile System: The new clang compiler as published with the upcomming
ARM macs has been preconfigured with
-Werror -Wimplicit-function-declaration
as the default behavior and thus is in conflict with the existing base
assumption of the autoconf system that minimalistic C-code used for
compile/link allows to check for the existence of a specific function
in libc without a need to know which system #include file is used to
define a prototype for that function.
This clang version, as a result of this default, behaves like a C++
compiler and aborts if a function is used with no previous function
prototype. This caused most of the existing autoconf test to fail with
error messages about missing prototypes.
We implemented a workaround using these methods for the identified
problems:
- Most of the exit() calls in the various main() functions have
been replaced by return() to avoid a need to
#include <stdlib.h> in special since these test may be the
case for layered tests that #include files from the higher
level parts.
- Many autoconf tests programs now #include more system include
files, e.g. stdlib.h and unistd.h to avoid missing prototype
errors. This cannot reliably be done in tests that are used as
a base for higher level tests where the high level test
#includes own system include files, since older platforms do
not support to #include the same file twice.
So this is tricky...
- A test for a Linux glibc bug caused by incorect #pragma weak
usage inside glibc that prevents one or more functions from
ecvt()/fcvt()/gcvt() from being usable outside glibc now uses
hand-written prototypes for some of the libc interface
functions in order to avoid using the system includes. If we
did not do that, we could not use ecvt()/fcvt()/gcvt() on
MacOS anymore.
Thanks to Ryan Schmidt from macports for reporting and for the given
help that was needed for remote debugging.
Please send the needed feedback on whether the current state of the
configure script results on correct autoconf results on the M1 Macs.
Changelog from AN-2020-11-04:
- Makefile system: include/schily/nlsdefs.h no longer by default defines
the macro __() because this is in conflict with definitions that are
present in the system include files from newer HP-UX versions.
Thanks to Rudi Blom for reporting.
- Bourne Shell: If a background job did finish during an implicit wait
for a foreground job, the exit code for the background job was lost.
This was caused by a forgotten call to statjob(jp, &si, 0, 0) in
the function waitjob();
Thanks to Koichi Nakashima for reporting.
- Bourne Shell: The changes from 2020-10-09 to keep the exit code from
jobs like "(sleep 10; exit 17)&" in the job list, caused a command like
cat /etc/termcap |more
to stop after the first page of output because "more" died from trying
to read the answer for continuing the output as it was not in the
current foreground process group from the tty. This was the result of
a forgotten call to monitor = ismonitor(xflags); in xec.c
- Bourne Shell: The changes from 2020-10-09 to keep the exit code from
jobs like "(sleep 10; exit 17)&" could cause some wait commands to hang
infinitely because the job list had an endless loop. The new code
avoids to create the endless loop in the job list.
Thanks to Koichi Nakashima for reporting.
- Bourne Shell: The changes for jobcontrol in schily-2020-10-09 could.
cause bosh to dump core with the builtin fg(1) command because "thisjob".
was a NULL pointer.
We add a new lastthisjob variable to work around this problem.
Thanks for Noci Sonack for reporting.
- bsh/Bourne Shell: str2sig() has been enhanced to support e.g.
RTMIN+20 or RTMAX-20 as alias on platforms with 30 RT signals.
Note that this currently only works on non-POSIX platforms like Linux
where our private implementation is used. On Solaris, this would need
to wait until compatibility to POSIX issue 8 has been implemented
in the libc from Solaris.
Changelog from AN-2020-11-25:
- Makefile System: Added support for MacOS on arm64
Thanks to a hint from Ryan Schmidt from macports
Note that due to outstanding replies to recent changes in configure,
it could up to now not be verified that all configure tests now work in
a way that results in correct overall results. See below for an in
depth report on the changes.
- Makefile System: autoconf (config.guess & config.sub) now supports
the new arm64 Apple systems.
Thanks to Ryan Schmidt from macports for provinding the needed uname(1)
output.
- Makefile System: Added a new shell script "autoconf/uname" that helps
to create shell scrips that allow to emulate an alien host system in
order to test the correct behavior of configure.guess and configure.sub
on the main development platform.
This helps to adapt configure.guess and configure.sub to new platforms
in the future.
- Makefile System: The new clang compiler as published with the upcomming
ARM macs has been preconfigured with
-Werror -Wimplicit-function-declaration
as the default behavior and thus is in conflict with the existing base
assumption of the autoconf system that minimalistic C-code used for
compile/link allows to check for the existence of a specific function
in libc without a need to know which system #include file is used to
define a prototype for that function.
This clang version, as a result of this default, behaves like a C++
compiler and aborts if a function is used with no previous function
prototype. This caused most of the existing autoconf test to fail with
error messages about missing prototypes.
We implemented a workaround using these methods for the identified
problems:
- Most of the exit() calls in the various main() functions have
been replaced by return() to avoid a need to
#include <stdlib.h> in special since these test may be the
case for layered tests that #include files from the higher
level parts.
- Many autoconf tests programs now #include more system include
files, e.g. stdlib.h and unistd.h to avoid missing prototype
errors. This cannot reliably be done in tests that are used as
a base for higher level tests where the high level test
#includes own system include files, since older platforms do
not support to #include the same file twice.
So this is tricky...
- A test for a Linux glibc bug caused by incorect #pragma weak
usage inside glibc that prevents one or more functions from
ecvt()/fcvt()/gcvt() from being usable outside glibc now uses
hand-written prototypes for some of the libc interface
functions in order to avoid using the system includes. If we
did not do that, we could not use ecvt()/fcvt()/gcvt() on
MacOS anymore.
Thanks to Ryan Schmidt from macports for reporting and for the given
help that was needed for remote debugging.
Please send the needed feedback on whether the current state of the
configure script results on correct autoconf results on the M1 Macs.
- Solaris has a function named sig2str. Rename ours oksh_sig2str.
- Pull in latest upstream code, which is #43 from Michael Forney.
- Make BINDIR and MANDIR actually depend on PREFIX.
- Variables have $'s.
- Older Linux has clock_gettime in librt; check for that.
- configure: improve clock_gettime diagnostic messages.
- HP-UX support.
- Add --enable-lto for those who want link-time optimization.
- Update to latest OpenBSD code.
- Make cross compiling a real possibility, with instructions.
- Fix typo.
- For loop initial declarations is a better C99 check for older gcc.
- Update from OpenBSD.
- Separate out compilation and linking in configure tests.
- Only add -std=gnu99 if using --no-thanks.
- If using --no-thanks and you didn't specify the environment
- --no-thanks isn't just for cross compiling
- Default to ST_MTIM when using --no-thanks
New features with AN-2020-09-04:
- autoconf: congig.guess: FreeBSD on 64 bit ARM returns arm64 from
uname -m; this was previously not supported and rejected by config.sub.
We now convert "arm64" into "aarch64" in config.guess to get the usual
expected results.
- Makefile system: RULES/rules.env The environment variables FIGNORE,
LD_LIBRARY_PATH LD_LIBRARY_PATH_32 and LD_LIBRARY_PATH_64 are now
unexported from the enviroment.
In special FIGNORE is dangerous, as it is frequently used by bash
users but tells ksh93 to modify it's behavior with "echo *" and
this may cause strange things with our makefiles in case that
/bin/sh is ksh92. This applies e.g. to Oracle Solaris 11 and
OpenSolaris.
- Bourne Shell: added $(RM) -f $(DEST_DIR)$(INSBASE)/xpg4/bin/bosh
to the Makefile in the commands before creating the symlink
xpg4/bin/bosh to bosh to permit to call "make install" more than
once without causing an error.
- Bourne Shell: version.h now contains a new version date.
New features with AN-2020-10-09:
- autoconf: Added support for newer HP-UX versions on Itanium.
Thanks to Rudi Blom for reporting and making a change proposal.
- Bourne Shell: The "wait" builtin is now POSIX compliant and returns 127
in $? in case that a process id to be waited for does not exist.
- Bourne Shell: The exit code retrieved by $/ no longer is masked by 0xFF
when this code originates from a wait(1) call.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: The man page has been enhanced for a better description
of the exit code constraitns.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: The exit code from background jobs is now kept until
the builtin wait(1) is called.
Note that this introduces the need to call "wait" from time to time
in order to free shell job management resources.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: The changes to keep exit codes for background jobs
caused problems that triggered a SIGSEGV in the shell with jobs like:
(sleep 10; exit 17)&
This needed a restructuring in the job management implementation.
- Bourne Shell: Since the next POSIX standard will make it optional
whether sig2str() and str2sig() deal with entries for "EXIT" / 0,
we enhanced the trap2str() and str2trap() interfaces to handle
"EXIT" / 0 and now call these functions before sig2str() and
str2sig().
- Bourne Shell: a new version date has been created.
New features with AN-2020-09-04:
- autoconf: congig.guess: FreeBSD on 64 bit ARM returns arm64 from
uname -m; this was previously not supported and rejected by config.sub.
We now convert "arm64" into "aarch64" in config.guess to get the usual
expected results.
- Makefile system: RULES/rules.env The environment variables FIGNORE,
LD_LIBRARY_PATH LD_LIBRARY_PATH_32 and LD_LIBRARY_PATH_64 are now
unexported from the enviroment.
In special FIGNORE is dangerous, as it is frequently used by bash
users but tells ksh93 to modify it's behavior with "echo *" and
this may cause strange things with our makefiles in case that
/bin/sh is ksh92. This applies e.g. to Oracle Solaris 11 and
OpenSolaris.
- Bourne Shell: added $(RM) -f $(DEST_DIR)$(INSBASE)/xpg4/bin/bosh
to the Makefile in the commands before creating the symlink
xpg4/bin/bosh to bosh to permit to call "make install" more than
once without causing an error.
- Bourne Shell: version.h now contains a new version date.
New features with AN-2020-10-09:
- autoconf: Added support for newer HP-UX versions on Itanium.
Thanks to Rudi Blom for reporting and making a change proposal.
- Bourne Shell: The "wait" builtin is now POSIX compliant and returns 127
in $? in case that a process id to be waited for does not exist.
- Bourne Shell: The exit code retrieved by $/ no longer is masked by 0xFF
when this code originates from a wait(1) call.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: The man page has been enhanced for a better description
of the exit code constraitns.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: The exit code from background jobs is now kept until
the builtin wait(1) is called.
Note that this introduces the need to call "wait" from time to time
in order to free shell job management resources.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: The changes to keep exit codes for background jobs
caused problems that triggered a SIGSEGV in the shell with jobs like:
(sleep 10; exit 17)&
This needed a restructuring in the job management implementation.
- Bourne Shell: Since the next POSIX standard will make it optional
whether sig2str() and str2sig() deal with entries for "EXIT" / 0,
we enhanced the trap2str() and str2trap() interfaces to handle
"EXIT" / 0 and now call these functions before sig2str() and
str2sig().
- Bourne Shell: a new version date has been created.
ShellCheck is a GPLv3 tool that gives warnings and suggestions for
bash/sh shell scripts.
The goals of ShellCheck are:
* To point out and clarify typical beginner's syntax issues that cause
a shell to give cryptic error messages.
* To point out and clarify typical intermediate level semantic problems
that cause a shell to behave strangely and counter-intuitively.
* To point out subtle caveats, corner cases and pitfalls that may cause
an advanced user's otherwise working script to fail under future
circumstances.
New features with AN-2020-07-18:
- Bourne Shell: A new symlink from /opt/schily/xpg4/bin/bosh to
/opt/schily/xpg4/bin/sh is created when "smake install" is called.
This helps people to call "bosh" in strict POSIX mode using the
command line name "bosh" by putting /opt/schily/xpg4/bin in PATH
before /opt/schily/bin, where the bosh implements better backwards
cmpatibility to the Bourne Shell by default than a strictly POSIX
compliant bosh would do. /opt/schily/xpg4/bin/bosh behaves the same
as "/opt/schily/bin/bosh -o posix".
Thanks to Koichi Nakashima for reporting.
New features with AN-2020-08-12:
- autoconf: added a new test for the existence of <sys/auxv.h>
- autoconf: added new tests for Linux getauxval() and FreeBSD elf_aux_info()
- libschily: getexecpath.c now uses getauxval() on Linux and elf_aux_info()
on FreeBSD. This was needed since readlink("/proc/curproc/file") on
FreeBSD returns random values for hardlinked files, making it impossible
to use the result in order to find out which behavior variant of a
fat binary is requested.
- Bourne Shell: Several #ifdef SIG* have been added to make it compile
on older UNIX versions.
Thanks to a hint from Albert Wik.
New features with AN-2020-07-18:
- Bourne Shell: A new symlink from /opt/schily/xpg4/bin/bosh to
/opt/schily/xpg4/bin/sh is created when "smake install" is called.
This helps people to call "bosh" in strict POSIX mode using the
command line name "bosh" by putting /opt/schily/xpg4/bin in PATH
before /opt/schily/bin, where the bosh implements better backwards
cmpatibility to the Bourne Shell by default than a strictly POSIX
compliant bosh would do. /opt/schily/xpg4/bin/bosh behaves the same
as "/opt/schily/bin/bosh -o posix".
Thanks to Koichi Nakashima for reporting.
New features with AN-2020-08-12:
- autoconf: added a new test for the existence of <sys/auxv.h>
- autoconf: added new tests for Linux getauxval() and FreeBSD elf_aux_info()
- libschily: getexecpath.c now uses getauxval() on Linux and elf_aux_info()
on FreeBSD. This was needed since readlink("/proc/curproc/file") on
FreeBSD returns random values for hardlinked files, making it impossible
to use the result in order to find out which behavior variant of a
fat binary is requested.
- Bourne Shell: Several #ifdef SIG* have been added to make it compile
on older UNIX versions.
Thanks to a hint from Albert Wik.
Take maintainership.
Changelog from AN-2020-07-01:
- Bourne Shell: A command like
bosh -c 'var=$({ echo value >&3; } 3>&1); echo $var'
Did not print "value" as expected, but rather bosh: 3: bad file number
This is related to the fact that curly brackets do not have an
own binary node type in the parsed output and the recursive parser
from the $(cmd) execution needs to reconstruct the text form
of a command tree. As a result, the command has been translated
into:
bosh -c 'var=$( echo value >&3 3>&1); echo $var'
and this caused the observed problem.
Note that this basic problem may not be finally fixed, so please
report in case that other commands with curly brackets together
with $(cmd) cause problems.
Thanks to Koichi Nakashima for reporting.
Take maintainership.
Changelog from AN-2020-07-01:
- Bourne Shell: A command like
bosh -c 'var=$({ echo value >&3; } 3>&1); echo $var'
Did not print "value" as expected, but rather bosh: 3: bad file number
This is related to the fact that curly brackets do not have an
own binary node type in the parsed output and the recursive parser
from the $(cmd) execution needs to reconstruct the text form
of a command tree. As a result, the command has been translated
into:
bosh -c 'var=$( echo value >&3 3>&1); echo $var'
and this caused the observed problem.
Note that this basic problem may not be finally fixed, so please
report in case that other commands with curly brackets together
with $(cmd) cause problems.
Thanks to Koichi Nakashima for reporting.
- Bourne Shell: Added a unit test for the bug above.
This fixes:
In certain cases, bash does not perform quoted null removal on patterns
that are used as part of word expansions such as ${parameter##pattern}, so
empty patterns are treated as non-empty
This can cause circular problems where the +INSTALL script requires the shell
itself, but also avoids issues trying to add to /etc/shells during bootstrap
where it may not be appropriate, or done outside of the context of where the
bootstrap tarball will finally be installed.
Users who use mksh as a bootstrap shell can simply add to /etc/shells manually
after installing or extracting the bootstrap as required.
While here remove unnecessary extra indents.
Two patches have been applied on top, both of which are stored in the
patches directory as manual-Build.sh and manual-funcs.c, to fix issues
on Darwin and SunOS that will be included in the next mksh release. The
binary mksh.ico file has been manually removed.
This paves the way for mksh to be used as an alternate bootstrap shell
instead of shells/pdksh, which has been unmaintained for many years and
has some known issues.
Initial bulk build results on Darwin and SunOS look good, and having a
maintained shell which focuses on portability and speed should provide
us with a better long-term option for systems which require a bootstrap
shell.
- Use OS specific helper code from devel/smake/Makefile.common
Changes from AN-2020-05-25:
- libmdgest: Added a "defined(_M_ARM)" check for MSVC byte order
definitions (byte_order.h).
Thanks to "Excalibur" for reporting.
- Bourne Shell: The support for the OLDPWD environment has been moved
from DO_SYSPUSHD to DO_POSIX_CD and as a result, the minimal POSIX
compile variant "pbosh" now supports "$OLDPWD" and "cd -".
This was based on a bug in the POSIX standard that did not include
OLDPWD in the overview of shell environment variables. See
https://www.austingroupbugs.net/view.php?id=1343
Thanks to Koichi Nakashima for reporting
- Use OS specific helper code from devel/smake/Makefile.common
Changes from AN-2020-05-25:
- libmdgest: Added a "defined(_M_ARM)" check for MSVC byte order
definitions (byte_order.h).
Thanks to "Excalibur" for reporting.
- Bourne Shell: The unit tests for the ERR trap did not work on NetBSD
because /bin/false does not exists on NetBSD. We now first check
for /bin/false and /usr/bin/false and use what's available.
Thanks to Michael Bäuerle from pkgsrc for reporting.
These packages are susceptible to bugs when confronted with non-ASCII
characters.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94182.
It takes some time to analyze and fix these individually, therefore they
are only marked as "needs work".
R59b is a must-have bugfix upgrade for R59 (not R58):
[tg] Handle other tmux $TERM types, pointed out by multi via IRC
[tg] Fix typo in FAQ
[tg] y='a\*b'; [[ $x = $y ]] regression (Martijn Dekker) fix
[l0kod] Defuse CLIP OS O_MAYEXEC support (cf. LWN)
[tg] Make set +o output a command to restore the currently set and (new!) cleared options, keep a reset state per session (experimental)
[tg] Correct documentation and code regarding to argv[0] parsing: first ‘-’ for login shells, then ‘r’ case-insensitively for restricted shell, then “sh”*, again case-insensitively, for BINSH_* modes; add tests
[tg] On OS/2, allow case-insensitive name for direct builtin call
[tg] Always skip startup files if direct builtin call
[tg] Avoid some sometimes-redundant startup codepaths
R59 has some major fixes, also introducing breaking changes:
[tg] Repair out-of-tree builds (noticed by rsc)
[tg] Work around a glibc on Hurd issue in testsuite
[komh] OS/2 filesystem mtime granularity is two seconds (as in FAT)
[tg] Replace while with goto: Coverity was confused
[tg] Fix invocation of some builtins when external utility absent
[komh] Improve automatic executable suffix for test builtin
[tg] Style code, refactor, clean up, optimise
[tg] Use cached egid in test builtin
[tg] Make bind builtin output reentry-safe; safety fixes
[tg] If basename(argv[0]) after leading dash removal begins with an ‘r’ enable restricted shell flag; reported by pmjdebruijn via IRC
[tg] Fix code example in manpage for how tab completion escapes
[tg] Match full extglob pattern RHS of [[ string comparison like ksh93
[tg] Implement which with -a in dot.mkshrc
[tg] Remove global builtin (use typeset -g)
[tg] alias, command, whence: Print alias names quoted
[tg] Implement a new quote-region (Esc+Q) editing command
[tg] Document all built-in aliases (requested by msiism via IRC) and those aliases and functions shipped in dot.mkshrc; completely overhaul builtin and reserved word documentation, for consistency
[tg] The manual page now features properly spaced em dashes ☻
[tg] Document that test x = y doesn’t extglob, only [[ x = y ]] does
R58 contains a lot of fixes and improvements:
[lintian] hyphen-used-as-minus-sign (on jessie, not later, ‽‽‽)
[tg] Fix system info gcc dump{machine,version} shell escaping level
[tg] Document KSH_VERSIONNAME_VENDOR_EXT in Build.sh
[tg] Be more explicit about the LTO bug exposed by check.t
[Todd C. Miller] Add -x (file locks) and AIX-specific -r ulimits
[tg] Handle Midipix as test environment and fix some warnings
[tg] Fix some Build.sh issues as Mirtoconf is now used by MirCPIO and MagicPoint
[komh] Improve CRLF to LF conversion
[komh] Ensure ECHO mode is enabled at startup so read has local echo
[komh] Let check.pl retain the PERLIO env variable
[komh] Unbreak nounset-1 test on systems with drive letters
[komh, tg] Make ulimit-3 test work without |& (that is, incomplete ports, i.e. those with -DMKSH_NOPROSPECTOFWORK)
[tg] Disable xxx-stat-1 test for now, fails when run as root
[tg] Drop Build.sh flags -c combine, -c lto
[Martijn Dekker] Exit 126 on execve(2) failure, not 1 (e.g. E2BIG)
[tg] Behave set and export/readonly-on-read-only-variables when run with command and command dot, bugreports by Martijn Dekker
[tg] dot.mkshrc: simplify; enhance (un)setting locale example
[tg, selk] Catch build errors earlier
[tg] Add -fno-lto (if GCC is detected) to CFLAGS and LDFLAGS
[tg] Limit HISTSIZE to 65535, as long pre-announced
[tg] Unbreak testsuite selftest-tty-absent for lksh
[tg] Begin work on support for neatcc (needs neatcc to evolve first)
[tg] Fix possibly not enough aligned access in struct job
[tg] Support going full setugid by running “set -p” once interactive
[tg] Document another (arcane, almost nowhere needed) definition
[tg] Improve code legibility and testsuite reliability and maintenance
[tg] Speed up trivial += cases (LP#1855167)
[tg] Some further code and memory optimisation and test coverage
[tg] Document that += is always string append (LP#1857702)
[tg] Fix “set -e appears active within eval but isn’t” reported by Martijn Dekker and another bug related to using set ±e inside eval
[tg] Handle parameter assignment in front of invocations of POSIX-style functions like ksh-style ones and external utilities; cf. Debian #935115
[tg] Fix bad memory access for invalid syntax (LP#1857828, LP#1857826)
[Brian Callahan] Update MALLOC_OPTIONS-using testcase for newer OpenBSD
[tg] Support lacc as compiler (just detecting, no change), thanks Brian
[tg] Share __IDSTRING with jupp
[tg] Update string comparison/pattern documentation
[tg, veedeeh] Document vi command line editing mode state better
[tg] Add FAQ2HTML.sh to convert mksh.faq to local valid XHTML+CSS
[tg] Correct backslash expansion documentation; caveat re. 16-bit UCS
[tg] Fix extra empty field on IFS-NWS trim expansion (Martijn Dekker)
[tg] Improve code performance, quality, robustness and correctness
[tg] Allow ${x:n} where n is an identifier (veedeeh)
[tg] Permit ‘+’ in alias names, but not leading (Aleksey Cheusov)
[tg] Fix here strings for $@ (LP#1857195), reported by jvdh
[multiplexd] Add vi mode PgDn, similar to PgUp doing history search
[tg] Build.sh fixup unreliable test -n/-z
[multiplexd] Correct documentation of vi mode @c
[tg] Update to UCD 13.0.0
[tg] Use nanoseconds in test -nt / -ot (LP#1855325)
# fish 3.1.2 (released April 29, 2020)
This release of fish fixes a major issue discovered in fish 3.1.1:
- Commands such as `fzf` and `enhancd`, when used with `eval`, would hang. `eval` buffered output too aggressively, which has been fixed (#6955).
If you are upgrading from version 3.0.0 or before, please also review the release notes for 3.1.1, 3.1.0 and 3.1b1 (included below).
---
# fish 3.1.1 (released April 27, 2020)
This release of fish fixes a number of major issues discovered in fish 3.1.0.
- Commands which involve `. ( ... | psub)` now work correctly, as a bug in the `function --on-job-exit` option has been fixed (#6613).
- Conflicts between upstream packages for ripgrep and bat, and the fish packages, have been resolved (#5822).
- Starting fish in a directory without read access, such as via `su`, no longer crashes (#6597).
- Glob ordering changes which were introduced in 3.1.0 have been reverted, returning the order of globs to the previous state (#6593).
- Redirections using the deprecated caret syntax to a file descriptor (eg `^&2`) work correctly (#6591).
- Redirections that append to a file descriptor (eg `2>>&1`) work correctly (#6614).
- Building fish on macOS (#6602) or with new versions of GCC (#6604, #6609) is now successful.
- `time` is now correctly listed in the output of `builtin -n`, and `time --help` works correctly (#6598).
- Exported universal variables now update properly (#6612).
- `status current-command` gives the expected output when used with an environment override - that is, `F=B status current-command` returns `status` instead of `F=B` (#6635).
- `test` no longer crashes when used with "`nan`" or "`inf`" arguments, erroring out instead (#6655).
- Copying from the end of the command line no longer crashes fish (#6680).
- `read` no longer removes multiple separators when splitting a variable into a list, restoring the previous behaviour from fish 3.0 and before (#6650).
- Functions using `--on-job-exit` and `--on-process-exit` work reliably again (#6679).
- Functions using `--on-signal INT` work reliably in interactive sessions, as they did in fish 2.7 and before (#6649). These handlers have never worked in non-interactive sessions, and making them work is an ongoing process.
- Functions using `--on-variable` work reliably with variables which are set implicitly (rather than with `set`), such as "`fish_bind_mode`" and "`PWD`" (#6653).
- 256 colors are properly enabled under certain conditions that were incorrectly detected in fish 3.1.0 (`$TERM` begins with xterm, does not include "`256color`", and `$TERM_PROGRAM` is not set) (#6701).
- The Mercurial (`hg`) prompt no longer produces an error when the current working directory is removed (#6699). Also, for performance reasons it shows only basic information by default; to restore the detailed status, set `$fish_prompt_hg_show_informative_status`.
- The VCS prompt, `fish_vcs_prompt`, no longer displays Subversion (`svn`) status by default, due to the potential slowness of this operation (#6681).
- Pasting of commands has been sped up (#6713).
- Using extended Unicode characters, such as emoji, in a non-Unicode capable locale (such as the `C` or `POSIX` locale) no longer renders all output blank (#6736).
- `help` prefers to use `xdg-open`, avoiding the use of `open` on Debian systems where this command is actually `openvt` (#6739).
- Command lines starting with a space, which are not saved in history, now do not get autosuggestions. This fixes an issue with Midnight Commander integration (#6763), but may be changed in a future version.
- Copying to the clipboard no longer inserts a newline at the end of the content, matching fish 2.7 and earlier (#6927).
- `fzf` in complex pipes no longer hangs. More generally, code run as part of command substitutions or `eval` will no longer have separate process groups. (#6624, #6806).
This release also includes:
- a number of changes to improve macOS compatibility with code signing and notarization;
- a number of improvements to completions; and
- a number of content and formatting improvements to the documentation.
If you are upgrading from version 3.0.0 or before, please also review the release notes for 3.1.0 and 3.1b1 (included below).
## Errata for fish 3.1
A new builtin, `time`, was introduced in the fish 3.1 releases. This builtin is a reserved word (like `test`, `function`, and others) because of the way it is implemented, and functions can no longer be named `time`. This was not clear in the fish 3.1b1 changelog.
tbl of NetBSD does not work, install man page with unprocessed tables as
workaround.
Changes from AN-2020-03-11:
- configure: The autoconfiguration now has an enhanced test for waitid()
that was needed since Mac OS is still not POSIX compliant and returns 0
instead of the signal number for a process that has been killed by a
signal. MacOS did pass the POSIX certification as a result of a missing
test for that problem.
Since every vertified OS needs to run an annual refresh the
certification with recent versions of the test, I guess that
Mac OS (Catalina updates) may become more compliant witin a year.
- psmake: The portable bootstrap compile environment for smake missed
a symlink for unsetenv.c to libschily since the related code has been
moved to libschily in 2018. This prevented compilation on IRIX.
Thanks to Kazuo Kuroi for reporting
- libshedit: mystdio.h now calls #undef sprintf and #undef snprintf
before redefining the names. This avoids clang warnings on MacOS.
- Bourne Shell: set -m now works in scripts as well. Before, bosh did
never call startjobs() when the shell startup was done with a shell
script.
- Bourne Shell: The shell now supports the alternate ;& switch
command limiter in addition to ;; where ;& implements a fallthrough
to the next command list regardless on thether there is a match or not.
- Bourne Shell: The file xec.c has been reindented for the "case" support
code in the interpreter. The indentation is now one tab less so code
becomes more readable.
- ved/bsh/bosh: map.c now includes better command for the routines that
implement fallback to some basic mapping when no user defined mapping
has been set up.
Changes from AN-2020-03-27:
- Bourne Shell: The case statement now supports the alternate end case
symbol ";;&" that has been introduced by bash. If ";;&" is used instead
of ";;", the next pattern list is evaluated and if there is a match,
the related command list is executed.
Changes from AN-2020-04-18:
- Bourne Shell: IRIX has ls(1) installed as /sbin/ls and this caused
some of our unit tests to fail. We now only check for "bin/ls" and
no longer for "/bin/ls" in "type" return messages.
- Bourne Shell/bsh: signames.c has been modified to work correctly if the
number of statically defined realtime signals is odd. This applies to
NetBSD and caused the shells to miss RTMIN+15 on NetBSD.
Thanks to Robert Elz for reporting
- Bourne Shell: A new trap code "ERR" as been introduced. This is modeled
after a feature from ksh88. "trap cmd ERR" causes "cmd" to be called
whenever a command causes a non-zero exit code. The "cmd" is not called
in case that with "set -e" the shell would not exit.
This is not required by POSIX but helpful.
- Bourne Shell: A new set of unit tests for the ERR trap has been added.
- Bourne Shell: An attempt to fix the POSIX behavior for set -e from
October 2018 has been identified to be wrong. If we kept that change,
a list with "set -e; ..." and a failing command would not exit as
expected.
- Bourne Shell: A new piece of code has been added to handle set -e
for function calls.
- Bourne Shell: The man page now better explains the behavior, if in
set -e mode.
- Bourne Shell: print.c::prs_cntl() could cause a buffer overflow with
"unprintable" multi byte UNICODE characters that are printed as list
of octal escape sequences. the buffer overflow happened because there
was only redzone space for one such octal escape sequence.
Thanks to Heiko Eißfeldt for reporting
Changes from AN-2020-05-11:
- Makefile system: A new version of the BSD make (bmake) program fixed
a bug in pattern macro substitution, so we are now able to detect
BSD make and to read BSD make program specific rules.
This could in theory allow us to support BSD make in the future,
but...
Note that we on the other side discovered a new bug with pattern
macro substitution in bsd make: The substitution:
$(FOO:%=bar/%)
is replaced by "bar/" with an empty "FOO", but of course, with an
empty FOO, the substitution should be empty as well.
This second bug (above) was fixed on May 6th, but we do not yet have
all needed make rules and we do not know whether other bugs may still
prevent the usability of BSD make. Supporting BSD make will be hard
as BSD make does not support pattern matching default rules and this
is important for placing the .o files into a sub-directory.
Also note that the portable program source for "bmake" from "pkgsrc"
is 2 years old and thus currently cannot be supported at all. If
you like to experiment on your own, you need to get this version:
http://crufty.net/help/sjg/bmake.html
see
http://www.crufty.net/ftp/pub/sjg/bmake.tar.gz
and replace the newer files from the netbsd.org CVS tree by hand in
order to fix the first and second mentioned pattern macro substitution
bug.
- Makefile system: RULES/MKLINKS was enhanced to create a new symlink
RULES/r-bsdmake.tag that points to RULES/r-make.tag
- Makefile system: The archive makefiles.tar.bz2 has been added to the
schilytools tree to allow easy reuse of the makefile system for own
projects.
- Bourne Shell: The unit tests for the new ERR trap did not work on
Solaris because /bin/false on Solaris causes an exit code of 255.
We now only check for an exit code != 0.
- Bourne Shell: Some of the unit tests for the trap command are now only
run in case that the SUT is "bosh".
- Bourne Shell: set -- now checks the '\0' character at the end of
the string "--". This fixes strange behavior with argument strings that
start with "--".
- Bourne Shell: Added a new flag XEC_INFUNC to the xflag parameter to mark
the fact when inside a function.
- Bourne Shell: set -e no longer causes commands with nonzero exit code
to abort inside a function in case that the return code of that function
is evaluated by e.g. an "if" statement.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: A unit test for the above bug has been added.
- Bourne Shell: $- may no longer be partially wrong (and miss the state
of the -e flag).
Thanks to Koichi Nakashima for reporting
- Bourne Shell: under some rare conditions, the syntax tree -> cmdline
converter could omit a command delimiter. This was the result of the
fact that a helper variable "didnl" (used for codeoutput beautifying)
was not reset in func.c and thus could cause
printf a ; printf b
to print "aprintf b" instead of "ab"
Thanks to Koichi Nakashima for reporting
- Bourne Shell: A unit test for the above bug has been added.
- Bourne Shell: A command like:
command | while read name; do loopcmd; done
did stop after the first loop because "read" did then read from stdin
instead of using the pipe file descriptor. This happened only of
"loopcmd" was not a shell builtin.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: A unit test for the above bug has been added.
- Bourne Shell: When we added support for ${var+value with spaces}
4 years ago, we forgot to enhance the lexer the same way for things
like "${var+value with spaces}" and "${var+"value with spaces"}".
This has been forgotten, because a different part of the lexer is
used to parse that kind of quoted strings. The lexer now supports
looking for closing '}' in quoted text as well.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: A unit test for the above bug has been added.
- Bourne Shell: The expression "${var1#"$var2"}" has been introduced by
ksh88 with strange rules for the way the double quotes past # are
handled. We now support them....
Thanks to Koichi Nakashima for reporting
- Bourne Shell: A unit test for the above bug has been added.
- Bourne Shell: Some unit tests from "mksh" (that previously have been
disabled) have been enabled, since the two changes above now make
the Bourne Shell behave like "mksh" for these 6 additional tests.
Fixed path of true and false utilities for testsuite.
tbl of NetBSD does not work, install man page with unprocessed tables as
workaround.
Changes from AN-2020-03-11:
- configure: The autoconfiguration now has an enhanced test for waitid()
that was needed since Mac OS is still not POSIX compliant and returns 0
instead of the signal number for a process that has been killed by a
signal. MacOS did pass the POSIX certification as a result of a missing
test for that problem.
Since every vertified OS needs to run an annual refresh the
certification with recent versions of the test, I guess that
Mac OS (Catalina updates) may become more compliant witin a year.
- psmake: The portable bootstrap compile environment for smake missed
a symlink for unsetenv.c to libschily since the related code has been
moved to libschily in 2018. This prevented compilation on IRIX.
Thanks to Kazuo Kuroi for reporting
- libshedit: mystdio.h now calls #undef sprintf and #undef snprintf
before redefining the names. This avoids clang warnings on MacOS.
- Bourne Shell: set -m now works in scripts as well. Before, bosh did
never call startjobs() when the shell startup was done with a shell
script.
- Bourne Shell: The shell now supports the alternate ;& switch
command limiter in addition to ;; where ;& implements a fallthrough
to the next command list regardless on thether there is a match or not.
- Bourne Shell: The file xec.c has been reindented for the "case" support
code in the interpreter. The indentation is now one tab less so code
becomes more readable.
- ved/bsh/bosh: map.c now includes better command for the routines that
implement fallback to some basic mapping when no user defined mapping
has been set up.
Changes from AN-2020-03-27:
- Bourne Shell: The case statement now supports the alternate end case
symbol ";;&" that has been introduced by bash. If ";;&" is used instead
of ";;", the next pattern list is evaluated and if there is a match,
the related command list is executed.
Changes from AN-2020-04-18:
- Bourne Shell: IRIX has ls(1) installed as /sbin/ls and this caused
some of our unit tests to fail. We now only check for "bin/ls" and
no longer for "/bin/ls" in "type" return messages.
- Bourne Shell/bsh: signames.c has been modified to work correctly if the
number of statically defined realtime signals is odd. This applies to
NetBSD and caused the shells to miss RTMIN+15 on NetBSD.
Thanks to Robert Elz for reporting
- Bourne Shell: A new trap code "ERR" as been introduced. This is modeled
after a feature from ksh88. "trap cmd ERR" causes "cmd" to be called
whenever a command causes a non-zero exit code. The "cmd" is not called
in case that with "set -e" the shell would not exit.
This is not required by POSIX but helpful.
- Bourne Shell: A new set of unit tests for the ERR trap has been added.
- Bourne Shell: An attempt to fix the POSIX behavior for set -e from
October 2018 has been identified to be wrong. If we kept that change,
a list with "set -e; ..." and a failing command would not exit as
expected.
- Bourne Shell: A new piece of code has been added to handle set -e
for function calls.
- Bourne Shell: The man page now better explains the behavior, if in
set -e mode.
- Bourne Shell: print.c::prs_cntl() could cause a buffer overflow with
"unprintable" multi byte UNICODE characters that are printed as list
of octal escape sequences. the buffer overflow happened because there
was only redzone space for one such octal escape sequence.
Thanks to Heiko Eißfeldt for reporting
Changes from AN-2020-05-11:
- Makefile system: A new version of the BSD make (bmake) program fixed
a bug in pattern macro substitution, so we are now able to detect
BSD make and to read BSD make program specific rules.
This could in theory allow us to support BSD make in the future,
but...
Note that we on the other side discovered a new bug with pattern
macro substitution in bsd make: The substitution:
$(FOO:%=bar/%)
is replaced by "bar/" with an empty "FOO", but of course, with an
empty FOO, the substitution should be empty as well.
This second bug (above) was fixed on May 6th, but we do not yet have
all needed make rules and we do not know whether other bugs may still
prevent the usability of BSD make. Supporting BSD make will be hard
as BSD make does not support pattern matching default rules and this
is important for placing the .o files into a sub-directory.
Also note that the portable program source for "bmake" from "pkgsrc"
is 2 years old and thus currently cannot be supported at all. If
you like to experiment on your own, you need to get this version:
http://crufty.net/help/sjg/bmake.html
see
http://www.crufty.net/ftp/pub/sjg/bmake.tar.gz
and replace the newer files from the netbsd.org CVS tree by hand in
order to fix the first and second mentioned pattern macro substitution
bug.
- Makefile system: RULES/MKLINKS was enhanced to create a new symlink
RULES/r-bsdmake.tag that points to RULES/r-make.tag
- Makefile system: The archive makefiles.tar.bz2 has been added to the
schilytools tree to allow easy reuse of the makefile system for own
projects.
- Bourne Shell: The unit tests for the new ERR trap did not work on
Solaris because /bin/false on Solaris causes an exit code of 255.
We now only check for an exit code != 0.
- Bourne Shell: Some of the unit tests for the trap command are now only
run in case that the SUT is "bosh".
- Bourne Shell: set -- now checks the '\0' character at the end of
the string "--". This fixes strange behavior with argument strings that
start with "--".
- Bourne Shell: Added a new flag XEC_INFUNC to the xflag parameter to mark
the fact when inside a function.
- Bourne Shell: set -e no longer causes commands with nonzero exit code
to abort inside a function in case that the return code of that function
is evaluated by e.g. an "if" statement.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: A unit test for the above bug has been added.
- Bourne Shell: $- may no longer be partially wrong (and miss the state
of the -e flag).
Thanks to Koichi Nakashima for reporting
- Bourne Shell: under some rare conditions, the syntax tree -> cmdline
converter could omit a command delimiter. This was the result of the
fact that a helper variable "didnl" (used for codeoutput beautifying)
was not reset in func.c and thus could cause
printf a ; printf b
to print "aprintf b" instead of "ab"
Thanks to Koichi Nakashima for reporting
- Bourne Shell: A unit test for the above bug has been added.
- Bourne Shell: A command like:
command | while read name; do loopcmd; done
did stop after the first loop because "read" did then read from stdin
instead of using the pipe file descriptor. This happened only of
"loopcmd" was not a shell builtin.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: A unit test for the above bug has been added.
- Bourne Shell: When we added support for ${var+value with spaces}
4 years ago, we forgot to enhance the lexer the same way for things
like "${var+value with spaces}" and "${var+"value with spaces"}".
This has been forgotten, because a different part of the lexer is
used to parse that kind of quoted strings. The lexer now supports
looking for closing '}' in quoted text as well.
Thanks to Koichi Nakashima for reporting
- Bourne Shell: A unit test for the above bug has been added.
- Bourne Shell: The expression "${var1#"$var2"}" has been introduced by
ksh88 with strange rules for the way the double quotes past # are
handled. We now support them....
Thanks to Koichi Nakashima for reporting
- Bourne Shell: A unit test for the above bug has been added.
- Bourne Shell: Some unit tests from "mksh" (that previously have been
disabled) have been enabled, since the two changes above now make
the Bourne Shell behave like "mksh" for these 6 additional tests.
The README file has been renamed to README.md.
Since it is not installed anyway, there's no need to patch it.
If this need should ever arise again, the other paths in that file
should be patched as well.
Patch 16 was for this problem:
Bash waits too long to reap /dev/fd process substitutions used as redirections
with loops and group commands, which can lead to file descriptor exhaustion.
Patch 17 (this one):
There were cases where patch 16 reaped process substitution file descriptors
(or FIFOs) and processes to early. This is a better fix for the problem that
bash50-016 attempted to solve.
probably could do with an update).
Bosh changes (we skipped 2 intermediate releases):
New features with AN-2020-03-11:
- Bourne Shell: set -m now works in scripts as well. Before, bosh did
never call startjobs() when the shell startup was done with a shell
script.
- Bourne Shell: The shell now supports the alternate ;& switch
command limiter in addition to ;; where ;& implements a fallthrough
to the next command list regardless on thether there is a match or not.
New features with AN-2020-03-27:
- Bourne Shell: The case statement now supports the alternate end case
symbol ";;&" that has been introduced by bash. If ";;&" is used instead
of ";;", the next pattern list is evaluated and if there is a match,
the related command list is executed.
New features with AN-2020-04-18:
- Bourne Shell: IRIX has ls(1) installed as /sbin/ls and this caused
some of our unit tests to fail. We now only check for "bin/ls" and
no longer for "/bin/ls" in "type" return messages.
- Bourne Shell/bsh: signames.c has been modified to work correctly if the
number of statically defined realtime signals is odd. This applies to
NetBSD and caused the shells to miss RTMIN+15 on NetBSD.
Thanks to Robert Elz for reporting
- Bourne Shell: A new trap code "ERR" as been introduced. This is modeled
after a feature from ksh88. "trap cmd ERR" causes "cmd" to be called
whenever a command causes a non-zero exit code. The "cmd" is not called
in case that with "set -e" the shell would not exit.
This is not required by POSIX but helpful.
- Bourne Shell: A new set of unit tests for the ERR trap has been added.
- Bourne Shell: An attempt to fix the POSIX behavior for set -e from
October 2018 has been identified to be wrong. If we kept that change,
a list with "set -e; ..." and a failing command would not exit as
expected.
- Bourne Shell: A new piece of code has been added to handle set -e
for function calls.
- Bourne Shell: The man page now better explains the behavior, if in
set -e mode.
- Bourne Shell: print.c::prs_cntl() could cause a buffer overflow with
"unprintable" multi byte UNICODE characters that are printed as list
of octal escape sequences. the buffer overflow happened because there
was only redzone space for one such octal escape sequence.
Thanks to Heiko Eißfeldt for reporting
New features with AN-2020-02-11:
- Bourne Shell: now also using GETOPT_PLUS_FL
- Bourne Shell: A new variable ${.sh.path} returns the absolute path
of the binary associated to the exec() for this shell.
- Bourne Shell: The definition of NUMBUFLEN was moved from print.c to
defs.h to allow others to write into numbuf, knowing it's length.
- Bourne Shell: The archive sh/dotfiles.tar.bz2 now contains an updated
.shrc file that makes use of the new shell variable ${.sh.path}
- Bourne Shell: "for i in; do cmd ...; done" is now valid syntax even
though this is useless, since bosh did already accept:
"for i in $emptyvar ; do cmd ...; done"
But this is in the POSIX standard and other recent shells seem to
accept it.
Thanks to Robert Elz for reporting
- Bourne Shell: Added a new conformance test for the for loop
- Bourne Shell: The call "bosh -version" now prints 2020...
- Bourne Shell Missing features for POSIX compliance:
- Support for $'...' quoting (this is not needed for the current
version of POSIX but for the next POSIX
version that will be named SUSv8).
The development of SUSv8 will start in
late 2016.
We are now expecting the Bourne Shell to be fully POSIX compliant.
- libschily: new man pages starthandlecond.3 and unhandlecond.3
- libschily: handlecond.3 and raisecond.3 now correctly mention
handlecond() & raisecond() instead of handle()/raise(). The old names
from 1980 had to be renamed because os an unfriendly actt from the
C standard commitee.
Thanks to Eric Ackermann for reporting
as a side effect of a code review for SchilliX-ON
- libschily: various small fixes in various man pages from libschily.
Thanks to Eric Ackermann for reporting
as a side effect of a code review for SchilliX-ON
[...]
- Bourne Shell further TODO list:
- Finish loadable builtin support.
- POSIX does not allow us to implement ". -h", so we will
add a "source" builtin to be able to implement "source -h"
- The following builtins (that are available in bsh) are still missing in
the Bourne Shell:
err echo with output going to stderr
glob echo with '\0' instead of ' ' between args
env a builtin version of /usr/bin/env
The following bsh intrinsics are still missing in the Bourne Shell:
- the restricted bsh has restriction features that
are missing in the Bourne shell.
- source -h read file into history but do not execute
and probably more features not yet identified to be bsh unique.
New features with AN-2020-02-11:
- Bourne Shell: now also using GETOPT_PLUS_FL
- Bourne Shell: A new variable ${.sh.path} returns the absolute path
of the binary associated to the exec() for this shell.
- Bourne Shell: The definition of NUMBUFLEN was moved from print.c to
defs.h to allow others to write into numbuf, knowing it's length.
- Bourne Shell: The archive sh/dotfiles.tar.bz2 now contains an updated
.shrc file that makes use of the new shell variable ${.sh.path}
- Bourne Shell: "for i in; do cmd ...; done" is now valid syntax even
though this is useless, since bosh did already accept:
"for i in $emptyvar ; do cmd ...; done"
But this is in the POSIX standard and other recent shells seem to
accept it.
Thanks to Robert Elz for reporting
- Bourne Shell: Added a new conformance test for the for loop
- Bourne Shell: The call "bosh -version" now prints 2020...
- Bourne Shell Missing features for POSIX compliance:
- Support for $'...' quoting (this is not needed for the current
version of POSIX but for the next POSIX
version that will be named SUSv8).
The development of SUSv8 will start in
late 2016.
We are now expecting the Bourne Shell to be fully POSIX compliant.
- libschily: new man pages starthandlecond.3 and unhandlecond.3
- libschily: handlecond.3 and raisecond.3 now correctly mention
handlecond() & raisecond() instead of handle()/raise(). The old names
from 1980 had to be renamed because os an unfriendly actt from the
C standard commitee.
Thanks to Eric Ackermann for reporting
as a side effect of a code review for SchilliX-ON
- libschily: various small fixes in various man pages from libschily.
Thanks to Eric Ackermann for reporting
as a side effect of a code review for SchilliX-ON
[...]
- Bourne Shell further TODO list:
- Finish loadable builtin support.
- POSIX does not allow us to implement ". -h", so we will
add a "source" builtin to be able to implement "source -h"
- The following builtins (that are available in bsh) are still missing in
the Bourne Shell:
err echo with output going to stderr
glob echo with '\0' instead of ' ' between args
env a builtin version of /usr/bin/env
The following bsh intrinsics are still missing in the Bourne Shell:
- the restricted bsh has restriction features that
are missing in the Bourne shell.
- source -h read file into history but do not execute
and probably more features not yet identified to be bsh unique.
Changelog:
Changes between 5.7 and 5.8
Incompatibilities
The history expansion !:1:t2 used to be interpreted such that
the 2 was a separate character added after the history expansion.
Now it is an argument to the :t modifier. The behaviour of :h
has similarly changed.
The vcs_info function VCS_INFO_quilt-dirfind now returns a
string value by setting $REPLY. Previously it printed the value
to standard output.
The cd and chdir builtins no longer interpret operands like -1
and +2 as stack entries when POSIX_CD is enabled.
Dropping privileges with `unsetopt privileged` may fail (with
an error message) on some older and uncommon platforms due to
library dependency changes made in the course of fixing
CVE-2019-20044 (see below). Please report this to the zsh-workers
mailing list if your system is affected.
Changes
CVE-2019-20044: When unsetting the PRIVILEGED option, the shell
sets its effective user and group IDs to match their respective
real IDs. On some platforms (including Linux and macOS, but
not FreeBSD), when the RUID and EUID were both non-zero, it
was possible to regain the shell's former privileges by e.g.
assigning to the EUID or EGID parameter. In the course of
investigating this issue, it was also found that the setopt
built-in did not correctly report errors when unsetting the
option, which prevented users from handling them as the
documentation recommended. setopt now returns non-zero if it
is unable to safely drop privileges. [ Reported by Sam Foxman.]
The zsh/zutil module's zparseopts builtin learnt an -F option
to abort parsing when an unrecognised option-like parameter is
encountered.
The zsh/files module gained a chmod builtin.
Several changes have been made to the way completion functions
track 'precommands' (such as `command` and `env`) and determine
whether the command being completed for is a shell builtin.
Developers of completion functions may wish to familiarise
themselves with `_normal -p` and `_pick_variant -b`.
The option CD_SILENT was added to suppress all output from cd
(whether explicit or implicit with AUTO_CD). It is disabled by
default.
The compadd builtin's -o option now takes an optional argument
to specify the order of completion matches. This affects the
display of candidate matches and the order in which they are
selected when cycling between them using menu completion.
The :h and :t modifiers in parameter expansion (if braces are
present), glob qualifiers and history expansion may take
following decimal digit arguments in order to keep that many
leading or trailing path components instead of the defaults of
all but one (:h) and one (:t). In an absolute path the leading
'/' counts as one component.
The functions builtin gained a -c option to efficiently copy
functions.
The zshmisc(1) manual page incorrectly stated that when 'exit'
is used in a `try' block inside a function, the corresponding
`always' block will be executed. The manual page has been
corrected. The shell's behaviour has not changed.
From Jonathan Schleifer in PR pkg/54965,
lightly changed by myself for netbsd support.
fish 3.1.0 (released February 12, 2020)
Compared to the beta release of fish 3.1b1, fish version 3.1.0:
* fixes a regression where spaces after a brace were removed despite
brace expansion not occurring (#6564)
* fixes a number of problems in compiling and testing on Cygwin (#6549)
and Solaris-derived systems such as Illumos (#6553, #6554, #6555,
#6556, and #6558);
* fixes the process for building macOS packages;
* fixes a regression where excessive error messages are printed if
Unicode characters are emitted in non-Unicode-capable locales
(#6584); and
* contains some improvements to the documentation and a small number of
completions.
If you are upgrading from version 3.0.0 or before, please also review
the release notes for 3.1b1 (included below).
Release notes for fish 3.1b1 (released January 26, 2020)
Notable improvements and fixes
* A new $pipestatus variable contains a list of exit statuses of the
previous job, for each of the separate commands in a pipeline
(#5632).
* fish no longer buffers pipes to the last function in a pipeline,
improving many cases where pipes appeared to block or hang (#1396).
* An overhaul of error messages for builtin commands, including a
removal of the overwhelming usage summary, more readable stack traces
(#3404, #5434), and stack traces for test (aka [) (#5771).
* fish's debugging arguments have been significantly improved. The
--debug-level option has been removed, and a new --debug option
replaces it. This option accepts various categories, which may be listed
via fish --print-debug-categories (#5879). A new --debug-output option
allows for redirection of debug output.
* string has a new collect subcommand for use in command substitutions,
producing a single output instead of splitting on new lines (similar
to "$(cmd)" in other shells) (#159).
* The fish manual, tutorial and FAQ are now available in man format as
fish-doc, fish-tutorial and fish-faq respectively (#5521).
* Like other shells, cd now always looks for its argument in the
current directory as a last resort, even if the CDPATH variable does
not include it or "." (#4484).
* fish now correctly handles CDPATH entries that start with .. (#6220)
or contain ./ (#5887).
* The fish_trace variable may be set to trace execution (#3427). This
performs a similar role as set -x in other shells.
* fish uses the temporary directory determined by the system, rather
than relying on /tmp (#3845).
* The fish Web configuration tool (fish_config) prints a list of
commands it is executing, to help understanding and debugging
(#5584).
* Major performance improvements when pasting (#5866), executing lots
of commands (#5905), importing history from bash (#6295), and when
completing variables that might match $history (#6288).
Syntax changes and new commands
* A new builtin command, time, which allows timing of fish functions
and builtins as well as external commands (#117).
* Brace expansion now only takes place if the braces include a "," or a
variable expansion, meaning common commands such as git reset
HEAD@{0} do not require escaping (#5869).
* New redirections &> and &| may be used to redirect or pipe stdout,
and also redirect stderr to stdout (#6192).
* switch now allows arguments that expand to nothing, like empty
variables (#5677).
* The VAR=val cmd syntax can now be used to run a command in a modified
environment (#6287).
* and is no longer recognised as a command, so that nonsensical
constructs like and and and produce a syntax error (#6089).
* math's exponent operator, '^', was previously left-associative, but
now uses the more commonly-used right-associative behaviour (#6280).
This means that math '3^0.5^2' was previously calculated as
'(3^0.5)^2', but is now calculated as '3^(0.5^2)'.
* In fish 3.0, the variable used with for loops inside command
substitutions could leak into enclosing scopes; this was an
inadvertent behaviour change and has been reverted (#6480).
Scripting improvements
* string split0 now returns 0 if it split something (#5701).
* In the interest of consistency, builtin -q and command -q can now be
used to query if a builtin or command exists (#5631).
* math now accepts --scale=max for the maximum scale (#5579).
* builtin $var now works correctly, allowing a variable as the builtin
name (#5639).
* cd understands the -- argument to make it possible to change to
directories starting with a hyphen (#6071).
* complete --do-complete now also does fuzzy matches (#5467).
* complete --do-complete can be used inside completions, allowing
limited recursion (#3474).
* count now also counts lines fed on standard input (#5744).
* eval produces an exit status of 0 when given no arguments, like other
shells (#5692).
* printf prints what it can when input hasn't been fully converted to a
number, but still prints an error (#5532).
* complete -C foo now works as expected, rather than requiring complete
-Cfoo.
* complete has a new --force-files option, to re-enable file
completions. This allows sudo -E and pacman -Qo to complete correctly
(#5646).
* argparse now defaults to showing the current function name (instead
of argparse) in its errors, making --name often superfluous (#5835).
* argparse has a new --ignore-unknown option to keep unrecognized
options, allowing multiple argparse passes to parse options (#5367).
* argparse correctly handles flag value validation of options that only
have short names (#5864).
* read -S (short option of --shell) is recognised correctly (#5660).
* read understands --list, which acts like --array in reading all
arguments into a list inside a single variable, but is better named
(#5846).
* read has a new option, --tokenize, which splits a string into
variables according to the shell's tokenization rules, considering
quoting, escaping, and so on (#3823).
* read interacts more correctly with the deprecated $IFS variable, in
particular removing multiple separators when splitting a variable
into a list (#6406), matching other shells.
* fish_indent now handles semicolons better, including leaving them in
place for ; and and ; or instead of breaking the line (#5859).
* fish_indent --write now supports multiple file arguments, indenting
them in turn.
* The default read limit has been increased to 100MiB (#5267).
* math now also understands x for multiplication, provided it is
followed by whitespace (#5906).
* math reports the right error when incorrect syntax is used inside
parentheses (#6063), and warns when unsupported logical operations
are used (#6096).
* functions --erase now also prevents fish from autoloading a function
for the first time (#5951).
* jobs --last returns 0 to indicate success when a job is found
(#6104).
* commandline -p and commandline -j now split on && and || in addition
to ; and & (#6214).
* A bug where string split would drop empty strings if the output was
only empty strings has been fixed (#5987).
* eval no long creates a new local variable scope, but affects
variables in the scope it is called from (#4443). source still
creates a new local scope.
* abbr has a new --query option to check for the existence of an
abbreviation.
* Local values for fish_complete_path and fish_function_path are now
ignored; only their global values are respected.
* Syntax error reports now display a marker in the correct position
(#5812).
* Empty universal variables may now be exported (#5992).
* Exported universal variables are no longer imported into the global
scope, preventing shadowing. This makes it easier to change such
variables for all fish sessions and avoids breakage when the value is
a list of multiple elements (#5258).
* A bug where for could use invalid variable names has been fixed
(#5800).
* A bug where local variables would not be exported to functions has
been fixed (#6153).
* The null command (:) now always exits successfully, rather than
passing through the previous exit status (#6022).
* The output of functions FUNCTION matches the declaration of the
function, correctly including comments or blank lines (#5285), and
correctly includes any --wraps flags (#1625).
* type supports a new option, --short, which suppress function
expansion (#6403).
* type --path with a function argument will now output the path to the
file containing the definition of that function, if it exists.
* type --force-path with an argument that cannot be found now correctly
outputs nothing, as documented (#6411).
* The $hostname variable is no longer truncated to 32 characters
(#5758).
* Line numbers in function backtraces are calculated correctly (#6350).
* A new fish_cancel event is emitted when the command line is
cancelled, which is useful for terminal integration (#5973).
Interactive improvements
* New Base16 color options are available through the Web-based
configuration (#6504).
* fish only parses /etc/paths on macOS in login shells, matching the
bash implementation (#5637) and avoiding changes to path ordering in
child shells (#5456). It now ignores blank lines like the bash
implementation (#5809).
* The locale is now reloaded when the LOCPATH variable is changed
(#5815).
* read no longer keeps a history, making it suitable for operations
that shouldn't end up there, like password entry (#5904).
* dirh outputs its stack in the correct order (#5477), and behaves as
documented when universal variables are used for its stack (#5797).
* funced and the edit-commandline-in-buffer bindings did not work in
fish 3.0 when the $EDITOR variable contained spaces; this has been
corrected (#5625).
* Builtins now pipe their help output to a pager automatically (#6227).
* set_color now colors the --print-colors output in the matching colors
if it is going to a terminal.
* fish now underlines every valid entered path instead of just the last
one (#5872).
* When syntax highlighting a string with an unclosed quote, only the
quote itself will be shown as an error, instead of the whole
argument.
* Syntax highlighting works correctly with variables as commands
(#5658) and redirections to close file descriptors (#6092).
* help works properly on Windows Subsytem for Linux (#5759, #6338).
* A bug where disown could crash the shell has been fixed (#5720).
* fish will not autosuggest files ending with ~ unless there are no
other candidates, as these are generally backup files (#985).
* Escape in the pager works correctly (#5818).
* Key bindings that call fg no longer leave the terminal in a broken
state (#2114).
* Brackets (#5831) and filenames containing $ (#6060) are completed
with appropriate escaping.
* The output of complete and functions is now colorized in interactive
terminals.
* The Web-based configuration handles aliases that include single
quotes correctly (#6120), and launches correctly under Termux (#6248)
and OpenBSD (#6522).
* function now correctly validates parameters for --argument-names as
valid variable names (#6147) and correctly parses options following
--argument-names, as in "--argument-names foo --description bar"
(#6186).
* History newly imported from bash includes command lines using && or
||.
* The automatic generation of completions from manual pages is better
described in job and process listings, and no longer produces a
warning when exiting fish (#6269).
* In private mode, setting $fish_greeting to an empty string before
starting the private session will prevent the warning about history
not being saved from being printed (#6299).
* In the interactive editor, a line break (Enter) inside unclosed
brackets will insert a new line, rather than executing the command
and producing an error (#6316).
* Ctrl-C always repaints the prompt (#6394).
* When run interactively from another program (such as Python), fish
will correctly start a new process group, like other shells (#5909).
* Job identifiers (for example, for background jobs) are assigned more
logically (#6053).
* A bug where history would appear truncated if an empty command was
executed was fixed (#6032).
New or improved bindings
* Pasting strips leading spaces to avoid pasted commands being omitted
from the history (#4327).
* Shift-Left and Shift-Right now default to moving backwards and
forwards by one bigword (words separated by whitespace) (#1505).
* The default escape delay (to differentiate between the escape key and
an alt-combination) has been reduced to 30ms, down from 300ms for the
default mode and 100ms for Vi mode (#3904).
* The forward-bigword binding now interacts correctly with
autosuggestions (#5336).
* The fish_clipboard_* functions support Wayland by using
[wl-clipboard](https://github.com/bugaevc/wl-clipboard) (#5450).
* The nextd and prevd functions no longer print "Hit end of history",
instead using a bell. They correctly store working directories
containing symbolic links (#6395).
* If a fish_mode_prompt function exists, Vi mode will only execute it
on mode-switch instead of the entire prompt. This should make it much
more responsive with slow prompts (#5783).
* The path-component bindings (like Ctrl-w) now also stop at ":" and
"@", because those are used to denote user and host in commands such
as ssh (#5841).
* The NULL character can now be bound via bind -k nul. Terminals often
generate this character via control-space. (#3189).
* A new readline command expand-abbr can be used to trigger
abbreviation expansion (#5762).
* A new readline command, delete-or-exit, removes a character to the
right of the cursor or exits the shell if the command line is empty
(moving this functionality out of the delete-or-exit function).
* The self-insert readline command will now insert the binding
sequence, if not empty.
* A new binding to prepend sudo, bound to Alt-S by default (#6140).
* The Alt-W binding to describe a command should now work better with
multiline prompts (#6110)
* The Alt-H binding to open a command's man page now tries to ignore
sudo (#6122).
* A new pair of bind functions, history-prefix-search-backward (and
forward), was introduced (#6143).
* Vi mode now supports R to enter replace mode (#6342), and d0 to
delete the current line (#6292).
* In Vi mode, hitting Enter in replace-one mode no longer erases the
prompt (#6298).
* Selections in Vi mode are inclusive, matching the actual behaviour of
Vi (#5770).
Improved prompts
* The Git prompt in informative mode now shows the number of stashes if
enabled.
* The Git prompt now has an option
($__fish_git_prompt_use_informative_chars) to use the (more modern)
informative characters without enabling informative mode.
* The default prompt now also features VCS integration and will color
the host if running via SSH (#6375).
* The default and example prompts print the pipe status if an earlier
command in the pipe fails.
* The default and example prompts try to resolve exit statuses to
signal names when appropriate.
Improved terminal output
* New fish_pager_color_ options have been added to control more
elements of the pager's colors (#5524).
* Better detection and support for using fish from various system
consoles, where limited colors and special characters are supported
(#5552).
* fish now tries to guess if the system supports Unicode 9 (and
displays emoji as wide), eliminating the need to set
$fish_emoji_width in most cases (#5722).
* Improvements to the display of wide characters, particularly Korean
characters and emoji (#5583, #5729).
* The Vi mode cursor is correctly redrawn when regaining focus under
terminals that report focus (eg tmux) (#4788).
* Variables that control background colors (such as
fish_pager_color_search_match) can now use --reverse.
Completions
* Added completions for
* aws
* bat (#6052)
* bosh (#5700)
* btrfs
* camcontrol
* cf (#5700)
* chronyc (#6496)
* code (#6205)
* cryptsetup (#6488)
* csc and csi (#6016)
* cwebp (#6034)
* cygpath and cygstart (#6239)
* epkginfo (#5829)
* ffmpeg, ffplay, and ffprobe (#5922)
* fsharpc and fsharpi (#6016)
* fzf (#6178)
* g++ (#6217)
* gpg1 (#6139)
* gpg2 (#6062)
* grub-mkrescue (#6182)
* hledger (#6043)
* hwinfo (#6496)
* irb (#6260)
* iw (#6232)
* kak
* keepassxc-cli (#6505)
* keybase (#6410)
* loginctl (#6501)
* lz4, lz4c and lz4cat (#6364)
* mariner (#5718)
* nethack (#6240)
* patool (#6083)
* phpunit (#6197)
* plutil (#6301)
* pzstd (#6364)
* qubes-gpg-client (#6067)
* resolvectl (#6501)
* rg
* rustup
* sfdx (#6149)
* speedtest and speedtest-cli (#5840)
* src (#6026)
* tokei (#6085)
* tsc (#6016)
* unlz4 (#6364)
* unzstd (#6364)
* vbc (#6016)
* zpaq (#6245)
* zstd, zstdcat, zstdgrep, zstdless and zstdmt (#6364)
* Lots of improvements to completions.
* Selecting short options which also have a long name from the
completion pager is possible (#5634).
* Tab completion will no longer add trailing spaces if they already
exist (#6107).
* Completion of subcommands to builtins like and or not now works
correctly (#6249).
* Completion of arguments to short options works correctly when
multiple short options are used together (#332).
* Activating completion in the middle of an invalid completion does not
move the cursor any more, making it easier to fix a mistake (#4124).
* Completion in empty commandlines now lists all available commands.
* Functions listed as completions could previously leak parts of the
function as other completions; this has been fixed.
Deprecations and removed features
* The vcs-prompt functions have been promoted to names without
double-underscore, so __fish_git_prompt is now fish_git_prompt,
__fish_vcs_prompt is now fish_vcs_prompt, __fish_hg_prompt is now
fish_hg_prompt and __fish_svn_prompt is now fish_svn_prompt. Shims at
the old names have been added, and the variables have kept their old
names (#5586).
* string replace has an additional round of escaping in the replacement
expression, so escaping backslashes requires many escapes (eg string
replace -ra '([ab])' '\\\\\\\$1' a). The new feature flag
regex-easyesc can be used to disable this, so that the same effect
can be achieved with string replace -ra '([ab])' '\\\\$1' a (#5556).
As a reminder, the intention behind feature flags is that this will
eventually become the default and then only option, so scripts should
be updated.
* The fish_vi_mode function, deprecated in fish 2.3, has been removed.
Use fish_vi_key_bindings instead (#6372).
For distributors and developers
* fish 3.0 introduced a CMake-based build system. In fish 3.1, both the
Autotools-based build and legacy Xcode build system have been
removed, leaving only the CMake build system. All distributors and
developers must install CMake.
* fish now depends on the common tee external command, for the psub
process substitution function.
* The documentation is now built with Sphinx. The old Doxygen-based
documentation system has been removed. Developers, and distributors
who wish to rebuild the documentation, must install Sphinx.
* The INTERNAL_WCWIDTH build option has been removed, as fish now
always uses an internal wcwidth function. It has a number of
configuration options that make it more suitable for general use
(#5777).
* mandoc can now be used to format the output from --help if nroff is
not installed, reducing the number of external dependencies on
systems with mandoc installed (#5489).
* Some bugs preventing building on Solaris-derived systems such as
Illumos were fixed (#5458, #5461, #5611).
* Completions for npm, bower and yarn no longer require the jq utility
for full functionality, but will use Python instead if it is
available.
* The paths for completions, functions and configuration snippets have
been extended. On systems that define XDG_DATA_DIRS, each of the
directories in this variable are searched in the subdirectories
fish/vendor_completions.d, fish/vendor_functions.d, and
fish/vendor_conf.d respectively. On systems that do not define this
variable in the environment, the vendor directories are searched for
in both the installation prefix and the default "extra" directory,
which now defaults to /usr/local (#5029).
New patches:
12: avoid moving back from oldest history entry to invalid data
13: bug fix for reading history entries with timestamps
14: fix emacs C-xC-e binding so it doesn't edit previous line
if the current one is empty
15: weird aliasing bug with aliases in bash -c command line fixed.
16: earlier clean up of /dev/fd fds used in process substitutions.
Read the patch files for (slightly) expanded information.
pkglint -r --network --only "migrate"
As a side-effect of migrating the homepages, pkglint also fixed a few
indentations in unrelated lines. These and the new homepages have been
checked manually.
pkglint --only "https instead of http" -r -F
With manual adjustments afterwards since pkglint 19.4.4 fixed a few
indentations in unrelated lines.
This mainly affects projects hosted at SourceForce, as well as
freedesktop.org, CTAN and GNU.
## v0.6.4
- Fix `vi-forward-char` triggering a bell when using it to accept a suggestion (#488)
- New configuration option to skip completion suggestions when buffer matches a pattern (#487)
- New configuration option to ignore history entries matching a pattern (#456)
Based on Schily Tools Release 2019-12-05.
AN-2019-11-11:
- libschily: the new functions wcastoi wcastol wcastolb that have been
added with the previous release have been forgotten in the linker map
file.
AN-2019-12-05:
- include/schily/stdio.h: We no longer define getc_unlocked() on Solaris
in case that it is defined already. This was needed since Oracle
Solaris 11.4 compiles 64 bit by default and made stdio less opaque
than before - this result in the same bahavior as for 32 bit programs.
This means, we no longer need to use tricks to get fast access to
stdio.
Thanks to Rolf Dietze for reporting.
- libschily: the function getargs() and similar (from the option parser
group) fixed a bug that prevented the usability of the official method
to include the char '+' inside option names by quoting the character
in the option name used in the format string.
This bug has been fixed in order to be able to support "star -dump+ ..."
- libshedit: because of the changes in Oracle Solaris 11.4, we need to
#undef FAST_GETC_PUTC in order to avoid to use getc_unlocked().
Thanks to Rolf Dietze for reporting.
- Bourne Shell/bsh: */hashcmd.c did not handle a malloc()ed string
correctly and could cause a memory leak with hash commands that
do not add new aliases.
We now create a copy using make()/makestr() before calling ab_push()
or ab_insert() and always free "name" at the end of the function
hashcmd()
- Bourne Shell: The man page now documents that the command
"set -o hashcmds"
inside the file $HOME/.shrc makes a # on the fist column of that
file and followed by a non-space character, no longer a comment..
It is thus recommended to have "set -o hashcmds" close to the.
bottom of the file $HOME/.shrc
Based on Schily Tools Release 2019-12-05.
AN-2019-11-11:
- libschily: the new functions wcastoi wcastol wcastolb that have been
added with the previous release have been forgotten in the linker map
file.
AN-2019-12-05:
- include/schily/stdio.h: We no longer define getc_unlocked() on Solaris
in case that it is defined already. This was needed since Oracle
Solaris 11.4 compiles 64 bit by default and made stdio less opaque
than before - this result in the same bahavior as for 32 bit programs.
This means, we no longer need to use tricks to get fast access to
stdio.
Thanks to Rolf Dietze for reporting.
- libschily: the function getargs() and similar (from the option parser
group) fixed a bug that prevented the usability of the official method
to include the char '+' inside option names by quoting the character
in the option name used in the format string.
This bug has been fixed in order to be able to support "star -dump+ ..."
- libshedit: because of the changes in Oracle Solaris 11.4, we need to
#undef FAST_GETC_PUTC in order to avoid to use getc_unlocked().
Thanks to Rolf Dietze for reporting.
- Bourne Shell/bsh: */hashcmd.c did not handle a malloc()ed string
correctly and could cause a memory leak with hash commands that
do not add new aliases.
We now create a copy using make()/makestr() before calling ab_push()
or ab_insert() and always free "name" at the end of the function
hashcmd()
- Bourne Shell: The man page now documents that the command
"set -o hashcmds"
inside the file $HOME/.shrc makes a # on the fist column of that
file and followed by a non-space character, no longer a comment..
It is thus recommended to have "set -o hashcmds" close to the.
bottom of the file $HOME/.shrc
Changes:
6.22.02 - 20191204
------------------
Fix version in configure.ac
6.22.01 - 20191201
------------------
undo PR/88: Preserve empty arguments in :q, since it breaks
$ set x=""
$ alias test "echo "\""$x:q"\"" is working."
$ alias test
echo "
pkgsrc changes:
- Remove no longer needed patches (both backport from upstream to 6.21.00)
Changes:
V6.22.00 - 20191128
-------------------
- PR/113: Sobomax: avoid infinite loops for -c commands when stdout is
not a tty.
- Avoid infinite loops during history loads when merging, print a better
error for errors during history load.
- PR/88: Preserve empty arguments in :q
- PR/94: Small apple issues (SAVESIGVEC, HOSTTYPE)
- PR/81: Fix range matching issue where we were comparing with the
range character instead of the start of range. [l-z]* would match foo
## v0.6.3
- Fixed bug moving cursor to end of buffer after accepting suggestion (#453)
## v0.6.2
- Fixed bug deleting the last character in the buffer in vi mode (#450)
- Degrade gracefully when user doesn't have `zsh/system` module installed (#447)
## v0.6.1
- Fixed bug occurring when `_complete` had been aliased (#443)
## v0.6.0
- Added `completion` suggestion strategy powered by completion system (#111)
- Allow setting `ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE` to an empty string (#422)
- Don't fetch suggestions after copy-earlier-word (#439)
- Allow users to unignore zle-\* widgets (e.g. zle-line-init) (#432)
Gash is a POSIX-compatible shell written in Guile Scheme. It provides
both the shell interface, as well as a Guile library for parsing shell
scripts. Gash is designed to bootstrap Bash as part of the Guix
bootstrap process. There are plans to develop Gash into a
general-purpose shell and tool for building interfaces between Scheme
and the shell.
Features of the shell
* Sophisticated enough to be used to build Bash.
* Has a nice colorized prompt.
* Includes all of the POSIX-specified "special" built-ins except for
`times'.
* Includes about half of the POSIX-specified "regular" built-ins
(see `gash/built-ins.scm' for details).
Features of the programming interface
* Parses Shell scripts into an AST.
* Provides a rudimentary interface for writing Shell-like Scheme
scripts.
# fish 3.0.2 (released February 19, 2019)
This release of fish fixes an issue discovered in fish 3.0.1.
### Fixes and improvements
- The PWD environment variable is now ignored if it does not resolve to the true working directory, fixing strange behaviour in terminals started by editors and IDEs (#5647).
If you are upgrading from version 2.7.1 or before, please also review the release notes for 3.0.1, 3.0.0 and 3.0b1 (included below).
---
# fish 3.0.1 (released February 11, 2019)
This release of fish fixes a number of major issues discovered in fish 3.0.0.
### Fixes and improvements
- `exec` does not complain about running foreground jobs when called (#5449).
- while loops now evaluate to the last executed command in the loop body (or zero if the body was empty), matching POSIX semantics (#4982).
- `read --silent` no longer echoes to the tty when run from a non-interactive script (#5519).
- On macOS, path entries with spaces in `/etc/paths` and `/etc/paths.d` now correctly set path entries with spaces. Likewise, `MANPATH` is correctly set from `/etc/manpaths` and `/etc/manpaths.d` (#5481).
- fish starts correctly under Cygwin/MSYS2 (#5426).
- The `pager-toggle-search` binding (Ctrl-S by default) will now activate the search field, even when the pager is not focused.
- The error when a command is not found is now printed a single time, instead of once per argument (#5588).
- Fixes and improvements to the git completions, including printing correct paths with older git versions, fuzzy matching again, reducing unnecessary offers of root paths (starting with `:/`) (#5578, #5574, #5476), and ignoring shell aliases, so enterprising users can set up the wrapping command (via `set -g __fish_git_alias_$command $whatitwraps`) (#5412).
- Significant performance improvements to core shell functions (#5447) and to the `kill` completions (#5541).
- Starting in symbolically-linked working directories works correctly (#5525).
- The default `fish_title` function no longer contains extra spaces (#5517).
- The `nim` prompt now works correctly when chosen in the Web-based configuration (#5490).
- `string` now prints help to stdout, like other builtins (#5495).
- Killing the terminal while fish is in vi normal mode will no longer send it spinning and eating CPU. (#5528)
- A number of crashes have been fixed (#5550, #5548, #5479, #5453).
- Improvements to the documentation and certain completions.
### Known issues
There is one significant known issue that was not corrected before the release:
- fish does not run correctly under Windows Services for Linux before Windows 10 version 1809/17763, and the message warning of this may not be displayed (#5619).
If you are upgrading from version 2.7.1 or before, please also review the release notes for 3.0.0 and 3.0b1 (included below).
Based on schilytools release from 2019-10-25.
Changelog
=========
- include/schily/wchar.h: Some fallback definitions for
mbsinit() mbrtowc() wcrtomb() have been moved to make them always
visible and not only in case that <wchar.h> exists.
- include/schily/wchar.h: Before, we checked for HAVE_ISWPRINT to catch
the HP-UX-10.20 case where wchar_t is in stdlib.h. Now we check
(SIZEOF_WCHAR == 0 || SIZEOF_WCHAR_T == 0) as this works on Ultrix as
well.
- libgetopt: The getopt() function now supports options in the form:
+o, ++long-option or +long-option
if the optstring starts with a '+'. A new exported variable
"optflags" has the bit "OPT_PLUS" set, in case that an actual option
starts with '+'.
If more than one of the flag characters ':', '+' or "()" are used,
"()" must be last.
- Bourne Shell: The testsuite no longer tries to check ISO-8859-1 strings
as we cannot set this up reliably on all platforms and as Mac OS does
not allow to create the related filenames.
- Bourne Shell: The getopts(1) builtin command now supports options in.
the form:
+o, ++long-option or +long-option
if the optstring starts with a '+'. The shell variable "$NAME" has
a leading '+' in case that an actual option starts with '+'.
Note that this makes getopts(1) in the Bourne Shell compatible at
shell script level to the extensions in the getopts(1) implementation
in ksh93 for:
-o/+o Short options with either a leading - or +
--long GNU style long options as aliases to short -o options
++long GNU style long options as aliases to short +o options
Our enhancements to support:
-long UNIX style long options as aliases to short -o options
+long UNIX style long options as aliases to short +o options
- Long options the have no related short option
Are not supported by ksh93.
Based on schilytools release from 2019-10-25.
Changelog
=========
- include/schily/wchar.h: Some fallback definitions for
mbsinit() mbrtowc() wcrtomb() have been moved to make them always
visible and not only in case that <wchar.h> exists.
- include/schily/wchar.h: Before, we checked for HAVE_ISWPRINT to catch
the HP-UX-10.20 case where wchar_t is in stdlib.h. Now we check
(SIZEOF_WCHAR == 0 || SIZEOF_WCHAR_T == 0) as this works on Ultrix as
well.
- libgetopt: The getopt() function now supports options in the form:
+o, ++long-option or +long-option
if the optstring starts with a '+'. A new exported variable
"optflags" has the bit "OPT_PLUS" set, in case that an actual option
starts with '+'.
If more than one of the flag characters ':', '+' or "()" are used,
"()" must be last.
- Bourne Shell: The testsuite no longer tries to check ISO-8859-1 strings
as we cannot set this up reliably on all platforms and as Mac OS does
not allow to create the related filenames.
- Bourne Shell: The getopts(1) builtin command now supports options in.
the form:
+o, ++long-option or +long-option
if the optstring starts with a '+'. The shell variable "$NAME" has
a leading '+' in case that an actual option starts with '+'.
Note that this makes getopts(1) in the Bourne Shell compatible at
shell script level to the extensions in the getopts(1) implementation
in ksh93 for:
-o/+o Short options with either a leading - or +
--long GNU style long options as aliases to short -o options
++long GNU style long options as aliases to short +o options
Our enhancements to support:
-long UNIX style long options as aliases to short -o options
+long UNIX style long options as aliases to short +o options
- Long options the have no related short option
Are not supported by ksh93.
Based on SchilyTools Release from 2019-10-07.
Changelog
=========
- configure: Some shells report a syntax error with "< file (cmd)"
and need the redirection statement to be *after* the command. Our
changes to support the V7 shell by adding round braces caused ash
variants like "dash" to fail.
Thanks to Harald van Dijk for reporting
- cont/cc-config.sh: canged some :>some-file statements into
(:)>some-file. they have meen missed when introducing work arounds
for the V7 Shell on Ultrix that does not support I/O redirection
for builtin commands.
Thanks to Robert Clausecker for reporting
- libschily/comerr.c: If the environment COMERR_EXCODE has been set to
a value that starts with '0', the normal exit code mapping is switched
off, but all potential exit code values != 0 that follow the rule
(excode % 256) == 0
are mapped to -64. This helps to avoid unexpected behavior with
historic shells that still use the old waitpid() and modern
shells (using waitid() but in a backward compatible default mode)
where a program that terminates with
exit(256);
is evaluated in conditional statements as if the exit code was 0.
- Bourne Shell: Missing Makefile.dot added.
- Bourne Shell / bsh / ved: The dotdiles TAR archives are now again named
*/dotfiles.tar.bz2 as the change in the previous release caused
problems.
Thanks for Gabriele Balducci balducci@units.it and Robert Clausecker
for reporting
- Bourne Shell: Cstyle changes (long lines removed) in io.c & expand.c
- Bourne Shell: Fixed a bug that prevented to forward the special exit
cause (NOTFOUND or NOEXEC) to the vfork() parent process via.
struct siginfo.si_code in some cases. These values are added beyond
the POSIX CLD_* values in siginfo.si_code from the POSIX standard.
They are passed back from the vfork()ed child to the parent via the
shared memory from the vfork() implementation.
- Bourne Shell: introduced shared memory to be able to forward the
special exit cause (NOTFOUND or NOEXEC) to the parent even in case it
used fork() instead of vfork().
- Bourne Shell: Added support for a new automatic parameter "$/" to
complement the existing parameter "$?".
This is a result from a discussion in a POSIX teleconference from
April 2016.
This new parameter returns *decimal numbers* for a normal command
termination and *text* for abnormal command termination:
number<>Exit code from normal termination. This is a signed 32 bit
value from the exit() parameter on POSIX systems and a 8 bit
value on pre-POSIX systems like Linux.
signame>A signal name (see kill -l) if the command has been terminated
by a signal. This is the signal name with the leading "SIG"
stripped off.
NOEXEC<>The command was found but could not be executed, e.g. as
a result of missing permissions or because the name points
to a directory.
NOTFOUND The command could not be found.
Note that currently, the strings "NOEXEC" and "NOTFOUND" are passed
back reliably from vfork(2) childs or when the related state is already
known by the cache. In other cases, the reliability of $/ with respect
to "NOEXEC" and "NOTFOUND" has not yet been verified. It thus may
return 126 or 127 as with $?. The string values "NOEXEC" and "NOTFOUND"
cannot be passed back from a subshell, using only the waitid()
mechanism. To circumvent that problem, from fork()ed subshells,.
shared memory or non-fork()ed virtual subshells would work.
If you detect a complex command where you get 126 or 127 instead of
the exoected "NOEXEC" or "NOTFOUND", please send a report.
We for now choose to use shared memory as this is easier to implement.
Later versions will mosy likely implement virtual fork()less
subshells.
- Bourne Shell: minor Cstyle changes on word.c and macro.c
- Bourne Shell: New version date
Based on SchilyTools Release from 2019-10-07.
Changelog
=========
- configure: Some shells report a syntax error with "< file (cmd)"
and need the redirection statement to be *after* the command. Our
changes to support the V7 shell by adding round braces caused ash
variants like "dash" to fail.
Thanks to Harald van Dijk for reporting
- cont/cc-config.sh: canged some :>some-file statements into
(:)>some-file. they have meen missed when introducing work arounds
for the V7 Shell on Ultrix that does not support I/O redirection
for builtin commands.
Thanks to Robert Clausecker for reporting
- libschily/comerr.c: If the environment COMERR_EXCODE has been set to
a value that starts with '0', the normal exit code mapping is switched
off, but all potential exit code values != 0 that follow the rule
(excode % 256) == 0
are mapped to -64. This helps to avoid unexpected behavior with
historic shells that still use the old waitpid() and modern
shells (using waitid() but in a backward compatible default mode)
where a program that terminates with
exit(256);
is evaluated in conditional statements as if the exit code was 0.
- Bourne Shell: Missing Makefile.dot added.
- Bourne Shell / bsh / ved: The dotdiles TAR archives are now again named
*/dotfiles.tar.bz2 as the change in the previous release caused
problems.
Thanks for Gabriele Balducci balducci@units.it and Robert Clausecker
for reporting
- Bourne Shell: Cstyle changes (long lines removed) in io.c & expand.c
- Bourne Shell: Fixed a bug that prevented to forward the special exit
cause (NOTFOUND or NOEXEC) to the vfork() parent process via.
struct siginfo.si_code in some cases. These values are added beyond
the POSIX CLD_* values in siginfo.si_code from the POSIX standard.
They are passed back from the vfork()ed child to the parent via the
shared memory from the vfork() implementation.
- Bourne Shell: introduced shared memory to be able to forward the
special exit cause (NOTFOUND or NOEXEC) to the parent even in case it
used fork() instead of vfork().
- Bourne Shell: Added support for a new automatic parameter "$/" to
complement the existing parameter "$?".
This is a result from a discussion in a POSIX teleconference from
April 2016.
This new parameter returns *decimal numbers* for a normal command
termination and *text* for abnormal command termination:
number<>Exit code from normal termination. This is a signed 32 bit
value from the exit() parameter on POSIX systems and a 8 bit
value on pre-POSIX systems like Linux.
signame>A signal name (see kill -l) if the command has been terminated
by a signal. This is the signal name with the leading "SIG"
stripped off.
NOEXEC<>The command was found but could not be executed, e.g. as
a result of missing permissions or because the name points
to a directory.
NOTFOUND The command could not be found.
Note that currently, the strings "NOEXEC" and "NOTFOUND" are passed
back reliably from vfork(2) childs or when the related state is already
known by the cache. In other cases, the reliability of $/ with respect
to "NOEXEC" and "NOTFOUND" has not yet been verified. It thus may
return 126 or 127 as with $?. The string values "NOEXEC" and "NOTFOUND"
cannot be passed back from a subshell, using only the waitid()
mechanism. To circumvent that problem, from fork()ed subshells,.
shared memory or non-fork()ed virtual subshells would work.
If you detect a complex command where you get 126 or 127 instead of
the exoected "NOEXEC" or "NOTFOUND", please send a report.
We for now choose to use shared memory as this is easier to implement.
Later versions will mosy likely implement virtual fork()less
subshells.
- Bourne Shell: minor Cstyle changes on word.c and macro.c
- Bourne Shell: New version date
Changelog
=========
Release 2019-03-29:
- Bourne Shell: local(1), export(1) and readonly(1) now all support to.
expand the '~' character in environment variables like e.g. PATH.
- Bourne Shell: Added unit tests for the tilde expansion and the related
changes.
Release 2019-04-29:
- libshedit/bsh/Bourne Shell: The TAB file name expansion now uses a new
expansion funtion that is not based on pattern matching but on strstr()
and thus is no longer fooled by file names that contain pattern matching
meta characters.
- Bourne Shell: "trap -- ..." now correctly handles "--" even if the next
argument is "-".
- Bourne Shell: trap now supports a new option -p that allows to restore
the whole trap state using the following commands:
old_traps=$(trap -p)
trap "some commands" INT QUIT
...
eval "$old_traps"
This is possible because "trap -p" outputs the state for all signals
and not only for those signals that are not in the default state.
The new trap interfase was agreed on in the 2019-04-11 POSIX
teleconference.
Bourne Shell: The exception for "while true; do date; done | uniq -c"
in job control handling that has been introduced in November 2015 has
been refined to prevent it from causing "(bosh)" to stop from SIGTTIN.
Thanks to Robert Elz <kre@munnari.OZ.AU> for reporting.
- Bourne Shell: A new #define JOB_DEBUG has been added.
- Bourne Shell: The command:
(trap '' SEGV; $SHELL -c 'kill -s SEGV $$; echo survived')
caused the shell not to print "survived" because a previous exception
for SIGSEGV from the 1977 Bourne Shell version had not been removed
for the POSIX variant of the shell. The problem occured because it
was possible to unignore an ignored (at startup) SIGSEGV.
Thanks to Robert Elz <kre@munnari.OZ.AU> for reporting.
- Bourne Shell: The code now uses SIG2STR_MAX for the size of the
sig2str() output buffer.
- Bourne Shell: the behavior related to SIGINT on the command line
in the case that the history editor is enabled has been changed to
match the behavior of ksh. The Bourne Shell now calls trap commands
for SIGINT when ^C is typed on the command line.
Note that the classical Bourne Shell behavior (which is still active
in case the history editor has been disabled via "set +o ved") is that
the trap command is called after ^C is followed by a CR if both are
typed on a PS1 prompt.
Note: The behavior for "trap" in this area is currently not specified
in POSIX.
- Bourne Shell: After jobcontrol has been introduced into the Bourne
Shell: When in jobcontrol mode, the shell could no longer get
signals at the same time as foreground jobs because when using
jobcontrol, the shell is in a different process group than the
foreground job.
The Bourne Shell now derives the information about a delivered signal
from the waitid() return data and thus is now able to work the same
way as it has been designed in 1977. This is the same way as ksh works.
If a foreground program catches such signals, the shell is still not
able to detect the signal, but it is now closer to the original
behavior from 1977.
- Bourne Shell: new version date 2019-04-17
Release 2019-05-28:
- Bourne Shell: Similar to what ksh88 does, scripts are now checked
before they are run. If there is a nul byte before a newline
in the first 256 bytes, a file is rejected as alien binary
instead of trying to interpret it as a script.
Release 2019-06-13:
- Bourne Shell: A new option "set -o globskipdot" has been added.
If set, the entries "." and ".." are skipped and not shown in globbing
results. If not set, the entries "." and ".." are always returned,
even when they are not part of the readdir(3) results.
- Bourne Shell: The option "set -o globskipdot" has been made the
new dfault behavior for "bosh", but not for "pbosh"
Note that this new shell option has been introduced as a result
of a related BUG discussion in the Austin Group telephone conference.
The background is to permit shell scripts to check whether a shell
grants to hide the "." and ".." for all filesystems.
Release 2019-07-15:
- Bourne Shell: If OPTIND is set to a new value, the getopt() internal
variable "_sp" is now reset to 1. This is needed in order to make sure
that a combined option string can be parsed correctly.
- Bourne Shell/libshedit/bsh: The TAB expander now again gives .. as a.
result if the pattern is ..
This is needed in order to let ..TAB result in ../ on the command
line editor.
Release 2019-09-22:
- Bourne Shell: The new function isbinary() that has been introduced
in May and that should prevent the shell from interpreting binary
files as shell scripts had a problem:
In case that a disconnected TCP/IP based remote login caused a SIGTERM
followed by the read() function on stdin returning EIO, the shell
could go into a complex endless loop as the failing read() with
"trapnote" set caused a longjmp() before the next prompt without first
clearing "trapnote". As a result, the shell did hang endlessly around
while just consuming CPU time.
The shell now avoids to call the read() routine inside isbinary()
when "trapnote" is set and this way is able to avoid the longjmp() on
error.
- Bourne Shell: Fixed some typos in comment
Thanks to Robert Clausecker for reporting
- Bourne Shell: print.c: Changed err++ for a BOOL typed variable
into err = TRUE.
Thanks to Robert Clausecker for reporting
- Bourne Shell, with obosh compilation type: Avoid an "unused" warning
with word.c
- Bourne Shell: defs.h now includes an "extern int optopt;" in order
to support Ultrix where this delcaration is missing in unistd.h.
Thanks to Robert Clausecker for reporting
- bsh/Bourne Shell: test.c Now using a
#if defined(S_IFPORT) && S_IFPORT != S_IFIFO
to work around a strange definition on Ultrix
Thanks to Robert Clausecker for reporting
- Bourne Shell: New version date
Changelog
=========
Release 2019-03-29:
- Bourne Shell: local(1), export(1) and readonly(1) now all support to.
expand the '~' character in environment variables like e.g. PATH.
- Bourne Shell: Added unit tests for the tilde expansion and the related
changes.
Release 2019-04-29:
- libshedit/bsh/Bourne Shell: The TAB file name expansion now uses a new
expansion funtion that is not based on pattern matching but on strstr()
and thus is no longer fooled by file names that contain pattern matching
meta characters.
- Bourne Shell: "trap -- ..." now correctly handles "--" even if the next
argument is "-".
- Bourne Shell: trap now supports a new option -p that allows to restore
the whole trap state using the following commands:
old_traps=$(trap -p)
trap "some commands" INT QUIT
...
eval "$old_traps"
This is possible because "trap -p" outputs the state for all signals
and not only for those signals that are not in the default state.
The new trap interfase was agreed on in the 2019-04-11 POSIX
teleconference.
Bourne Shell: The exception for "while true; do date; done | uniq -c"
in job control handling that has been introduced in November 2015 has
been refined to prevent it from causing "(bosh)" to stop from SIGTTIN.
Thanks to Robert Elz <kre@munnari.OZ.AU> for reporting.
- Bourne Shell: A new #define JOB_DEBUG has been added.
- Bourne Shell: The command:
(trap '' SEGV; $SHELL -c 'kill -s SEGV $$; echo survived')
caused the shell not to print "survived" because a previous exception
for SIGSEGV from the 1977 Bourne Shell version had not been removed
for the POSIX variant of the shell. The problem occured because it
was possible to unignore an ignored (at startup) SIGSEGV.
Thanks to Robert Elz <kre@munnari.OZ.AU> for reporting.
- Bourne Shell: The code now uses SIG2STR_MAX for the size of the
sig2str() output buffer.
- Bourne Shell: the behavior related to SIGINT on the command line
in the case that the history editor is enabled has been changed to
match the behavior of ksh. The Bourne Shell now calls trap commands
for SIGINT when ^C is typed on the command line.
Note that the classical Bourne Shell behavior (which is still active
in case the history editor has been disabled via "set +o ved") is that
the trap command is called after ^C is followed by a CR if both are
typed on a PS1 prompt.
Note: The behavior for "trap" in this area is currently not specified
in POSIX.
- Bourne Shell: After jobcontrol has been introduced into the Bourne
Shell: When in jobcontrol mode, the shell could no longer get
signals at the same time as foreground jobs because when using
jobcontrol, the shell is in a different process group than the
foreground job.
The Bourne Shell now derives the information about a delivered signal
from the waitid() return data and thus is now able to work the same
way as it has been designed in 1977. This is the same way as ksh works.
If a foreground program catches such signals, the shell is still not
able to detect the signal, but it is now closer to the original
behavior from 1977.
- Bourne Shell: new version date 2019-04-17
Release 2019-05-28:
- Bourne Shell: Similar to what ksh88 does, scripts are now checked
before they are run. If there is a nul byte before a newline
in the first 256 bytes, a file is rejected as alien binary
instead of trying to interpret it as a script.
Release 2019-06-13:
- Bourne Shell: A new option "set -o globskipdot" has been added.
If set, the entries "." and ".." are skipped and not shown in globbing
results. If not set, the entries "." and ".." are always returned,
even when they are not part of the readdir(3) results.
- Bourne Shell: The option "set -o globskipdot" has been made the
new dfault behavior for "bosh", but not for "pbosh"
Note that this new shell option has been introduced as a result
of a related BUG discussion in the Austin Group telephone conference.
The background is to permit shell scripts to check whether a shell
grants to hide the "." and ".." for all filesystems.
Release 2019-07-15:
- Bourne Shell: If OPTIND is set to a new value, the getopt() internal
variable "_sp" is now reset to 1. This is needed in order to make sure
that a combined option string can be parsed correctly.
- Bourne Shell/libshedit/bsh: The TAB expander now again gives .. as a.
result if the pattern is ..
This is needed in order to let ..TAB result in ../ on the command
line editor.
Release 2019-09-22:
- Bourne Shell: The new function isbinary() that has been introduced
in May and that should prevent the shell from interpreting binary
files as shell scripts had a problem:
In case that a disconnected TCP/IP based remote login caused a SIGTERM
followed by the read() function on stdin returning EIO, the shell
could go into a complex endless loop as the failing read() with
"trapnote" set caused a longjmp() before the next prompt without first
clearing "trapnote". As a result, the shell did hang endlessly around
while just consuming CPU time.
The shell now avoids to call the read() routine inside isbinary()
when "trapnote" is set and this way is able to avoid the longjmp() on
error.
- Bourne Shell: Fixed some typos in comment
Thanks to Robert Clausecker for reporting
- Bourne Shell: print.c: Changed err++ for a BOOL typed variable
into err = TRUE.
Thanks to Robert Clausecker for reporting
- Bourne Shell, with obosh compilation type: Avoid an "unused" warning
with word.c
- Bourne Shell: defs.h now includes an "extern int optopt;" in order
to support Ultrix where this delcaration is missing in unistd.h.
Thanks to Robert Clausecker for reporting
- bsh/Bourne Shell: test.c Now using a
#if defined(S_IFPORT) && S_IFPORT != S_IFIFO
to work around a strange definition on Ultrix
Thanks to Robert Clausecker for reporting
- Bourne Shell: New version date
10: fix var-assigns before special builtins & fn calls in posix mode
11: fixed missing quoted nul removal (in one odd case).
See the patch files (once fetched) for more details of what was altered.
Note release version goes backwards. Version now follows openbsd version
numbering.
No changes available.
Patched to eliminate compilation warnings on netbsd.
When $HOME environment variable is set, e.g. in pkgrsc where a fake
homedir is injected, ~ is expanded to $HOME while ~user is expanded
to the passwd(5) home_dir field leading to inconsistency in the test.
No PKGREVISION bump since that change only affects tests.
pkgsrc changes:
- Add patch-nls_Makefile.in to avoid +x bit in *.cat files
- Remove no longer needed patches (all applied upstream):
patch-ed.chared.c, patch-ed.inputl.c, patch-nls-catgen, patch-sh.func.c,
patch-tw.init.c
Changes:
V6.21.00 - 20190508
-------------------
- Abort history loading on words and lines too long
https://bugzilla.redhat.com/show_bug.cgi?id=1598502
- PR/37: Introduce GetCmdChar() to avoid open coding array access.
make closem() not close sockets so as not to affect nss_ldap.
tcsh never creates sockets so that's ok (Miloslav Trmac)
- PR/597: Make rmstar work with aliased rm
- convert match() from recursive to backtracking.
- Handle 8 bit characters in bindkey (Werner Fink)
- Look for tgetent in libtinfo as well (Werner Fink)
- Don't play pointer tricks that are undefined in modern c (Brooks Davis)
- Fix out of bounds read (Brooks Davis)
- Fix type of read in prompt confirmation (eg. rmstar) (David Kaspar)
- PR/471: Delay arginp parsing
ok <kim>, thanks!
The patches fix:
1. Under certain circumstances, the glob expansion code did not remove
backslashes escaping characters in directory names (or portions of a
pattern preceding a slash).
2. When an alias value ends with an unquoted literal tab (not part of a quoted
string or comment), alias expansion cannot correctly detect the end of the
alias value after expanding it.
3. There are several incompatibilities in how bash-5.0 processes pathname
expansion (globbing) of filename arguments that have backslashes in the
directory portion.
4. In bash-5.0, the `wait' builtin without arguments waits for all children
of the shell. This includes children it `inherited' at shell invocation time.
This patch modifies the behavior to not wait for these inherited children,
some of which might be long-lived.
5. In certain cases, bash optimizes out a fork() call too early and prevents
traps from running.
6. Bash-5.0 did not build successfully if SYSLOG_HISTORY was defined without
also defining SYSLOG_SHOPT.
7. Running `exec' when job control was disabled, even temporarily, but after it
had been initialized, could leave the terminal in the wrong process group for
the executed process.
## v0.5.2
- Allow disabling automatic widget re-binding for better performance (#418)
- Fix async suggestions when `SH_WORD_SPLIT` is set
- Refactor async mode to use process substitution instead of zpty (#417)
## v0.5.1
- Speed up widget rebinding (#413)
- Clean up global variable creations (#403)
- Respect user's set options when running original widget (#402)
Update provided by Michael Bäuerle via pksrc-wip.
Changelog
=========
Release 2019-02-18:
- libgetopt: The undocumented variable "_sp" from SVr4 has been renamed
to "opt_sp" and (on platforms that support "#pragma weak") there
is a weak reference _sp to that new variable, giving backwards
compatibility.
The reason for doing this is to make sure that people on Illumos
or Oracle Solaris, who still have an outdated version of getopt()
in their local libc, do not try to link the Bourne Shell only
against their old getopt(). If they did this, they would not get
the documented enhanced getopt() features from the Bourne Shell.
- Bourne Shell: The shell now uses "opt_sp" as the name for the
undocumented additional getopt() interface from AT&T. This has
been done to avoid being able to link the Bourne Shell on
Illumos or Oracle Solaris without using our libgetopt. If this
was done, we could not support UNIX/MULTICS style long options
and we could not support -help/--help, since the latter is
implemented via long options that are not an alias to short
options.
- Bourne Shell: added a new timestamp to the Bourne Shell version.
Release 2018-11-21:
- Bourne Shell: make it exit the whole shell with set -e after a command
substitution failed on the right side of a variable assignment
that has no command. This is required by POSIX.
- Bourne Shell: added a unit tests for the above case.
- Bourne Shell: New version date set to 2018-12-08 the this change.
Release 2019-01-22:
- bsh / Bourne Shell / star: the function hop_dirs() no longer checks
for p2 != NULL before calling *p2 = '/' as p2 has
been granted to be != NULL from a break with
strchr(p, '/') == NULL
Thanks to Pavel Raiskup for poiting to a related
Coverity message.
- Bourne Shell: Added a missing /* FALLTHROUGH */ comment..
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: added a range check for $OPTIND to tge getopts(1)
implementation
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Removed a nonsense variable in expand() that caused
Coverity not to understand that a directory was correctly
closed()
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Added a paranoia comparison to make Coverity quiet.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: avoid to call catpath() with a NULL pointer for path
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: check the write() return code in io.c
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Added a paranopia check for "test -o" to make Coperity
quiet.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Added (void) before fcntl() in hope to make Coverity
quiet.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Removed dead code from readwc()
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Cstyle changes to xec.c
- Bourne Shell: "builtin -d ..." did access free()d memory.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: expand.c: added a check for fd == -1 to avoid calling
openat() with that fd.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
-Bourne Shell: func.c: added a check for fd == -1 to avoid calling
read()/close() with that fd.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: jobs.c: enlarged a buffer to be of same size as
numbuf[] to avoid a potential buffer overflow.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: print.c::prt_cntl() had a very old (AT&T) bug with
printing byte sequences that get an error with mbtowc() and it
did not print byte sequences correctly that refer to legal but
"nonprintable" multi byte characters.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: xec.c: the reserved word "time" could cause to
access uninitialized memory if the string in $TIMEFORMAT
contains the format %J
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: xec.c: added a paranoia check on whether
findnam("funcname") returns NULL even though the existence of
a function with that name already has been verified via the
hash service.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
Release 2019-02-18:
- Bourne Shell: Another vfork() problem has been fixed. "trap cmd EXIT"
has incorrectly called "cmd" after a non-existing command was.
called by the shell. This was a result of the shared data from
vfork().
Thanks to Martijn Dekker for reporting.
- Bourne Shell: A unit test case for the above bug has been added.
- Bourne Shell: __growstak() now always uses realloc() on modern
platforms. This may speed up things up to 15%.
Thanks to Jan Engelhardt for reporting.
Release 2019-03-11:
- libgetopt/Bourne Shell: added an #ifndef __CYGWIN__ in order to avoid
overwriting non-standard definitions by standard
definitions on Cygwin for the global getopt()
variables.
Thanks to Heiko Ei[eszett]feldt for proposing this
fix.
- Bourne Shell: better comment in bltin.c
Update provided by Michael Bäuerle via pkgsrc-wip.
Changelog
=========
Release 2019-02-18:
- libgetopt: The undocumented variable "_sp" from SVr4 has been renamed
to "opt_sp" and (on platforms that support "#pragma weak") there
is a weak reference _sp to that new variable, giving backwards
compatibility.
The reason for doing this is to make sure that people on Illumos
or Oracle Solaris, who still have an outdated version of getopt()
in their local libc, do not try to link the Bourne Shell only
against their old getopt(). If they did this, they would not get
the documented enhanced getopt() features from the Bourne Shell.
- Bourne Shell: The shell now uses "opt_sp" as the name for the
undocumented additional getopt() interface from AT&T. This has
been done to avoid being able to link the Bourne Shell on
Illumos or Oracle Solaris without using our libgetopt. If this
was done, we could not support UNIX/MULTICS style long options
and we could not support -help/--help, since the latter is
implemented via long options that are not an alias to short
options.
- Bourne Shell: added a new timestamp to the Bourne Shell version.
Release 2018-11-21:
- Bourne Shell: make it exit the whole shell with set -e after a command
substitution failed on the right side of a variable assignment
that has no command. This is required by POSIX.
- Bourne Shell: added a unit tests for the above case.
- Bourne Shell: New version date set to 2018-12-08 the this change.
Release 2019-01-22:
- bsh / Bourne Shell / star: the function hop_dirs() no longer checks
for p2 != NULL before calling *p2 = '/' as p2 has
been granted to be != NULL from a break with
strchr(p, '/') == NULL
Thanks to Pavel Raiskup for poiting to a related
Coverity message.
- Bourne Shell: Added a missing /* FALLTHROUGH */ comment..
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: added a range check for $OPTIND to tge getopts(1)
implementation
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Removed a nonsense variable in expand() that caused
Coverity not to understand that a directory was correctly
closed()
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Added a paranoia comparison to make Coverity quiet.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: avoid to call catpath() with a NULL pointer for path
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: check the write() return code in io.c
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Added a paranopia check for "test -o" to make Coperity
quiet.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Added (void) before fcntl() in hope to make Coverity
quiet.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Removed dead code from readwc()
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: Cstyle changes to xec.c
- Bourne Shell: "builtin -d ..." did access free()d memory.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: expand.c: added a check for fd == -1 to avoid calling
openat() with that fd.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
-Bourne Shell: func.c: added a check for fd == -1 to avoid calling
read()/close() with that fd.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: jobs.c: enlarged a buffer to be of same size as
numbuf[] to avoid a potential buffer overflow.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: print.c::prt_cntl() had a very old (AT&T) bug with
printing byte sequences that get an error with mbtowc() and it
did not print byte sequences correctly that refer to legal but
"nonprintable" multi byte characters.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: xec.c: the reserved word "time" could cause to
access uninitialized memory if the string in $TIMEFORMAT
contains the format %J
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
- Bourne Shell: xec.c: added a paranoia check on whether
findnam("funcname") returns NULL even though the existence of
a function with that name already has been verified via the
hash service.
Thanks to Pavel Raiskup for poiting to a related Coverity
message.
Release 2019-02-18:
- Bourne Shell: Another vfork() problem has been fixed. "trap cmd EXIT"
has incorrectly called "cmd" after a non-existing command was.
called by the shell. This was a result of the shared data from
vfork().
Thanks to Martijn Dekker for reporting.
- Bourne Shell: A unit test case for the above bug has been added.
- Bourne Shell: __growstak() now always uses realloc() on modern
platforms. This may speed up things up to 15%.
Thanks to Jan Engelhardt for reporting.
Release 2019-03-11:
- libgetopt/Bourne Shell: added an #ifndef __CYGWIN__ in order to avoid
overwriting non-standard definitions by standard
definitions on Cygwin for the global getopt()
variables.
Thanks to Heiko Ei[eszett]feldt for proposing this
fix.
- Bourne Shell: better comment in bltin.c
* Move --enable-zsh-mem configure option to non-debug part
to stabilize zsh with NetBSD's new jemalloc
Changelog:
2019-02-03 dana <dana@dana.is>
* unposted: Config/version.mk, Etc/FAQ.yo, README: Update for
5.7.1
* 44034: Completion/Unix/Type/_date_formats: Complete %9./%N,
adjust some wording
* 44033: Completion/Unix/Command/_dos2unix: Add completion for
dos2unix/unix2dos
* 44030: Src/prompt.c, Test/D01prompt.ztst: Return error for
unrecognised colour name
2019-01-28 Fredric Silberberg <fred@silberberg.xyz>
* github #32: Completion/Unix/Command/_git: Fix a typo in the
git tag completion.
2018-01-27 dana <dana@dana.is>
* unposted: Etc/creating-a-release.txt: Document additional
release steps
* 44020: Functions/VCS_Info/Backends/VCS_INFO_detect_p4: Fix
infinite recursion
R57 rolls up bugfixes, with few hard changes:
* [gecko2] Update operating environment reporting for the Macintosh
* [Martijn Dekker] make ${foo#'bar'} in here document behave like ksh93
* [Martijn Dekker] quote empty strings for re-entry into shell
* [tg, G.raud Meyer] Improve documentation, especially for tty states
* [tg] Protect against entering line editing with bad saved tty state
* [tg] Fix set -o allexport for arrays (which we apparently do)
* [tg] Handle lseek(2) returning -1 as pointed out by Coverity Scan
* [tg] Fix left-padding UTF-8 strings
* [tg, G.raud Meyer] Fix using the ?-m? flag on the command line
* [tg] Update to UCD 11.0.0
* [multiplexd] Fix a segfault using ^W during search in Vi mode
* [tg] Fix an error message; add a test for controlling tty
* [tg] Permit unsetting LINES and COLUMNS, for those who need it
* [tg] Fix manpage bug (RedHat BZ#1612173)
* [tg] Minor spelling cleanup
* [tg] Unbreak high-bit7 (n?n-ASCII) heredoc separators (LP#1779179)
* [tg] Allow dumping high-bit7-char-containing strings in DEBUG mode
* [tg] Add some testcases for behaviour questions popped up in IRC
* [tg] Trick a GCC warning, to make up for it ignoring lint(1) hints
* [tg] Add O_MAYEXEC support for CLIP OS
* [tg] Make dup-to-self with ksh-style fd?3 closing work; catern via IRC
* [tg] Add compat glue for newer GNU groff mdoc to the manpages
* [tg] Trigger EXIT trap after single-command subshells (Debian #910276)
* [tg] Document set -eo pipefail caveat (LP#1804504)
* [tg] Fix MKSH_EARLY_LOCALE_TRACKING warning
* [tg] Document that, when your Unix is broken, GIGO applies (LP#1817959)
* [tg] Improve error message for inaccessible executables (LP#1817789)
## v0.5.0
- Don't overwrite config with default values (#335)
- Support fallback strategies by supplying array to suggestion config var
- Rename "default" suggestion strategy to "history" to name it based on what it actually does
- Reset opts in some functions affected by `GLOB_SUBST` (#334)
- Support widgets starting with dashes (ex: `-a-widget`) (#337)
- Skip async tests in zsh versions less than 5.0.8 because of reliability issues
- Fix handling of newline + carriage return in async pty (#333)
if MANPATH is empty but the environment variable is respected, we won't
be able to find any man pages, because fish set it to PREFIX/share/fish/man
bump PKGREVISION
Add a "doc" option, default on, to avoid a doxygen dependency.
requested by martin & also in PR pkg/53934.
# fish 3.0.0 (released December 28, 2018)
fish 3 is a major release, which introduces some breaking changes alongside improved functionality. Although most existing scripts will continue to work, they should be reviewed against the list contained in the 3.0b1 release notes below.
Compared to the beta release of fish 3.0b1, fish version 3.0.0:
- builds correctly against musl libc (#5407)
- handles huge numeric arguments to `test` correctly (#5414)
- removes the history colouring introduced in 3.0b1, which did not always work correctly
There is one significant known issue which was not able to be corrected before the release:
- fish 3.0.0 builds on Cygwin (#5423), but does not run correctly (#5426) and will result in a hanging terminal when started. Cygwin users are encouraged to continue using 2.7.1 until a release which corrects this is available.
If you are upgrading from version 2.7.1 or before, please also review the release notes for 3.0b1 (included below).
---
# fish 3.0b1 (released December 11, 2018)
fish 3 is a major release, which introduces some breaking changes alongside improved functionality. Although most existing scripts will continue to work, they should be reviewed against the list below.
## Notable non-backward compatible changes
- Process and job expansion has largely been removed. `%` will no longer perform these expansions, except for `%self` for the PID of the current shell. Additionally, job management commands (`disown`, `wait`, `bg`, `fg` and `kill`) will expand job specifiers starting with `%` (#4230, #1202).
- `set x[1] x[2] a b`, to set multiple elements of an array at once, is no longer valid syntax (#4236).
- A literal `{}` now expands to itself, rather than nothing. This makes working with `find -exec` easier (#1109, #4632).
- Literally accessing a zero-index is now illegal syntax and is caught by the parser (#4862). (fish indices start at 1)
- Successive commas in brace expansions are handled in less surprising manner. For example, `{,,,}` expands to four empty strings rather than an empty string, a comma and an empty string again (#3002, #4632).
- `for` loop control variables are no longer local to the `for` block (#1935).
- Variables set in `if` and `while` conditions are available outside the block (#4820).
- Local exported (`set -lx`) vars are now visible to functions (#1091).
- The new `math` builtin (see below) does not support logical expressions; `test` should be used instead (#4777).
- Range expansion will now behave sensibly when given a single positive and negative index (`$foo[5..-1]` or `$foo[-1..5]`), clamping to the last valid index without changing direction if the list has fewer elements than expected.
- `read` now uses `-s` as short for `--silent` (à la `bash`); `--shell`'s abbreviation (formerly `-s`) is now `-S` instead (#4490).
- `cd` no longer resolves symlinks. fish now maintains a virtual path, matching other shells (#3350).
- `source` now requires an explicit `-` as the filename to read from the terminal (#2633).
- Arguments to `end` are now errors, instead of being silently ignored.
- The names `argparse`, `read`, `set`, `status`, `test` and `[` are now reserved and not allowed as function names. This prevents users unintentionally breaking stuff (#3000).
- The `fish_user_abbreviations` variable is no longer used; abbreviations will be migrated to the new storage format automatically.
- The `FISH_READ_BYTE_LIMIT` variable is now called `fish_byte_limit` (#4414).
- Environment variables are no longer split into arrays based on the record separator character on startup. Instead, variables are not split, unless their name ends in PATH, in which case they are split on colons (#436).
- The `history` builtin's `--with-time` option has been removed; this has been deprecated in favor of `--show-time` since 2.7.0 (#4403).
- The internal variables `__fish_datadir` and `__fish_sysconfdir` are now known as `__fish_data_dir` and `__fish_sysconf_dir` respectively.
## Deprecations
With the release of fish 3, a number of features have been marked for removal in the future. All users are encouraged to explore alternatives. A small number of these features are currently behind feature flags, which are turned on at present but may be turned off by default in the future.
A new feature flags mechanism is added for staging deprecations and breaking changes. Feature flags may be specified at launch with `fish --features ...` or by setting the universal `fish_features` variable. (#4940)
- The use of the `IFS` variable for `read` is deprecated; `IFS` will be ignored in the future (#4156). Use the `read --delimiter` option instead.
- The `function --on-process-exit` switch will be removed in future (#4700). Use the `fish_exit` event instead: `function --on-event fish_exit`.
- `$_` is deprecated and will removed in the future (#813). Use `status current-command` in a command substitution instead.
- `^` as a redirection deprecated and will be removed in the future. (#4394). Use `2>` to redirect stderr. This is controlled by the `stderr-nocaret` feature flag.
- `?` as a glob (wildcard) is deprecated and will be removed in the future (#4520). This is controlled by the `qmark-noglob` feature flag.
## Notable fixes and improvements
### Syntax changes and new commands
- fish now supports `&&` (like `and`), `||` (like `or`), and `!` (like `not`), for better migration from POSIX-compliant shells (#4620).
- Variables may be used as commands (#154).
- fish may be started in private mode via `fish --private`. Private mode fish sessions do not have access to the history file and any commands evaluated in private mode are not persisted for future sessions. A session variable `$fish_private_mode` can be queried to detect private mode and adjust the behavior of scripts accordingly to respect the user's wish for privacy.
- A new `wait` command for waiting on backgrounded processes (#4498).
- `math` is now a builtin rather than a wrapper around `bc` (#3157). Floating point computations is now used by default, and can be controlled with the new `--scale` option (#4478).
- Setting `$PATH` no longer warns on non-existent directories, allowing for a single $PATH to be shared across machines (eg via dotfiles) (#2969).
- `while` sets `$status` to a non-zero value if the loop is not executed (#4982).
- Command substitution output is now limited to 10 MB by default, controlled by the `fish_read_limit` variable (#3822). Notably, this is larger than most operating systems' argument size limit, so trying to pass argument lists this size to external commands has never worked.
- The machine hostname, where available, is now exposed as the `$hostname` reserved variable. This removes the dependency on the `hostname` executable (#4422).
- Bare `bind` invocations in config.fish now work. The `fish_user_key_bindings` function is no longer necessary, but will still be executed if it exists (#5191).
- `$fish_pid` and `$last_pid` are available as replacements for `%self` and `%last`.
### New features in commands
- `alias` has a new `--save` option to save the generated function immediately (#4878).
- `bind` has a new `--silent` option to ignore bind requests for named keys not available under the current terminal (#4188, #4431).
- `complete` has a new `--keep-order` option to show the provided or dynamically-generated argument list in the same order as specified, rather than alphabetically (#361).
- `exec` prompts for confirmation if background jobs are running.
- `funced` has a new `--save` option to automatically save the edited function after successfully editing (#4668).
- `functions` has a new ` --handlers` option to show functions registered as event handlers (#4694).
- `history search` supports globs for wildcard searching (#3136) and has a new `--reverse` option to show entries from oldest to newest (#4375).
- `jobs` has a new `--quiet` option to silence the output.
- `read` has a new `--delimiter` option for splitting input into arrays (#4256).
- `read` writes directly to stdout if called without arguments (#4407).
- `read` can now read individual lines into separate variables without consuming the input in its entirety via the new `/--line` option.
- `set` has new `--append` and `--prepend` options (#1326).
- `set` has a new `--show` option to show lots of information about variables (#4265).
- `string match` with an empty pattern and `--entire` in glob mode now matches everything instead of nothing (#4971).
- `string split` supports a new `--no-empty` option to exclude empty strings from the result (#4779).
- `string` has new subcommands `split0` and `join0` for working with NUL-delimited output.
- `string` no longer stops processing text after NUL characters (#4605)
- `string escape` has a new `--style regex` option for escaping strings to be matched literally in `string` regex operations.
- `test` now supports floating point values in numeric comparisons.
### Interactive improvements
- A pipe at the end of a line now allows the job to continue on the next line (#1285).
- Italics and dim support out of the box on macOS for Terminal.app and iTerm (#4436).
- `cd` tab completions no longer descend into the deepest unambiguous path (#4649).
- Pager navigation has been improved. Most notably, moving down now wraps around, moving up from the commandline now jumps to the last element and moving right and left now reverse each other even when wrapping around (#4680).
- Typing normal characters while the completion pager is active no longer shows the search field. Instead it enters them into the command line, and ends paging (#2249).
- A new input binding `pager-toggle-search` toggles the search field in the completions pager on and off. By default, this is bound to Ctrl-S.
- Searching in the pager now does a full fuzzy search (#5213).
- The pager will now show the full command instead of just its last line if the number of completions is large (#4702).
- Abbreviations can be tab-completed (#3233).
- Tildes in file names are now properly escaped in completions (#2274).
- Wrapping completions (from `complete --wraps` or `function --wraps`) can now inject arguments. For example, `complete gco --wraps 'git checkout'` now works properly (#1976). The `alias` function has been updated to respect this behavior.
- Path completions now support expansions, meaning expressions like `python ~/<TAB>` now provides file suggestions just like any other relative or absolute path. (This includes support for other expansions, too.)
- Autosuggestions try to avoid arguments that are already present in the command line.
- Notifications about crashed processes are now always shown, even in command substitutions (#4962).
- The screen is no longer reset after a BEL, fixing graphical glitches (#3693).
- vi-mode now supports ';' and ',' motions. This introduces new {forward,backward}-jump-till and repeat-jump{,-reverse} bind functions (#5140).
- The `*y` vi-mode binding now works (#5100).
- True color is now enabled in neovim by default (#2792).
- Terminal size variables (`$COLUMNS`/`$LINES`) are now updated before `fish_prompt` is called, allowing the prompt to react (#904).
- Multi-line prompts no longer repeat when the terminal is resized (#2320).
- `xclip` support has been added to the clipboard integration (#5020).
- The Alt-P keybinding paginates the last command if the command line is empty.
- `$cmd_duration` is no longer reset when no command is executed (#5011).
- Deleting a one-character word no longer erases the next word as well (#4747).
- Token history search (Alt-Up) omits duplicate entries (#4795).
- The `fish_escape_delay_ms` timeout, allowing the use of the escape key both on its own and as part of a control sequence, was applied to all control characters; this has been reduced to just the escape key.
- Completing a function shows the description properly (#5206).
- Added completions for
- `ansible`, including `ansible-galaxy`, `ansible-playbook` and `ansible-vault` (#4697)
- `bb-power` (#4800)
- `bd` (#4472)
- `bower`
- `clang` and `clang++` (#4174)
- `conda` (#4837)
- `configure` (for autoconf-generated files only)
- `curl`
- `doas` (#5196)
- `ebuild` (#4911)
- `emaint` (#4758)
- `eopkg` (#4600)
- `exercism` (#4495)
- `hjson`
- `hugo` (#4529)
- `j` (from autojump #4344)
- `jbake` (#4814)
- `jhipster` (#4472)
- `kitty`
- `kldload`
- `kldunload`
- `makensis` (#5242)
- `meson`
- `mkdocs` (#4906)
- `ngrok` (#4642)
- OpenBSD's `pkg_add`, `pkg_delete`, `pkg_info`, `pfctl`, `rcctl`, `signify`, and `vmctl` (#4584)
- `openocd`
- `optipng`
- `opkg` (#5168)
- `pandoc` (#2937)
- `port` (#4737)
- `powerpill` (#4800)
- `pstack` (#5135)
- `serve` (#5026)
- `ttx`
- `unzip`
- `virsh` (#5113)
- `xclip` (#5126)
- `xsv`
- `zfs` and `zpool` (#4608)
- Lots of improvements to completions (especially `darcs` (#5112), `git`, `hg` and `sudo`).
- Completions for `yarn` and `npm` now require the `all-the-package-names` NPM package for full functionality.
- Completions for `bower` and `yarn` now require the `jq` utility for full functionality.
- Improved French translations.
### Other fixes and improvements
- Significant performance improvements to `abbr` (#4048), setting variables (#4200, #4341), executing functions, globs (#4579), `string` reading from standard input (#4610), and slicing history (in particular, `$history[1]` for the last executed command).
- Fish's internal wcwidth function has been updated to deal with newer Unicode, and the width of some characters can be configured via the `fish_ambiguous_width` (#5149) and `fish_emoji_width` (#2652) variables. Alternatively, a new build-time option INTERNAL_WCWIDTH can be used to use the system's wcwidth instead (#4816).
- `functions` correctly supports `-d` as the short form of `--description`. (#5105)
- `/etc/paths` is now parsed like macOS' bash `path_helper`, fixing $PATH order (#4336, #4852) on macOS.
- Using a read-only variable in a `for` loop produces an error, rather than silently producing incorrect results (#4342).
- The universal variables filename no longer contains the hostname or MAC address. It is now at the fixed location `.config/fish/fish_variables` (#1912).
- Exported variables in the global or universal scope no longer have their exported status affected by local variables (#2611).
- Major rework of terminal and job handling to eliminate bugs (#3805, #3952, #4178, #4235, #4238, #4540, #4929, #5210).
- Improvements to the manual page completion generator (#2937, #4313).
- `suspend --force` now works correctly (#4672).
- Pressing Ctrl-C while running a script now reliably terminates fish (#5253).
### For distributors and developers
- fish ships with a new build system based on CMake. CMake 3.2 is the minimum required version. Although the autotools-based Makefile and the Xcode project are still shipped with this release, they will be removed in the near future. All distributors and developers are encouraged to migrate to the CMake build.
- Build scripts for most platforms no longer require bash, using the standard sh instead.
- The `hostname` command is no longer required for fish to operate.
Upstream changes:
2019-01-24 : Release 5.7
Bug fix release with a few user visible additions.
2018-01-24 dana <dana@dana.is>
* unposted: Config/version.mk, README: Update for 5.7
2018-01-23 dana <dana@dana.is>
* 44012: Test/X04zlehighlight.ztst: Fix spurious test failures
on OpenBSD
2019-01-23 Mikael Magnusson <mikachu@gmail.com>
* 44011: Doc/Zsh/zle.yo, Src/prompt.c, Test/X04zlehighlight.ztst:
Only use fg_start_code for non-truecolor
====================
Xonsh Change Log
====================
v0.8.8
====================
**Added:**
* ``vox new`` has an added ``-p --interpreter`` flag for choosing the python interpreter to use for virtualenv creation
* The default Python intrepreter vox uses to create virtual environments can be set using the ``$VOX_DEFAULT_INTERPRETER`` environment variable.
**Changed:**
* ``lib.ChainDB`` now resolves results to the type of the inputs if possible
v0.8.7
====================
**Added:**
* New xonsh syntax ``pf`` strings -- combining path strings with f-strings.
Usage:
.. code-block:: bash
gil@bad_cat ~ $ repos = 'github.com'
gil@bad_cat ~ $ pf"~/{repos}"
PosixPath('/home/gil/github.com')
gil@bad_cat ~ $ pf"{$HOME}"
PosixPath('/home/gil')
gil@bad_cat ~ $ pf"/home/${'US' + 'ER'}"
PosixPath('/home/gil')
**Fixed:**
* Set ``ls`` to ``predict_true`` in ``default_threadable_predictors``. This prevents ``ls`` on OSX
from being flagged on OSX as unthreadable (incorrectly) because it relies on ``ncurses``.
v0.8.6
====================
**Added:**
* Doco about how to update xonsh and how to set and unset environment variables
**Fixed:**
* Updated behavior of the ``cat`` coreutils function so that it properly
handles as vareity of cases such as:
* Exits after concatenating normal files which have a finite size
* Continues to run for special files which do not have a size,
such as ``/dev/random``
* Is interruptable in all cases with Crtl-C.
* Callable aliases were not properly raising a ``CalledProcessError`` when they
returned a non-zero exist status when ``$RAISE_SUBPROC_ERROR = True``. This has
been fixed.
* Fixed interpretation of color names with PTK2 and Pygments 2.3.1.
v0.8.5
====================
**Added:**
* Add alias to `base16 shell <https://github.com/chriskempson/base16-shell>`_
* Installation / Usage
1. To install use pip
.. code-block:: bash
python3 -m pip install xontrib-base16-shell
2. Add on ``~/.xonshrc``
.. code:: python
:number-lines:
$BASE16_SHELL = $HOME + "/.config/base16-shell/"
xontrib load base16_shell
3. See image
.. image:: https://raw.githubusercontent.com/ErickTucto/xontrib-base16-shell/master/docs/terminal.png
:width: 600px
:alt: terminal.png
* New ``DumbShell`` class that kicks in whenever ``$TERM == "dumb"``.
This usually happens in emacs. Currently, this class inherits from
the ``ReadlineShell`` but adds some light customization to make
sure that xonsh looks good in the resultant terminal emulator.
* Aliases from foreign shells (e.g. Bash) that are more than single expressions,
or contain sub-shell executions, are now evaluated and run in the foreign shell.
Previously, xonsh would attempt to translate the alias from sh-lang into
xonsh. These restrictions have been removed. For example, the following now
works:
.. code-block:: sh
$ source-bash 'alias eee="echo aaa \$(echo b)"'
$ eee
aaa b
* New ``ForeignShellBaseAlias``, ``ForeignShellFunctionAlias``, and
``ForeignShellExecAlias`` classes have been added which manage foreign shell
alias execution.
**Changed:**
* String aliases will now first be checked to see if they contain sub-expressions
that require evaluations, such as ``@(expr)``, ``$[cmd]``, etc. If they do,
then an ``ExecAlias`` will be constructed, rather than a simple list-of-strs
substitutiuon alias being used. For example:
.. code-block:: sh
$ aliases['uuu'] = "echo ccc $(echo ddd)"
$ aliases['uuu']
ExecAlias('echo ccc $(echo ddd)\n', filename='<exec-alias:uuu>')
$ uuu
ccc ddd
* The ``parse_aliases()`` function now requires the shell name.
* ``ForeignShellFunctionAlias`` now inherits from ``ForeignShellBaseAlias``
rather than ``object``.
**Fixed:**
* Fixed issues where the prompt-toolkit v2 shell would print an extra newline
after Python evaluations in interactive mode.
v0.8.4
====================
**Added:**
* Added the possibility of arbitrary paths to the help strings in ``vox activate`` and
``vox remove``; also updated the documentation accordingly.
* New ``xonsh.aliases.ExecAlias`` class enables multi-statement aliases.
* New ``xonsh.ast.isexpression()`` function will return a boolean of whether
code is a simple xonsh expression or not.
* Added top-level ``run-tests.xsh`` script for safely running the test suite.
**Changed:**
* String aliases are no longer split with ``shlex.split()``, but instead use
``xonsh.lexer.Lexer.split()``.
* Update xonsh/prompt/cwd.py _collapsed_pwd to print 2 chars if a directory begins with "."
* test which determines whether a directory is a virtualenv
previously it used to check the existence of 'pyvenv.cfg'
now it checks if 'bin/python' is executable
**Fixed:**
* Fixed issue with ``and`` & ``or`` being incorrectly tokenized in implicit
subprocesses. Auto-wrapping of certain subprocesses will now correctly work.
For example::
$ echo x-and-y
x-and-y
* Fix EOFError when press `control+d`
* fix no candidates if no permission files in PATH
* Fixed interpretation of color names with PTK2 and Pygments 2.3.
* Several ResourceWarnings: unclosed file in tests
* AttributeError crash when using --timings flag
* issue #2929
v0.8.3
====================
**Added:**
* Dociumentation paragrapgh about gow to run xonsh in Emacs shell
**Changed:**
* Updated what pip requirements are needed to build the documnetaion
* ``$XONSH_TRACEBACK_LOGFILE`` now beside strings also accepts ``os.PathLike``
objects.
* Updated vended version of ``ply`` to 3.11
* Deprecation warnings now print from stacklevel 3.
**Fixed:**
* Annotation assignment statements (e.g. ``x : int = 42``) are now supported.
* Fixed error output wording for fg and bg commands
* Flake8 errors
* xonsh can now properly parse import statements with trailing comma within
parentheses, e.g.::
from x import (y, z,)
* ResourceWarning: unclosed scandir iterator in imphooks.py
* Removed use of deprecated ``inspect.formatargspec()`` for ``inspect.signature()``
* ``Makefile`` directive that updates vended version of ``ply``
v0.8.2
====================
**Changed:**
* Now there is only a single instance of ``string.Formatter()`` in the
code base, which is called ``xonsh.tools.FORMATTER``.
**Fixed:**
* f-strings (``f"{expr}"``) are now fully capable of executing xonsh expressions.
The one exception to this is that ``![cmd]`` and ``!(cmd)`` don't work because
the ``!`` character interferes with Python string formatting. If you need to
run subprocesses inside of f-strings, use ``$[cmd]`` and ``$(cmd)`` instead.
* Fixed occasional "no attribute 'settitle' error"
v0.8.1
====================
**Added:**
* ``SubprocSpec`` has a new ``pipeline_index`` integer attribute that indicates
the commands position in a pipeline. For example, in
.. code-block:: sh
p = ![ls -l | grep x]
The ``ls`` command would have a pipeline index of 0
(``p.specs[0].pipeline_index == 0``) and ``grep`` would have a pipeline index
of 1 (``p.specs[1].pipeline_index == 1``). This may be usefule in callable
alaises which recieve the spec as an argument.
**Changed:**
* Removed ``fish`` from list of supported foreign shells in the wizard.
* Circle CI config updated to use a pinned version of ``black`` (18.9b0)
* Pytest plugin now uses ``xonsh.main.setup()`` to setup test environment.
* Linux platform discovery will no longer use ``platform.linux_distribution()``
on Python >=3.6.6. due to pending deprecation warning.
* Updated Linux Guide as Xonsh is now available in Arch Linux official repositories.
**Fixed:**
* Builtin dynamic proxies and deprecation warning proxies were not deleting
attributes and items properly.
* Fixed stdout/sdterr writing infinite recurssion error that would occur in
long pipelines of callable aliases.
* Fixed a bug which under very rare conditions could cause the shell
to die with PermissionError exception while sending SIGSTOP signal
to a child process.
* Fixed further raw string deprecation warnings thoughout the code base.
v0.8.0
====================
**Added:**
* Windows CI jobs on Azure Pipelines
* The ``cryptop`` command will no longer have its output captured
by default.
* Added new env-var ``PTK_STYLE_OVERRIDES``. The variable is
a dictionary containing custom prompt_toolkit style definitions.
For instance::
$PTK_STYLE_OVERRIDES['completion-menu'] = 'bg:#333333 #EEEEEE'
will provide for more visually pleasing completion menu style whereas::
$PTK_STYLE_OVERRIDES['bottom-toolbar'] = 'noreverse'
will prevent prompt_toolkit from inverting the bottom toolbar colors
(useful for powerline extension users)
Note: This only works with prompt_toolkit 2 prompter.
**Changed:**
* All ``__xonsh_*__`` builtins have been migrated to a ``XonshSession`` instance at
``__xonsh__``. E.g. ``__xonsh_env__`` is now ``__xonsh__.env``.
* Other xonsh-specific builtins (such as ``XonshError``) have been proxied to
the ``__xonsh__`` session object as well.
**Deprecated:**
* All ``__xonsh_*__`` builtins are deprected. Instead, the corresponding
``__xonsh__.*`` accessor should be used. The existing ``__xonsh_*__`` accessors
still work, but issue annoying warnings.
**Fixed:**
* Fixed deprecation warnings from unallowed escape sequences as well as importing abstract base classes directly from ``collections``
* Fix for string index error in stripped prefix
* bash_completions to include special characters in lprefix
Previously, glob expansion characters would not be included in lprefix for replacement
.. code-block:: sh
$ touch /tmp/abc
$ python
>>> from bash_completion import bash_completions
>>>
>>> def get_completions(line):
... split = line.split()
... if len(split) > 1 and not line.endswith(' '):
... prefix = split[-1]
... begidx = len(line.rsplit(prefix)[0])
... else:
... prefix = ''
... begidx = len(line)
... endidx = len(line)
... return bash_completions(prefix, line, begidx, endidx)
...
>>> get_completions('ls /tmp/a*')
({'/tmp/abc '}, 0)
Now, lprefix begins at the first special character:
.. code-block:: sh
$ python
>>> from bash_completion import bash_completions
>>>
>>> def get_completions(line):
... split = line.split()
... if len(split) > 1 and not line.endswith(' '):
... prefix = split[-1]
... begidx = len(line.rsplit(prefix)[0])
... else:
... prefix = ''
... begidx = len(line)
... endidx = len(line)
... return bash_completions(prefix, line, begidx, endidx)
...
>>> get_completions('ls /tmp/a*')
({'/tmp/abc '}, 7)
* The ``xonsh.main.setup()`` function now correctly passes the
``shell_type`` argument to the shell instance.
* try_subproc_toks now works for subprocs with trailing and leading whitespace
Previously, non-greedy wrapping of commands would fail if they had leading and trailing whitespace:
.. code-block:: sh
$ true && false || echo a
xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
NameError: name 'false' is not defined
$ echo; echo && echo a
xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
NameError: name 'echo' is not defined
Now, the commands are parsed as expected:
.. code-block:: sh
$ true && false || echo a
a
$ echo; echo && echo a
a
v0.7.10
====================
**Added:**
* 'off' can be passed as falsy value to all flags accepting boolean argument.
- DragonFly BSD support
* Format strings (f-strings) now allow environment variables to be looked up.
For example, ``f"{$HOME}"`` will yield ``"/home/user"``. Note that this will
look up and fill in the ``detype()``-ed version of the environment variable,
i.e. it's native string representation.
**Changed:**
* Running ``aurman`` command will now be predicted to be unthreaded by default.
**Fixed:**
* The xonsh ``xonfig wizard`` would crash if an unknown foreign shell was
provided. This has been fixed.
* The ``hg split`` command will now predict as unthreadable.
* Fixed path completer crash on attempted f-string completion
v0.7.9
====================
**Added:**
* The python-mode ``@(expr)`` syntax may now be used inside of subprocess
arguments, not just as a stand-alone argument. For example:
.. code-block:: sh
$ x = 'hello'
$ echo /path/to/@(x)
/path/to/hello
This syntax will even properly expand to the outer product if the ``expr``
is a list (or other non-string iterable) of values:
.. code-block:: sh
$ echo /path/to/@(['hello', 'world'])
/path/to/hello /path/to/world
$ echo @(['a', 'b']):@('x', 'y')
a:x a:y b:x b:y
Previously this was not possible.
* New ``$DOTGLOB`` environment variable enables globs to match
"hidden" files which start with a literal ``.``. Set this
variable to ``True`` to get this matching behavior.
Cooresponding API changes have been made to
``xonsh.tools.globpath()`` and ``xonsh.tools.iglobpath()``
* New environment variable ``$FOREIGN_ALIASES_SUPPRESS_SKIP_MESSAGE``
enables the removal of skipping foreign alias messages.
* New ``--suppress-skip-message`` command line option for skipping
foreign alias messages when sourcing foreign shells.
**Fixed:**
* In Bash completions, if there are no files to source, a ``set()`` will
no longer be inserted into the completion script.
* Fixed issue with TAB completion in readline not replacing values
with spaces properly when the prefix was unquoted.
v0.7.8
====================
**Added:**
* ``xonsh.lib.collections.ChainDB``, a chain map which merges mergable fields
**Fixed:**
* Pass all params to voxapi.create
* PTK tab-completion now auto-accepts completion if only one option is present
(note that fix is only for PTK2)
v0.7.7
====================
**Added:**
* A xontrib which adds support for autojump to xonsh
* Added new env-var ``XONSH_HISTORY_MATCH_ANYWHERE``. If set to ``True`` then
up-arrow history matching will match existing history entries with the search
term located anywhere, not just at the beginning of the line. Default value is
``False``
**Changed:**
* Improved iteration over virtual environments in ``Vox.__iter__``
**Fixed:**
* Fix for ``Enter`` not returning from Control-R search buffer
* Fixed automatic wrapping of many subprocesses that spanned multiple lines via
line continuation characters with logical operators separating the commands.
For example, the following now works:
.. code-block:: sh
echo 'a' \
and echo 'b'
* Environment swapping would not properly reraise errors due to weird
Python name binding issue.
v0.7.6
====================
**Added:**
* Callable aliases may now accept a ``stack`` argument. If they do, then the
stack, as computed from the aliases call site, is provided as a list of
``FrameInfo`` objects (as detailed in the standard library ``inspect``
module). Otherwise, the ``stack`` parameter is ``None``.
* ``SubprocSpec`` now has a ``stack`` attribute, for passing the call stack
to callable aliases. This defaults to ``None`` if the spec does not
need the stack. The ``resolve_stack()`` method computes the ``stack``
attribute.
**Changed:**
* xonsh/environ.py
Exceptions are caught in the code executed under Env.swap()
**Fixed:**
* Scripts are now cached by their realpath, not just abspath.
* Fixed a potential crash (``AssertionError: wrong color format``) on Python 3.5 and prompt_toolkit 1.
* The ``completer`` command now correctly finds completion functions
when nested inside of other functions.
* Fixed a crash when using the ``$XONSH_STDERR_PREFIX/POSTFIX`` with
prompt_toolkit and Pygments 2.2.
v0.7.5
====================
**Fixed:**
* Recent command history in ptk2 prompt now returns most recently executed
commands first (as expected)
* Fixed a regression taat prevented the readline backend from beeing used. This
regression was caused by the new ansi-color names, which are incompatible with
pygments 2.2.
v0.7.4
====================
**Added:**
* New ``xonsh-cat`` command line utility, which is a xonsh replacement
for the standard UNIX ``cat`` command.
* The new ``xonsh.xoreutils.cat.cat_main()`` enables the ``xonsh.xoreutils.cat``
module to be run as a command line utility.
* New ``CommandsCache.is_only_functional_alias()`` and
``CommandsCache.lazy_is_only_functional_alias()`` methods for determining if
if a command name is only implemented as a function, and thus has no
underlying binary command to execute.
* ``xonsh.xontribs.xontribs_load()`` is a new first-class API for loading
xontribs via a Python function.
* ``$COMPLETIONS_DISPLAY`` now supports readline-like behavior on
prompt-toolkit v2.
**Changed:**
* The xonsh Jupyter kernel now will properly redirect the output of commands
such as ``git log``, ``man``, ``less`` and other paged commands to the client.
This is done by setting ``$PAGER = 'cat'``. If ``cat`` is not available
on the system, ``xonsh-cat`` is used instead.
* The ``setup()`` function for starting up a working xonsh has ``aliases``,
``xontribs``, and ``threadable_predictors`` as new additional keyword
arguments for customizing the loading of xonsh.
**Fixed:**
* Fixed a bug with converting new PTK2 colors names to old names when using PTK1 or Jupyter
as the shell type.
* ``CommandsCache.locate_binary()`` will now properly return None when
``ignore_alias=False`` and the command is only a functional alias,
such as with ``cd``. Previously, it would return the name of the
command.
* Fixed issue with ``$COMPLETIONS_DISPLAY`` raising an error on
prompt-toolkit v2 when the value was not set to ``multi``.
* ValueError when executing ``vox list``
v0.7.3
====================
**Added:**
* Add the ``PROMPT_TOOLKIT_COLOR_DEPTH`` environment to xonsh default environment.
Possible values are ``DEPTH_1_BIT``/``MONOCHROME``,
``DEPTH_4_BIT``/``ANSI_COLORS_ONLY``, ``DEPTH_8_BIT``/``DEFAULT``, or ``DEPTH_24_BIT``/``TRUE_COLOR``.
Note: not all terminals support all color depths.
* New way to fix unreadable default terminal colors on Windows 10. Windows 10
now supports true color in the terminal, so if prompt toolkit 2 is
installed Xonsh will use a style with hard coded colors instead of the
default terminal colors. This will give the same color experience as on linux an mac.
The behaviour can be disabled with ``$INTENSIFY_COLORS_ON_WIN``
environment variable.
* New ``JupyterShell`` for interactive interfacing with Jupyter.
**Changed:**
* All ansicolor names used in styles have ben updated to the color names used by prompt_toolkit 2.
The new names are are much easier to understand
(e.g. ``ansicyan``/``ansibrightcyan`` vs. the old ``#ansiteal``/``#ansiturquoise``). The names are automatically
translated back when using prompt_toolkit 1.
**Removed:**
* Removed support for pygments < 2.2.
**Fixed:**
* New ansi-color names fixes the problem with darker colors using prompt_toolkit 2 on windows.
* Fixed a problem with the color styles on prompt toolkit 2. The default pygment
style is no longer merged into style selected in xonsh.
* The JupyterKernel has been fixed from a rather broken state.
v0.7.2
====================
**Added:**
* ``history show`` builtin now supports optional ``-0`` parameter that switches
the output to null-delimited. Useful for piping history to external filters.
**Fixed:**
* If exception is raised in indir context manager, return to original directory
* Fixed issue that autocomplete menu does not display
at terminal's maximum height
v0.7.1
====================
**Added:**
* Added feature to aliases.
* ``xonsh.lib.os.rmtree()`` an rmtree which works on windows properly (even with
git)
**Changed:**
* set default value of ``$AUTO_SUGGEST_IN_COMPLETIONS=False``
* Use the ``pygments_cache.get_all_styles()`` function instead of
interacting directly with pygments.
**Fixed:**
* Fixed issue with ``$ARG<N>`` varaibles not being passed to subprocesses correctly.
* Fixed issue with multiline string inside of ``@(expr)`` in
unwrapped subprocesses. For example, the following now works::
echo @("""hello
mom""")
* ``CommandPipeline.output`` now does properly lazy, non-blocking creation of
output string. ``CommandPipeline.out`` remains blocking.
* Fix regression in ``INTENSIFY_COLORS_ON_WIN`` functionality due to prompt_toolkit 2 update.
* Fixed issue that can't insert quotation marks and double quotes
for completion.
* Fixed issue with ``SyntaxErrors`` being reported on the wrong line
when a block of code contained multiple implicit subprocesses.
* ``prompt_toolkit >= 2`` will start up even if Pygments isn't present
* Fixed a regression with ``xonfig styles`` reporting ``AttributeError: module 'pygments' has no attribute 'styles'``
* ptk dependent xontribs (that use custom keybindings) now work with both ptk1
and ptk2
* Fixed async tokenizing issue on Python v3.7.
v0.7.0
====================
**Added:**
* Added a hook for printing a spcial display method on an object.
* Support for ``prompt_toolkit 2.0``
* The ``--shell-type`` (``$SHELL_TYPE``) may now be specified using
shortcuts, such as ``rl`` for ``readline`` and ``ptk2`` for
``prompt_toolkit2``. See ``xonsh --help`` for a full listing
of available aliases.
**Fixed:**
- Restored AUGASSIGN_OPS definition, which was inadvertently removed.
v0.6.10
====================
**Added:**
* ``xonsh.lib.subprocess.check_output`` as a ``check_output`` drop in
**Fixed:**
* ``xonsh.lib.subprocess.run`` doesn't change dirs unless asked
v0.6.9
====================
**Added:**
* New xonsh standard library ``xonsh.lib`` subpackage
* ``xonsh.lib.os.indir`` a context manager for temporarily entering into a directory
* ``xonsh.lib.subprocess.run`` and ``xonsh.lib.subprocess.check_call``
subprocess stubs using ``xonsh`` as the backend
**Fixed:**
* update xoreutils._which.which() for python 3.x support.
* Fixed issue with incorrect strip lengths for prefixes with quotes in them
* Fixed bash script to also consider leading double quotes and not just single
quotes
* Launching xonsh with prompt_toolkit version 2.x no longer fails, and instead fallsback to readline shell. This is a patch for until prompt_toolkit 2.x support is fully implemented. See PR #2570
v0.6.8
====================
**Fixed:**
* completions relative to ``CDPATH`` only trigger when used with ``cd``
* Import of ``ctypes.util`` is now explictly performed, as needed.
Python v3.7 no longer imports this module along with ``ctypes``.
* Fixed issue with pygments-cache not properly generating a cache the first
time when using prompt-toolkit. This was due to a lingering lazy import
of ``pkg_resources`` that has been removed.
* Removed duplicate ``pip`` completer
* ``bash_completion`` no longer returns invalid prefix lengths for directories
containing escape file names
* Fixed error when using redirection (e.g., >) on Windows.
v0.6.7
====================
**Changed:**
* Xonsh live example has been re-added back to the documentation.
**Fixed:**
* Fixed issue where xonsh would fail to properly return the terminal prompt
(and eat up 100% CPU) after a failed subprocess command in interactive mode
if ``$RAISE_SUBPROC_ERROR = True``.
* ``xonsh.tokenize.tok_name`` no longer mutates the standard library ``tokenize.tok_name``.
A copy is made on import instead.
v0.6.6
====================
**Added:**
* A multipurpose add method to EnvPath. For example:
.. code-block:: xonshcon
$ $PATH
EnvPath(
['/usr/bin', '/usr/local/bin', '/bin']
)
$ $PATH.add('~/.local/bin', front=True); $PATH
EnvPath(
['/home/user/.local/bin', '/usr/bin', '/usr/local/bin', '/bin']
)
$ $PATH.add('/usr/bin', front=True, replace=True); $PATH
EnvPath(
['/usr/bin', '/home/user/.local/bin', '/usr/local/bin', '/bin']
)
* Added ``pygments-cache`` project in order to reduce startup time.
**Changed:**
* built_ins.py, corrected a typo.
* test/test_news.py
It now uses regex to verify the format of rst files
* Mercurial (``hg``) will no longer run in a threadable subprocess when
it is run in interactive mode.
**Fixed:**
* issue 2313
v0.6.5
====================
**Added:**
* Wizard ``FileInsterter`` node class now has ``dumps()`` method for
converting a mapping to a string to insert in a file.
**Fixed:**
* Fixed issue with ``xonfig wizard`` writer failing to write valid run control
files for environment variables that are containter types. In particular,
the storage of ``$XONSH_HISTORY_SIZE`` has been fixed.
v0.6.4
====================
**Changed:**
* Error message improved for sourcing foreign shells, when file cannot be found
or there is a syntax error.
**Fixed:**
* Fixed issues with readline completer tab completing entries
with spaces.
* Fixed ``xonsh.tools.columnize()`` bug the prevented single-row
input from being columnized correctly.
* Now honor ASYNC and AWAIT as keywords in tokenizer on
Python 3.7.
v0.6.3
====================
**Added:**
* Docs for using ``@(<expr>)`` as a way to run commands and a gotcha about
list of strings vs single string expressions.
* Ubuntu versions which xonsh is packaged for (with xonsh versions)
**Changed:**
* When reporting errors without a traceback (i.e. ``$XONSH_SHOW_TRACEBACK = False``) and the error is a ``XonshError``
the exception type is not longer printed.
* ``CommandPipeline.proc`` may now be ``None``, to accomodate when the process
fails to even start (i.e. a missing command or incorrect permisions).
**Fixed:**
* The ``curl`` command will now be run in a thread, which prevents documents that
do not end in a newline from writing over the next prompt and vice versa.
* Fix bug on Windows when ``PATHEXT`` environment variable did not exist.
This also fixes building the xonsh documentation on Windows.
* Fixed a bug in the `free_cwd <http://xon.sh/xontribs.html#free-cwd>`__ Windows Xontrib, which caused the prompt to error if the current directory is
deleted/renamed from an other process.
* Fixed issue with ``$XONSH_SHOW_TRACEBACK`` not being respected in subprocess
mode when the command could not be found or had incorrect permissions.
v0.6.2
====================
**Added:**
* Release tarballs now include licenses and minimal documentation for xonsh and ply
* Wizard now has a ``FileInserter`` node that allows blocks to be
inserted and replaced inside of a file. This adheres to conversion
rules fordumping as provided on this node.
* New ``xonsh.wizard.StateVisitor.flatten()`` method for flattening the
current state.
**Changed:**
* The xonsh startup wizard will only be triggered if no xonshrc files exist
and the file ``~/.local/config/xonsh/no-wizard`` is not present.
* The ``xonfig wizard`` command will now run write out to the xonshrc file.
* Wizard nodes ``Save`` and ``Load`` had their names changed to ``SaveJSON``
and ``LoadJSON``.
**Removed:**
* Static configuration is dead (``config.json``), long live run control (``xonshrc``)!
* The following evironment variables have been removed as they are no longer needed:
``$LOADED_CONFIG`` and ``$XONSHCONFIG``.
* Many support functions for static configuration have also been removed.
**Fixed:**
* Files starting with ``#`` are auto-escaped by TAB completion
v0.6.1
====================
**Added:**
* Support for MSYS2.
* New ``xonsh.main.setup()`` function for starting up xonsh in 3rd party
packages.
**Changed:**
* Updated CircleCI to use circle version 2.0
* Replaced StopIteration with return in CommandPipeline.iterraw.
* Xonsh run control now also looks for the XDG-compliant file
``~/.config/xonsh/rc.xsh`` at startup.
**Fixed:**
* Clean out ``$LINES`` and ``$COLUMNS`` if set, preventing some programs from drawing weirdly
* cat from xoreutils now outputs in configured encoding
* Fixed hanging issue with pipelines whose middle processes exit before the
first or last process.
* Fixed issue where xonsh would deduplicate spaces from bash autocompletions.
* Fixed failing redirections from stderr to stdout when the command
being executed was a callable alias.
* Ensure that the ``free_cwd`` contrib can only be active on pure Windows.
* Made an exceptional case in ``iglobpath()`` more robust when Python globbing
fails for due to strange scrandir issue.
* Unexpected process suspension on Cygwin and MSYS2.
* ``$XONSH_APPEND_NEWLINE`` will now default to True when in interactive mode.
* Fixed issue with uncalled lambdas being run in subproc mode.
* Lambda nodes not have proper line and column numbers in AST.
* Properly throw ``SyntaxError`` when no kwargs are defined
in a kwarg-only function. This used to throw a
``TypeError: 'NoneType' object is not iterable``.
* Addressed issue where encoding and errors were None when teeing output.
* Commands like ``git c`` would complete to ``git 'checkout '`` because git adds an extra space
to the end of the completion, which was being captured in the completion. Xonsh now fixes the git issue
while retaining all whitespace when there is other internal whitespace.
v0.6.0
====================
**Added:**
* Added an alias command, matching bash's implementation, available as part of bashisms.
* New ``$AUTO_SUGGEST_IN_COMPLETIONS`` environment variable that enables/disables
whether the auto-suggestion result appears in the tab completions.
* Added ``__add__()`` and ``__radd__()`` methods to ``EnvPath``.
* Xonsh now supports f-strings, as in Python v3.6+.
* Added ``ipython`` as unthreadable in command cache threadabilty predictors.
* Added ``whole_word_jumping`` xontrib
* Added ``$XONSH_APPEND_NEWLINE`` environment variable
* Support for PEP 515: Underscores in Numeric Literals
* ``xonsh.color_tools.make_palette()``
Simple rename of the pre-existing
``xonsh.color_tools.make_pallete()`` function.
* ``xonsh.tools.decorator()`` function/method decorator.
This allows for an API function to be annotated with a
decorator that documents deprecation, while also tying in
functionality that will warn a user that the function has
been deprecated, and, raise an ``AssertionError`` if the
function has passed its expiry date.
* New xontrib ``schedule`` (Xonsh Task Scheduler)
**Changed:**
* ``on_pre_prompt`` is now fired before prompt calculations are made, allowing modifications to the prompt.
* ``emacsclient`` will now return false in the threadable predictors.
* Improved the autopair behavior to match that of popular code editors.
* Moved the lazy ``pkg_resources`` package back to its original
place. The will hopefully address some of the slowdown issues
experiances on some platforms.
* When xonsh is used to run an ``xsh`` script, the ``xonshrc`` is not loaded
* Change in the behavior of the default predictor with binary analysis. The pattern ``libgpm`` is use, assuming when ``gpm`` is used the program is not threadable. This change solves issues with programs as ``links``.
* Error messages added to the ``source`` command if it is used with a language
that is not xonsh or Python.
**Deprecated:**
* ``xonsh.color_tools.make_pallette()``
Deprecated in release 0.5.10 and will be removed in release 0.6.0.
**Fixed:**
* Now f-strings can be used inside @() without explicit enclosing command in ![]
* Fix for ``x, y, *z = ...`` unpacking.
* Git branch detection now correctly passes the environment down to the subprocess
call. This allows for branch detection when git is installed into a non-standard
location.
* Escape regex characters in ``path_complete`` to avoid regex parsing errors for
certain combinations of characters in path completer
* gistatus: Fixed hash not being shown when in detaced HEAD and there are no tags
* Fix branch colorization when ``git`` or ``hg`` are aliases.
* Fixed leftover ``.git/index.lock`` in ``gitstatus``
* Made JSON history loading more robust to corrupt files.
* Starting a new command with an open parentheses will no longer
throw a traceback when ``$UPDATE_COMPLETIONS_ON_KEYPRESS`` is
``True``.
* Automatically wrapping subprocess calls would sometimes include
semincolons and other line-ending tokens, rather than stopping at them.
This has been fixed.
* Numerous spelling errors in documentation, docstrings/comments, text
strings and local variable names.
* Spelling error in the ``xonsh.color_tools.make_pallete()`` public
function declaration. This was fixed by renaming the function to
``xonsh.color_tools.make_palette()`` while maintaining a binding
of ``make_pallete()`` to the new ``make_palette()`` in case users
are already used to this API.
* Fixed issue with starting triple quote strings being run as a command.
* Fixed a problem with escaping charet (^) character for cmd.exe in the source-cmd function.
* ``EOF in multi-line statement`` errors were misreported as being on line 0.
Now they are correctly reported as being on the last line of the file.
v0.5.12
====================
**Fixed:**
* Fixed ``release.xsh`` to prevent it from dirtying the repo on release and
leading to an unwanted ``.dev`` suffix on the version number
v0.5.11
====================
**Added:**
* ``release.xsh`` creates a github release with the merged news entries as the
release body
**Fixed:**
* ``xonfig`` now displays the proper value for "on linux"
v0.5.10
====================
**Added:**
* Added ``xclip`` and ``repo`` to default threadable predictors (Issues #2355
and #2348)
* Pretty printing of the $PATH variable
* Add "fzf-widgets" xontrib which provides fuzzy search productivity widgets
with on custom keybindings to xontrib list.
* New ``free_cwd`` xontrib for Windows, which prevent the current directory from being locked when the prompt is shown.
This allows the other programs or Windows explorer to delete the current or parent directory. This is accomplished by
resetting the CWD to the users home directory temporarily while the prompt is displayed. The directory is still locked
while any commands are processed so xonsh still can't remove it own working directory.
**Changed:**
* Codecov threshold to 2%
**Removed:**
* On Windows environments variables in wrapped like``%foo%`` are no longer expanded automatically.
**Fixed:**
* Fixed the ``--rc`` option so it now runs xonsh with the specified rc file
* ``@$`` operator now functions properly when returned command is an alias
* Correct line continuation would not work on Windows if the line continuations were used
in the ``xonshrc`` file.
* Fixed a regression in the Windows ``sudo`` command, that allows users to run elevated commands in xonsh.
* Fix echo command from xoreutils.
* Fixed a bug on Windows which meant xonsh wasn't using PATH environment variable but instead relying on a default
value from the windows registry.
v0.5.9
====================
**Added:**
* Add ``Alt .`` keybinding to ``bashisms-xontrib`` to insert last argument of
previous command into current buffer
**Fixed:**
* Fix crash when openSSH version of bash is on PATH on Windows.
* Added missing ensurers to make sure that ``bool`` env_vars are bools and
``int`` env_vars are integers:
* ``DIRSTACK_SIZE``
* ``EXPAND_ENV_VARS``
* ``PUSHD_MINUS``
* ``PUSHD_SILENT``
* ``SUGGEST_COMMANDS``
* ``SUGGEST_MAX_NUM``
* ``SUGGEST_THRESHOLD``
v0.5.8
====================
**Changed:**
* The ``xonsh.platform.os_environ`` wrapper is now case-insensitive and
case-preserving on Windows.
* The private ``_TeeStd`` class will no longer attempt to write to a
standard buffer after the tee has been 'closed' and the standard
buffer returned to the system.
**Fixed:**
* Fixed a bug on py34 where os.scandir was used by accident.
* Line continuations (``\\``) is subproc mode will no longer consume the
surrounding whitespace.
* Fixed a bug if foreign_shell name was not written in lower case in
the static configuration file ``config.json``
* Fixed a regression on Windows where caused ``which`` reported that the
``PATH`` environment variable could not be found.
* Fixed issue with foregrounding jobs that were started in the background.
* Fixed that ``Ctrl-C`` crashes xonsh after running an invalid command.
* Fixed an potential ``ProcessLookupError`` issue, see #2288.
v0.5.7
====================
**Added:**
* New ``color_tools`` module provides basic color tools for converting
to and from various formats as well as creating palettes from color
strings.
* Redirections may now be used in string and list-of-strings
aliases.
* Subprocess redirection may now forego the whitespace between the
redirection and a file name. For example,
``echo hello world >/dev/null``.
* Add a ``-P`` flag to the ``cd`` function in order to change directory and
following symlinks.
* ``xonfig tutorial`` command to launch the http://xon.sh/tutorial in the
browser.
* ``@(...)`` syntax now supports generators and tuples without parentheses.
* Sourcing foreign shells now have the ``--show`` option, which
lets you see when script will be run, and the ``--dryrun``
option which prevents the source from actually taking place.
Xonsh's foreign shell API also added these keyword arguments.
* Subprocess mode now supports subshells. Place any xonsh
code between two parentheses, e.g. ``(cmd)``, to run
this command in a separate xonsh subprocess.
* Foreign shell aliases now have the ability to take extra arguments,
if needed.
* Xonsh will issue a warning message when the current working
directory has been remove out from under it and not replaced
prior to running the next command.
* Line continuation backslashes are respected on Windows in the PTK shell if
the backspace is is preceded by a space.
* Added ``ponysay`` as a command which will usually not run in a
threaded mode in the commands cache.
* New ``jsonutils`` module available for serializing special
xonsh objects to JSON.
**Changed:**
* The literal tokens ``and`` and ``or`` must be surrounded by
whitespace to delimit subprocess mode. If they do not have
whitespace on both sides in subproc mode, they are considered
to be part of a command argument.
* The ``xontrib`` command is now flagged as unthreadable and will be
run on the main Python thread. This allows xontribs to set signal
handlers and other operations that require the main thread.
* nvim (Neovim) has been flagged as unthreadable
* The interactive prompt will now catch ``SystemExit`` and, instead
of exiting the session, will refresh the prompt. This is the same
process as for keyboard interrupts.
* Xonsh no longer launches the wizard for new users. Instead a welcome screen is
shown which says how to launch the wizard.
* Added Windows ``expanduser()``-like function which prevents
the expansion of ``~`` that are not followed by a path
separator.
* Collecting xonsh history files was reported to have random runtime
OSError failures. This exception is now handled, just in case. The
The exception will still be printed in debug mode.
* ``Shell.stype`` has been renamed to ``Shell.shell_type``.
* The configuration wizard now displays the proper control sequence to leave
the wizard at the to start of the wizard itself. Note that this is Ctrl+D for
readline and Ctrl+C for prompt-toolkit.
* Callable alias proxy functions are now more friendly to
``functools.partial()``.
* ``prompt.vc.get_hg_branch`` now uses ``os.scandir`` to walk up the filetree
looking for a ``.hg`` directory. This results in (generally) faster branch
resolution compared to the subprocess call to ``hg root``.
* Xonsh's script and code caches will are now invalidated whenever the
xonsh version changes for a given Python version.
* Autowrapping of subprocess globs has been improved to cover
more cases that are ambiguous with Python syntax.
* Job control info when foregrounding or backgrounding jobs will now
only be displayed when xonsh is in interactive mode.
* Enabled virtual terminal processing in the prompt-toolkit shell for Windows.
**Fixed:**
* 3rd party pygments styles (like solorized or monokailight) are now
able to be used in xonsh. These styles are dynamically created upon
first use, rather than being lazily loaded by xonsh.
* On Windows, ``os.environ`` is case insensitive. This would potentially
change the case of environment variables set into the environment.
Xonsh now uses ``nt.environ``, the case sensitive counterpart, to avoid
these issues on Windows.
* Fix how ``$PWD`` is managed in order to work with symlinks gracefully
* ``history replay`` no longer barfs on ``style_name`` when setting up the
environment
* ``Shell.shell_type`` is now properly set to the same value as ``$SHELL_TYPE``.
* Fixed ``source-zsh`` to work with zsh v5.2.
* Fixed issue where ``del (x, y)`` would raise a syntax error.
* Certain vim commands issue commands involving subshells,
and this is now supported.
* Null bytes handed to Popen are now automatically escaped prior
to running a subprocess. This prevents Popen from issuing
embedded null byte exceptions.
* Xonsh will no longer crash is the current working directory is
removed out from under it.
* Multiline strings can now be written in subprocess mode.
* PTK completions will now correctly deduplicate autosuggest completions
and display completions values based on the cursor position.
* Fixed bug where trailing backspaces on Windows paths could be interpreted
as line continuations characters. Now line continuation characters must be
preceded by a space on Windows. This only applies to xonsh in interactive
mode to ensure scripts are portable.
* Importing ``*.xsh`` files will now respect the encoding listed in
that file and properly fallback to UTF-8. This behaviour follows
the rules described in PEP 263.
* Wizard is now able to properly serialize environment paths.
v0.5.6
====================
**Added:**
* New core utility function aliases (written in pure Python) are now
available in ``xonsh.xoreutils``. These include: ``cat``, ``echo``,
``pwd``, ``tee``, ``tty``, and ``yes``. These are not enabled by default.
Use the new ``coreutils`` xontrib to load them.
* CircleCI test post codecov run
* The ``trace`` will automatically disable color printing when
stdout is not a TTY or stdout is captured.
* New ``jedi`` xontrib enables jedi-based tab completions when it is loaded.
This supersedes xonsh's default Python-mode completer.
* The lexer has a new ``split()`` method which splits strings
according to xonsh's rules for whitespace and quotes.
* New events for hooking into the Python import process are now available.
You can now provide a handler for:
- ``on_import_pre_find_spec``
- ``on_import_post_find_spec``
- ``on_import_pre_create_module``
- ``on_import_post_create_module``
- ``on_import_pre_exec_module``
- ``on_import_post_exec_module``
**Changed:**
* The prompt toolkit shell's first completion will now be the
current token from the auto-suggestion, if available.
* Sourcing foreign shells will now safely skip applying aliases
with the same name as existing xonsh aliases by default.
This prevents accidentally overwriting important xonsh standard
aliases, such as ``cd``.
**Fixed:**
* Threadable prediction for subprocesses will now consult both the command
as it was typed in and any resolved aliases.
* The first prompt will no longer print in the middle of the line if the user has
already started typing.
* Windows consoles will now automatically enable virtual terminal processing
with the readline shell, if available. This allows the full use of ANSI
escape sequences.
* On the Windows readline shell, the tab-completion suppression prompt will no
longer error out depending on what you press.
* Fixed issue with subprocess mode wrapping not respecting line continuation
backslashes.
* Handle a bug where Bash On Windows causes platform.windows_bash_command()
to raise CalledProcessError.
* Fixed issues pertaining to completing from raw string paths.
This is particularly relevant to Windows, where raw strings
are inserted in path completion.
* Replace deprecated calls to ``time.clock()`` by calls to
``time.perf_counter()``.
* Use ``clock()`` to set the start time of ``_timings`` in non-windows instead
of manually setting it to ``0.0``.
* The ``trace`` utility will now correctly color output and not
print extraneous newlines when called in a script.
* The ``@$(cmd)`` operator now correctly splits strings according to
xonsh semantics, rather than just on whitespace using ``str.split()``.
* The ``mpl`` xontrib has been updated to improve matplotlib
handling. If ``xontrib load mpl`` is run before matplotlib
is imported and xonsh is in interactive mode, matplotlib
will automatically enter interactive mode as well. Additionally,
``pyplot.show()`` is patched in interactive mode to be non-blocking.
If a non-blocking show fails to draw the figure for some reason,
a regular blocking version is called.
* Fixed issues like ``timeit ls`` causing OSError - "Inappropriate ioctl
for device".
* Fixed a potential "OSError: [Errno 22] Invalid argument" to increase job
control stability.
v0.5.5
====================
**Added:**
* New ``--rc`` command line option allows users to specify paths to run control
files from the command line. This includes both xonsh-based and JSON-based
configuration.
* New ``$UPDATE_COMPLETIONS_ON_KEYPRESS`` controls whether or not completions
will automatically display and update while typing. This feature is only
available in the prompt-toolkit shell.
**Changed:**
* Xonsh scripts now report ``__file__`` and ``__name__`` when run as scripts
or sourced. These variables have the same meaning as they do in Python
scripts.
* ``$XONSHRC`` and related configuration variables now accept JSON-based
static configuration file names as elements. This unifies the two methods
of run control to a single entry point and loading system.
* The ``xonsh.shell.Shell()`` class now requires that an Execer instance
be explicitly provided to its init method. This class is no longer
responsible for creating an execer an its dependencies.
* Moved decorators ``unthreadable``, ``uncapturable`` from
``xonsh.proc`` to ``xonsh.tools``.
* Some refactorings on jobs control.
**Deprecated:**
* The ``--config-path`` command line option is now deprecated in favor of
``--rc``.
**Removed:**
* ``xonsh.environ.DEFAULT_XONSHRC`` has been removed due to deprecation.
For this value, please check the environment instead, or call
``xonsh.environ.default_xonshrc(env)``.
**Fixed:**
* Command pipelines that end in a callable alias are now interruptable with
``^C`` and the processes that are piped into the alias have their file handles
closed. This should ensure that the entire pipeline is closed.
* Fixed issue where unthreadable subprocs were not allowed to be
captured with the ``$(cmd)`` operator.
* The ``ProcProxy`` class (unthreadable aliases) was not being executed and would
hang if the alias was capturable. This has been fixed.
* Fixed a ``tcsetattr: Interrupted system call`` issue when run xonsh scripts.
* Fixed issue with ``ValueError`` being thrown from ``inspect.signature()``
when called on C-extension callables in tab completer.
* Fixed issue that ``ls | less`` crashes on Mac.
* Threadable prediction was incorrectly based on the user input command, rather than
the version where aliases have been resolved. This has been corrected.
v0.5.4
====================
**Added:**
* Add alias ``xip`` ("kip") so that xonsh's Python environment (whatever that is) can be modified.
* HistoryEntry, a SimpleNamespace object that represents a command in history.
* ``xonsh.completers.bash_completion`` module
* Added option to report timing information of xonsh startup times. Start xonsh
with the ``--timings`` flag to use the feature.
* The Python tab completer will now complete the argument names of functions
and other callables.
* Uptime module added to ``xonsh.xoreutils``. This can report the system
boot time and up time.
* The environment variable ``XONSH_HISTORY_BACKEND`` now also supports a
value of class type or a History Backend instance.
* ``on_envvar_new`` event that fires after a new envvar is created.
* ``on_envvar_change`` event that fires after an envvar is changed.
**Changed:**
* history indexing api to be more simple, now returns HistoryEntry.
* Decoupled ``bash_completion`` from xonsh project and added shim back to
xonsh.
* The JSON history backend will now unlock history files that were created
prior to the last reboot.
**Fixed:**
* Fixed broken bash completions on Windows if 'Windows Subsystem for Linux' is installed.
* Readline history would try to read the first element of history prior to
actually loading any history. This caused an exception to be raised on
Windows at xonsh startup when using pyreadline.
* Fixed issue with readline tab completer overwriting initial prefix in
some instances.
* Fixed issue wherein if ``git`` or (presumably) ``hg`` are aliased, then branch
information no longer appears in the ``$PROMPT``
* Fixed an issue with commands that background themselves (such as
``gpg-connect-agent``) not being able to be run from within xonshrc.
v0.5.3
====================
**Added:**
* Tab completion xontrib for python applications based on click framework.
* Added ``on_transform_command`` event for pre-processing that macros can't handle.
* Autodetection of backgroundability by binary analysis on POSIX.
* New argument ``expand_user=True`` to ``tools.expand_path``.
* New ``$COMPLETION_QUERY_LIMIT`` environment variable for setting the
number of completions above which the user will be asked if they wish to
see the potential completions.
* Users may now redirect stdout to stderr in subprocess mode.
**Changed:**
* The ``Block`` and ``Functor`` context managers from ``xonsh.contexts`` have been
rewritten to use xonsh's macro capabilities. You must now enter these via the
``with!`` statement, e.g. ``with! Block(): pass``.
* The ``distributed`` xontrib now needs to use the ``with!`` statement, since it
relies on ``Functor``.
* ``telnet`` has been flagged as unthreadable.
* When ``$DYNAMIC_CWD_ELISION_CHAR`` is non empty and the last dir of cwd is too
long and shortened, the elision char is added at the end.
* ``pygments`` is no longer a strict dependency of the ``prompt_toolkit``
backend. If ``pygments`` is not installed, the PTK backend will use the
default ansi color settings from the terminal. Syntax highlighting requires
that ``pygments`` is installed.
* Events are now keyword arguments only
* Restored ``on_precommand`` to its original signature.
* Move ``built_ins.expand_path`` to ``tools.expand_path``.
* Rename ``tools.expandpath`` to ``tools._expandpath``.
* Added ``gvim`` command to unthreadable predictors.
* The ``source`` alias now passes ``$ARGS`` down to file it is sourcing.
**Removed:**
* ``XonshBlockError`` has been removed, since it no longer serves a purpose.
**Fixed:**
* ``PopenThread`` will now re-issue SIGINT to the main thread when it is
received.
* Fixed an issue that using sqlite history backend does not kill unfinished
jobs when quitting xonsh with a second "exit".
* Fixed an issue that xonsh would fail over to external shells when
running .xsh script which raises exceptions.
* Fixed an issue with ``openpty()`` returning non-unix line endings in its buffer.
This was causing git and ssh to fail when xonsh was used as the login shell on the
server. See https://mail.python.org/pipermail/python-list/2013-June/650460.html for
more details.
* Restored the ability to ^Z and ``fg`` processes on posix platforms.
* CommandPipelines were not guaranteed to have been ended when the return code
was requested. This has been fixed.
* Introduce path expansion in ``is_writable_file`` to fix
``$XONSH_TRACEBACK_LOGFILE=~/xonsh.log``.
* Backgrounding a running process (^Z) now restores ECHO mode to the terminal
in cases where the subprocess doesn't properly restore itself. A major instance
of this behaviour is Python's interactive interpreter.
* Readline backend would not ask the user to confirm the printing of completion
options if they numbered above a certain value. Instead they would be dumped to
the screen. This has been fixed.
* Jupyter kernel was no longer properly running subprocess commands.
This has been fixed.
* The filename is applied to the target of the ``source`` alias, providing better
tracebacks.
v0.5.2
====================
**Added:**
* Added ``weechat`` to default predictors
* ``$DYNAMIC_CWD_ELISION_CHAR`` environment variable to control how a shortened
path is displayed.
**Changed:**
* ``_ret_code`` function of ``prompt_ret_code`` xontrib return now ``None`` when
return code is 0 instead of empty string allowing more customization of prompt
format.
**Fixed:**
* Minor Python completer token counting bug fix.
* multiline syntax error in PTK shell due to buffer not being reset
* Segfaults and other early exit signals are now reported correctly,
again.
* ``tests/bin/{cat,pwd,wc}`` shebang changed to python3
v0.5.1
====================
**Fixed:**
* Fixed xonfig raising error when xonsh is not installed from source.
v0.5.0
====================
**Added:**
* $XONTRIB_MPL_MINIMAL environment variable can be set to change if plots are minimalist or as-seen
* xontrib-mpl now supports iTerm2 inline image display if iterm2_tools python package is installed
* Xonsh now will fallback to other shells if encountered errors when
starting up.
* Added entry to customization faq re: ``dirs`` alias (#1452)
* Added entry to customization faq re: tab completion selection (#1725)
* Added entry to customization faq re: libgcc core dump (#1160)
* Section about quoting in the tutorial.
* The ``$VC_HG_SHOW_BRANCH`` environment variable to control whether to hide the hg branch in the prompt.
* xonfig now contains the latest git commit date if xonsh installed
from source.
* Alt+Enter will execute a multiline code block irrespective of cursor position
* Windows now has the ability to read output asynchronously from
the console.
* Use `doctr <https://drdoctr.github.io/doctr/>`_ to deploy dev docs to github pages
* New ``xonsh.proc.uncapturable()`` decorator for declaring that function
aliases should not be run in a captured subprocess.
* New history backend sqlite.
* Prompt user to install xontrib package if they try to load an uninstalled
xontrib
* Callable aliases may now take a final ``spec`` argument, which is the
corresponding ``SubprocSpec`` instance.
* New ``bashisms`` xontrib provides additional Bash-like syntax, such as ``!!``.
This xontrib only affects the command line, and not xonsh scripts.
* Tests that create testing repos (git, hg)
* New subprocess specification class ``SubprocSpec`` is used for specifying
and manipulating subprocess classes prior to execution.
* New ``PopenThread`` class runs subprocesses on a a separate thread.
* New ``CommandPipeline`` and ``HiddenCommandPipeline`` classes manage the
execution of a pipeline of commands via the execution of the last command
in the pipeline. Instances may be iterated and stream lines from the
stdout buffer. These pipelines read from the stdout & stderr streams in a
non-blocking manner.
* ``$XONSH_STORE_STDOUT`` is now available on all platforms!
* The ``CommandsCache`` now has the ability to predict whether or not a
command must be run in the foreground using ``Popen`` or may use a
background thread and can use ``PopenThread``.
* Callable aliases may now use the full gamut of functions signatures:
``f()``, ``f(args)``, ``f(args, stdin=None)``,
``f(args, stdin=None, stdout=None)``, and `
``f(args, stdin=None, stdout=None, stderr=None)``.
* Uncaptured subprocesses now receive a PTY file handle for stdout and
stderr.
* New ``$XONSH_PROC_FREQUENCY`` environment variable that specifies how long
loops in the subprocess framework should sleep. This may be adjusted from
its default value to improved performance and mitigate "leaky" pipes on
slower machines.
* ``Shift+Tab`` moves backwards in completion dropdown in prompt_toolkit
* PromptFormatter class that holds all the related prompt methods
* PromptFormatter caching when building the prompt
* p-strings: ``p'/foo/bar'`` is short for ``pathlib.Path('/foo/bar')``
* byte strings: prefixes other than ``b'foo'`` (eg, ``RB'foo'``) now work
* Backticks for regex or glob searches now support an additional modifier
``p``, which causes them to return Path objects instead of strings.
* New ``BOTTOM_TOOLBAR`` environment variable to control a bottom toolbar as specified in prompt-toolkit
* New ``$XONSH_STDERR_PREFIX`` and ``$XONSH_STDERR_POSTFIX`` environment
variables allow the user to print a prompt-like string before and after
all stderr that is seen. For example, say that you would like stderr
to appear on a red background, you might set
``$XONSH_STDERR_PREFIX = "{BACKGROUND_RED}"`` and
``$XONSH_STDERR_PREFIX = "{NO_COLOR}"``.
* New ``xonsh.pyghooks.XonshTerminal256Formatter`` class patches
the pygments formatter to understand xonsh color token semantics.
* Load events are now available
* New events added: ``on_post_init``, ``on_pre_cmdloop``, ``on_pre_rc``, ``on_post_rc``, ``on_ptk_create``
* Completion for ``xonsh`` builtin functions ``xontrib`` and ``xonfig``
* Added a general customization FAQ page to the docs to collect various
tips/tricks/fixes for common issues/requests
* ``test_single_command`` and ``test_redirect_out_to_file`` tests in ``test_integrations``
* Add note that the target of redirection should be separated by a space.
**Changed:**
* CircleCI now handles flake8 checks
* Travis doesn't allow failures on nightly
* ``get_hg_branch`` runs ``hg root`` to find root dir and check if we're in repo
* The default style will now use the color keywords (#ansired, #ansidarkred)
to set colors that follow the terminal color schemes. Currently, this requires
prompt_toolkit master (>1.0.8) and pygments master (2.2) to work correctly.
* ``vox activate`` now accepts relative directories.
* Updated the effectivity of ``$XONSH_DEBUG`` on debug messages.
* Better documentation on how to get nice colors in Windows' default console
* All custom prompt_toolkit key binding filters now declared with the
``@Condition`` decorator
* The style for the prompt toolkit completion menu is now lightgray/darkgray instead of turquoise/teal
* landscape.io linting now ignores ply directory
* ``history`` help messages to reflect subcommand usage
* Quote all paths when completion if any of the paths needs be quoted,
so that bash can automatically complete to the max prefix of the paths.
* Tee'd reads now occur in 1kb chunks, rather than character-by-character.
* The ``which`` alias no longer has a trailing newline if it is captured.
This means that ``$(which cmd)`` will simply be the path to the command.
* The following commands are, by default, predicted to be not threadable
in some circumstances:
* bash
* csh
* clear
* clear.exe
* cls
* cmd
* ex
* fish
* htop
* ksh
* less
* man
* more
* mutt
* nano
* psql
* ranger
* rview
* rvim
* scp
* sh
* ssh
* startx
* sudo
* tcsh
* top
* vi
* view
* vim
* vimpager
* xo
* xonsh
* zsh
* The ``run_subproc()`` function has been replaced with a new implementation.
* Piping between processes now uses OS pipes.
* ``$XONSH_STORE_STDIN`` now uses ``os.pread()`` rather than ``tee`` and a new
file.
* The implementation of the ``foreground()`` decorator has been moved to
``unthreadable()``.
* ``voxapi.Vox`` now supports ``pathlib.Path`` and ``PathLike`` objects as virtual environment identifiers
* Renamed FORMATTER_DICT to PROMPT_FIELDS
* BaseShell instantiates PromptFormatter
* readline/ptk shells use PromptFormatter
* Updated the bundled version of ``ply`` to current master available
* vended ``ply`` is now a git subtree to help with any future updates
* ``WHITE`` color keyword now means lightgray and ``INTENSE_WHITE`` completely white
* Removed ``add_to_shell`` doc section from ``*nix`` install pages and instead
relocated it to the general customization page
* Moved a few ``*nix`` customization tips from the linux install page to the general
customization page
**Removed:**
* coverage checks
* ``CompletedCommand`` and ``HiddenCompletedCommand`` classes have been removed
in favor of ``CommandPipeline`` and ``HiddenCommandPipeline``.
* ``SimpleProcProxy`` and ``SimpleForegroundProcProxy`` have been removed
in favor of a more general mechanism for dispatching callable aliases
implemented in the ``ProcProxyThread`` and ``ProcProxy`` classes.
* ``test_run_subproc.py`` in favor of ``test_integrations.py``
* Unused imports in many tests
* Many duplicated tests (copypasta)
**Fixed:**
* xontrib-mpl now preserves the figure and does not permanently alter it for viewing
* Fix up small pep8 violations
* Fixed a bug where some files are not showing using bash completer
* Fixed some issues with subprocess capturing aliases that it probably
shouldn't.
* ``safe_readable()`` now checks for ``ValueError`` as well.
* The scroll bars in the PTK completions menus are back.
* Jupyter kernel installation now respects the setuptools ``root`` parameter.
* Fix ``__repr__`` and ``__str__`` methods of ``SubprocSpec`` so they report
correctly
* Fixed the message printed when which is unable to find the command.
* Fixed a handful of sphinx errors and warnings in the docs
* Fixed many PEP8 violations that had gone unnoticed
* Fix failure to detect an Anaconda python distribution if the python was install from the conda-forge channel.
* current_branch will try and locate the vc binary once
* May now Crtl-C out of an infinite loop with a subprocess, such as
```while True: sleep 1``.
* Fix for stdin redirects.
* Backgrounding works with ``$XONSH_STORE_STDOUT``
* ``PopenThread`` blocks its thread from finishing until command has completed
or process is suspended.
* Added a minimum time buffer time for command pipelines to check for
if previous commands have executed successfully. This is helpful
for pipelines where the last command takes a long time to start up,
such as GNU Parallel. This also checks to make sure that output has occurred.
This includes piping 2+ commands together and pipelines that end in
unthreadable commands.
* ``curr_branch`` reports correctly when ``git config status.short true`` is used
* ``pip`` completion now filters results by prefix
* Fixed streaming ``!(alias)`` repr evaluation where bytes where not
streamed.
* Aliases that begin with a comma now complete correctly (no spurious comma)
* Use ``python3`` in shebang lines for compatibility with distros that still use Python 2 as the default Python
* STDOUT is only stored when ``$XONSH_STORE_STDOUT=True``
* Fixed issue with alias redirections to files throwing an OSError because
the function ProcProxies were not being waited upon.
* Fixed issue with callable aliases that happen to call sys.exit() or
raise SystemExit taking out the whole xonsh process.
* Safely flushes file handles on threaded buffers.
* Proper default value and documentation for ``$BASH_COMPLETIONS``
* Fixed readline completer issues on paths with spaces
* Fix bug in ``argvquote()`` functions used when sourcing batch files on Windows. The bug meant an extra backslash was added to UNC paths.
Thanks to @bytesemantics for spotting it, and @janschulz for fixing the issue.
* pep8, lint and refactor in pytest style of ``test_ptk_multiline.py``, ``test_replay.py``
* Tab completion of aliases returned a upper cased alias on Windows.
* History show all action now also include current session items.
* ``proc.stream_stderr`` now handles stderr that doesn't have buffer attribute
* Made ``history show`` result sorted.
* Fixed issue that ``history gc`` does not delete empty history files.
* Standard stream tees have been fixed to accept the possibility that
they may not be backed by a binary buffer. This includes the pipeline
stdout tee as well as the shell tees.
* Fixed a bug when the pygments plugin was used by third party editors etc.
* CPU usage of ``PopenThread`` and ``CommandPipeline`` has been brought
down significantly.
v0.4.7
====================
**Added:**
* Define alias for 'echo' on startup for Windows only.
* New coredev `astronouth7303 <https://github.com/astronouth7303>`_ added
* ``which -a`` now searches in ``__xonsh_ctx__`` too
* Info about the xontrib cookiecutter template on xontrib tutorial
* xonsh's optional dependencies may now be installed with the pip extras ``ptk``, ``proctitle``, ``linux``, ``mac``, and ``win``.
* Env ``help`` method to format and print the vardocs for an envvar
* test_news fails if no empty line before a category
* more info on test_news failures
* Added ``on_precommand`` and ``on_postcommand`` `events </events.html>`_
* New ``FORMATTER_DICT`` entry ``gitstatus`` to provides informative git status
* FOREIGN_ALIASES_OVERRIDE envvar to control whether foreign aliases should
override xonsh aliases with the same name.
* Warning on tutorial about foreign aliases being ignored if a xonsh alias
exist with the same name if not FOREIGN_ALIASES_OVERRIDE.
* The prompt-toolkit shell now auto-inserts matching parentheses, brackets, and quotes. Enabled via the ``XONSH_AUTOPAIR`` environment variable
* Better syntax highlights in prompt-toolkit, including valid command / path highlighting, macro syntax highlighting, and more
* More info on tutorial about history interaction
* Entry on bash_to_xsh
* Macro context managers are now available via the ``with!``
syntax.
**Changed:**
* Devguide reflects the current process of releasing through ``release.xsh``
* moved ``which`` from ``xonsh.aliases`` into ``xoreutils.which``
* ``xonsh.prompt.gitstatus.gitstatus`` now returns a namedtuple
* implementation of ``xonsh.prompt.vc_branch.get_git_branch`` and
``xonsh.prompt.vc_branch.git_dirty_working_directory`` to use 'git status --procelain'
* moved prompt formatting specific functions from ``xonsh.environ``
to ``xonsh.prompt.base``
* All prompt formatter functions moved to ``xonsh.prompt`` subpackage
* Printing the message about foreign aliases being ignored happens only
if XONSH_DEBUG is set.
* Use ``SetConsoleTitleW()`` on Windows instead of a process call.
* Tutorial to reflect the current history command argument functionality
* Macro function arguments now default to ``str``, rather than ``eval``,
for consistency with other parts of the macro system.
**Removed:**
* aliases that use '!' in their name cause they clash with the macro syntax
**Fixed:**
* Fix regression where bash git completions where not loaded
automatically when GitForWindows is installed.
* More tokens are now supported in subproc args, such as ``==``.
* Python completions now work without space delimiters, e.g. ``a=matpl<TAB>``
will complete to ``a=matplotlib``
* Parser would fail on nested, captured suprocess macros. Now, it works,
hooray!?
* now fires chdir event if OS change in working directory is detected.
* ``xonsh.prompt.vc_branch.git_dirty_working_directory``
uses ``porcelain`` option instead of using the bytestring
``nothing to commit`` to find out if a git directory is dirty
* Fix bug where know commands where not highlighted on windows.
* Fixed completer showing executable in upper case on windows.
* Fixed issue where tilde expansion was occurring more than once before an
equals sign.
* test_dirstack test_cdpath_expansion leaving stray testing dirs
* Better completer display for long completions in prompt-toolkit
* Automatically append newline to target of ``source`` alias, so that it may
be exec'd.
* test_news fails when single graves around word
* Slashes in virtual environment names work in vox
* non string type value in $FORMATTER_DICT turning prompt ugly
* whole prompt turning useless when one formatting function raises an exception
* Fix completion after alias expansion
* Fix hard crash when foreign shell functions fails to run. #1715
* Bug where non-default locations for ``XDG_DATA_HOME`` and ``XONSH_DATA_DIR``
would not expand ``~`` into the home directory
* Auto quote path completions if path contains 'and' or 'or'
* Completion now works on subcommands after pipe, ``&&``, ``||`` and so on.
* cd . and cd <singleCharacter> now work. Fix indexerror in AUTO_PUSHD case, too.
* Fixed issue with accidentally wrapping generators inside of function calls.
* History indexing with string returns most recent command.
v0.4.6
====================
**Added:**
* New option ``COMPLETIONS_CONFIRM``. When set, ``<Enter>`` is used to confirm
completion instead of running command while completion menu is displayed.
* NetBSD is now supported.
* Macro function calls are now available. These use a Rust-like
``f!(arg)`` syntax.
* Macro subprocess call now available with the ``echo! x y z``
syntax.
* A new `event subsystem <http://xon.sh/tutorial_events.html>`_ has been added.
* howto install sections for Debian/Ubuntu and Fedora.
* ``History`` methods ``__iter__`` and ``__getitem__``
* ``tools.get_portions`` that yields parts of an iterable
* Added a py.test plugin to collect ``test_*.xsh`` files and run ``test_*()`` functions.
* ``__repr__`` and ``__str__`` magic method on LazyObject
**Changed:**
* ``create_module`` implementation on XonshImportHook
* Results of the ``bash`` tab completer are now properly escaped (quoted) when necessary.
* Foreign aliases that match xonsh builtin aliases are now ignored with a warning.
* ``prompt_toolkit`` completions now only show the rightmost portion
of a given completion in the dropdown
* The value of ``'none'`` is no longer allowed for ``$SHELL_TYPE`` just during the initial
load from the environment. ``-D``, later times, and other sources still work.
* ``yacc_debug=True`` now load the parser on the same thread that the
Parser instance is created. ``setup.py`` now uses this synchronous
form as it was causing the parser table to be missed by some package
managers.
* Tilde expansion for the home directory now has the same semantics as Bash.
Previously it only matched leading tildes.
* Context sensitive AST transformation now checks that all names in an
expression are in scope. If they are, then Python mode is retained. However,
if even one is missing, subprocess wrapping is attempted. Previously, only the
left-most name was examined for being within scope.
* ``dirstack.pushd`` and ``dirstack.popd`` now handle UNC paths (of form ``\\<server>\<share>\...``), but only on Windows.
They emulate behavior of `CMD.EXE` by creating a temporary mapped drive letter (starting from z: down) to replace
the ``\\<server>\<share>`` portion of the path, on the ``pushd`` and unmapping the drive letter when all references
to it are popped.
* And ``dirstack`` suppresses this temporary drive mapping funky jive if registry entry
``HKCU\software\microsoft\command processor\DisableUNCCheck`` (or HKLM\...) is a DWORD value 1. This allows Xonsh
to show the actual UNC path in your prompt string and *also* allows subprocess commands invoking `CMD.EXE` to run in
the expected working directory. See https://support.microsoft.com/en-us/kb/156276 to satisfy any lingering curiosity.
* ``lazy_locate_binary`` handles binary on different drive letter than current working directory (on Windows).
* ``_curr_session_parser`` now iterates over ``History``
* New implementation of bash completer with better performance and compatibility.
* ``$COMPLETIONS_BRACKETS`` is now available to determine whether or not to
include opening brackets in Python completions
* ``xonsh.bat`` tries to use `pylauncher <https://www.python.org/dev/peps/pep-0397/>`_ when available.
**Removed:**
* ``History`` method ``show``
* ``_hist_get_portion`` in favor of ``tools.get_portions``
* Unused imports in proc, flake8.
**Fixed:**
* xonsh modules imported now have the __file__ attribute
* Context sensitive AST transformer was not adding argument names to the
local scope. This would then enable extraneous subprocess mode wrapping
for expressions whose leftmost name was function argument. This has been
fixed by properly adding the argument names to the scope.
* Foreign shell functions that are mapped to empty filenames no longer
receive aliases since they can't be found to source later.
* Correctly preserve arguments given to xon.sh, in case there are quoted ones.
* Environment variables in subprocess mode were not being expanded
unless they were in a sting. They are now expanded properly.
* Fixed a bug that prevented xonsh from running scripts with code caching disabled.
* Text of instructions to download missing program now does not get off and
appears in whole.
* Fix some test problems when win_unicode_console was installed on windows.
* Fixed bug that prompt string and ``$PWD`` failed to track change in actual working directory if the
invoked Python function happened to change it (e.g via ```os.chdir()```. Fix is to update ``$PWD``
after each command in ```BaseShell.default()```.
* The interactive prompt now correctly handles multiline strings.
* ``cd \\<server>\<share>`` now works when $AUTO_PUSHD is set, either creating a temporary mapped drive or simply
setting UNC working directory based on registry ``DisableUNCCheck``. However, if $AUTO_PUSHD is not set and UNC
checking is enabled (default for Windows), it issues an error message and fails. This improves on prior behavior,
which would fail to change the current working directory, but would set $PWD and prompt string to the UNC path,
creating false expectations.
* fix parsing for tuple of tuples (like `(),()`)
* ``sys.stdin``, ``sys.stdout``, ``sys.stderr`` no longer complete with
opening square brackets
* xonsh now properly handles syntax error messages arising from using values in inappropriate contexts (e.g., ``del 7``).
Changelog:
This is a terse description of the new features added to bash-5.0 since
the release of bash-4.4. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
1. New Features in Bash
a. The `wait' builtin can now wait for the last process substitution created.
b. There is an EPOCHSECONDS variable, which expands to the time in seconds
since the Unix epoch.
c. There is an EPOCHREALTIME variable, which expands to the time in seconds
since the Unix epoch with microsecond granularity.
d. New loadable builtins: rm, stat, fdflags.
e. BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment.
f. When supplied a numeric argument, the shell-expand-line bindable readline
command does not perform quote removal and suppresses command and process
substitution.
g. `history -d' understands negative arguments: negative arguments offset from
the end of the history list.
h. The `name' argument to the `coproc' reserved word now undergoes word
expansion, so unique coprocs can be created in loops.
i. A nameref name resolution loop in a function now resolves to a variable by
that name in the global scope.
j. The `wait' builtin now has a `-f' option, which signfies to wait until the
specified job or process terminates, instead of waiting until it changes
state.
k. There is a define in config-top.h that allows the shell to use a static
value for $PATH, overriding whatever is in the environment at startup, for
use by the restricted shell.
l. Process substitution does not inherit the `v' option, like command
substitution.
m. If a non-interactive shell with job control enabled detects that a foreground
job died due to SIGINT, it acts as if it received the SIGINT.
n. The SIGCHLD trap is run once for each exiting child process even if job
control is not enabled when the shell is in Posix mode.
o. A new shopt option: localvar_inherit; if set, a local variable inherits the
value of a variable with the same name at the nearest preceding scope.
p. `bind -r' now checks whether a key sequence is bound before binding it to
NULL, to avoid creating keymaps for a multi-key sequence.
q. A numeric argument to the line editing `operate-and-get-next' command
specifies which history entry to use.
r. The positional parameters are now assigned before running the shell startup
files, so startup files can use $@.
s. There is a compile-time option that forces the shell to disable the check
for an inherited OLDPWD being a directory.
t. The `history' builtin can now delete ranges of history entries using
`-d start-end'.
u. The `vi-edit-and-execute-command' bindable readline command now puts readline
back in vi insertion mode after executing commands from the edited file.
v. The command completion code now matches aliases and shell function names
case-insensitively if the readline completion-ignore-case variable is set.
w. There is a new `assoc_expand_once' shell option that attempts to expand
associative array subscripts only once.
x. The shell only sets up BASH_ARGV and BASH_ARGC at startup if extended
debugging mode is active. The old behavior of unconditionally setting them
is available as part of the shell compatibility options.
y. The `umask' builtin now allows modes and masks greater than octal 777.
z. The `times' builtin now honors the current locale when printing a decimal
point.
aa. There is a new (disabled by default, undocumented) shell option to enable
and disable sending history to syslog at runtime.
bb. Bash no longer allows variable assignments preceding a special builtin that
changes variable attributes to propagate back to the calling environment
unless the compatibility level is 44 or lower.
cc. You can set the default value for $HISTSIZE at build time in config-top.h.
dd. The `complete' builtin now accepts a -I option that applies the completion
to the initial word on the line.
ee. The internal bash malloc now uses mmap (if available) to satisfy requests
greater than 128K bytes, so free can use mfree to return the pages to the
kernel.
ff. The shell doesn't automatically set BASH_ARGC and BASH_ARGV at startup
unless it's in debugging mode, as the documentation has always said, but
will dynamically create them if a script references them at the top level
without having enabled debugging mode.
gg. The localvar_inherit option will not attempt to inherit a value from a
variable of an incompatible type (indexed vs. associative arrays, for
example).
hh. The `globasciiranges' option is now enabled by default; it can be set to
off by default at configuration time.
ii. Associative and indexed arrays now allow subscripts consisting solely of
whitespace.
jj. `checkwinsize' is now enabled by default.
kk. The `localvar_unset' shopt option is now visible and documented.
ll. The `progcomp_alias' shopt option is now visible and documented.
mm. The signal name processing code now understands `SIGRTMIN+n' all the way
up to SIGRTMAX.
nn. There is a new `seq' loadable builtin.
oo. Trap execution now honors the (internal) max invocations of `eval', since
traps are supposed to be executed as if using `eval'.
pp. The $_ variable doesn't change when the shell executes a command that forks.
qq. The `kill' builtin now supports -sSIGNAME and -nSIGNUM, even though
conforming applications aren't supposed to use them.
rr. POSIX mode now enables the `shift_verbose' option.
2. New Features in Readline
a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as
Posix specifies (uses fnmatch(3) if available).
b. There are new `next-screen-line' and `previous-screen-line' bindable
commands, which move the cursor to the same column in the next, or previous,
physical line, respectively.
c. There are default key bindings for control-arrow-key key combinations.
d. A negative argument (-N) to `quoted-insert' means to insert the next N
characters using quoted-insert.
e. New public function: rl_check_signals(), which allows applications to
respond to signals that readline catches while waiting for input using
a custom read function.
f. There is new support for conditionally testing the readline version in an
inputrc file, with a full set of arithmetic comparison operators available.
g. There is a simple variable comparison facility available for use within an
inputrc file. Allowable operators are equality and inequality; string
variables may be compared to a value; boolean variables must be compared to
either `on' or `off'; variable names are separated from the operator by
whitespace.
h. The history expansion library now understands command and process
substitution and extended globbing and allows them to appear anywhere in a
word.
i. The history library has a new variable that allows applications to set the
initial quoting state, so quoting state can be inherited from a previous
line.
j. Readline now allows application-defined keymap names; there is a new public
function, rl_set_keymap_name(), to do that.
k. The "Insert" keypad key, if available, now puts readline into overwrite
mode.
Packaged for wip by Michael Bäuerle.
The Schily Bourne Shell
The Schily Bourne Shell was derived from the Bourne Shell sources from
OpenSolaris.
The Schily Bourne Shell is actively maintained and enhanced on a regular base.
It can be compiled into three variants:
- The non-POSIX SVr4/OpenSolaris variant (obosh)
- The minimal POSIX compliant variant (pbosh)
- The POSIX compliant extended variant (bosh)
This package contains the second variant.
Packaged for wip by Michael Bäuerle.
The Schily Bourne Shell
The Schily Bourne Shell was derived from the Bourne Shell sources from
OpenSolaris.
The Schily Bourne Shell is actively maintained and enhanced on a regular base.
It can be compiled into three variants:
- The non-POSIX SVr4/OpenSolaris variant (obosh)
- The minimal POSIX compliant variant (pbosh)
- The POSIX compliant extended variant (bosh)
This package contains the third variant.
Upstream changes:
Changes from 5.6.1 to 5.6.2
---------------------------
Fix another SIGTTOU case.
Fix SIGWINCH being ignored when zsh is not in the foreground.
The release tarballs are now compressed using xz(1), whereas previously
both xz(1) and gzip(1) versions were available. If this gets in your way,
give us a shout.
Changelog:
Changes from 5.6 to 5.6.1
-------------------------
Fix packaging issue that broke runhelp.
Fix a regression with pipelines getting backgrounded and emitting SIGTTOU.
Upstream changes:
Changes from 5.5.1-test-2 to 5.6
--------------------------------
CVE-2018-0502: Data from the second line of a #! script file might be passed to
execve(). For example, in the following situation -
.
printf '#!foo\nbar' > baz
./baz
.
the shell might take "bar" rather than "foo" for the argv[0] to be passed to
execve(). [ Reported by Anthony Sottile and Buck Evan. ]
CVE-2018-13259: A shebang line longer than 64 characters would be truncated.
For example, in the following situation:
.
( printf '#!'; repeat 64 printf 'x'; printf 'y' ) > foo
./foo
.
the shell might execute x...x (64 repetitions) rather than x...xy (64 x's,
one y). [ Reported by Daniel Shahaf. ]
Changes from 5.5.1 to 5.5.1-test-2
----------------------------------
Non-stop IEEE 754 arithmetic support - Inf and NaN are now returned
from floating point operations where errors were printed before.
Inf and NaN are also recognised in arithmetic expressions.
In shell patterns, [[:blank:]] now honours the locale instead of
matching exclusively on space and tab, like for the other POSIX
character classes or for extended regular expressions.
Nanosecond precision on file times is supported in the module
zsh/stat.
Performing substitutions during post-patch breaks tools such as mkpatches,
making it very difficult to regenerate correct patches after making changes,
and often leading to substituted string replacements being committed.
## v0.4.3
- Avoid bell when accepting suggestions with `autosuggest-accept` (#228)
- Don't fetch suggestions after [up,down]-line-or-beginning-search (#227, #241)
- We are now running CI against new 5.5.1 version
- Fix partial-accept in vi mode (#188)
- Fix suggestion disappearing on fast movement after switching to `vicmd` mode (#290)
- Fix issue rotating through kill ring with `yank-pop` (#301)
- Fix issue creating new pty for async mode when previous pty is not properly cleaned up (#249)
0.5.10.1:
jobs - Do not block when waiting on SIGCHLD
0.5.10:
eval: Variable assignments on functions are no longer persistent
parser: Fix parameter expansion inside inner double quotes
parser: Fix parsing of ${}
man: correct typos, iff -> if
expand: Do not quote backslashes in unquoted parameter expansion
shell: Add subdir-objects to AM_INIT_AUTOMAKE
eval: Restore input files in evalcommand
eval: Reap zombies after built-in commands and functions
redir: Fix typo in noclobber code
expand: Fix glibc glob(3) support
expand: Fix buffer overflow in expandmeta
builtin: Move echo space/nl handling into print_escape_str
builtin: Fix echo performance regression
expand: Fix ghost fields with unquoted $@/$*
parser: Allow newlines within parameter substitution
expand: Fix bugs with words connected to the right of $@
Revert "[BUILTIN] Remove unnecessary restoration of format string in printf"
parser: Fix backquote support in here-document EOF mark
shell: provide .gitignore
parser: Fix single-quoted patterns in here-documents
parser: Add syntax stack for recursive parsing
parser: use pgetc_eatbnl() in more places
builtin: Greater resolution in test -nt / test -ot
Changelog:
Changes from %.5 to 5.5.1
-------------------------
Apart from a fix for a configuration problem finding singal names from
(some) recent versions of glibc, there are only minor changes.
Changes from 5.4.2 to 5.5
-------------------------
The effect of the NO_INTERACTIVE_COMMENTS option extends into $(...) and
`...` command substitutions when used on the command line. Previously,
comments were always recognized within command substitutions unless the
comment character "#" was disabled via reset of $histchars.
An alternative assignment syntax for indicating indices for arrays
and keys for associative arrays:
typeset -a array=([1]=first [2]=second)
typeset -A assoc=([key1]=val1 [key2]=val2)
is allowed for compatibility with other shells. In the case of normal
arrays the new syntax can be mixed with the old.
Make a copy of the basename() result, so as to avoid a fortify
abort due to overlapping memcpy() when the result from basename()
is subsequently passed to basename().
Bump PKGREVISION.
Changelog:
Bug-Description:
With certain values for PS1, especially those that wrap onto three or more
lines, readline will miscalculate the number of invisible characters,
leading to crashes and core dumps.
R56c is a bugfix-only release everyone must upgrade to:
- [komh] Remove redundant OS/2-specific code, clean up others
- [komh, tg] Fix drive-qualified (absolute and relative) DOS-style path support
in realpath functionality, partially other places
- [tg] Don't substitute ${ENV:-~/.mkshrc} result again
- [tg] Improve OS/2 $PATH (et al.) handling, drive-relative paths
- [tg] Add MKSH_ENVDIR compile-time option for Jehanne and Plan 9
- [tg] Limit nesting when parsing malformed code (Debian #878947)
- [tg] Update wcwidth data with bugfixed script (still Unicode 10; resulting
values are identical to glibc git master for extant chars)
- [Dr. Werner Fink] Raise some time limits in the testsuite
- [Shamar] Add support for the Jehanne operating system
- [komh] Set stdin to text mode before executing child processes on OS/2
- [komh] Pass arguments via a resonse file if executing a child fails
- [Dr. Werner Fink] Early locale tracking as a compile-time option
- [tg] Fix regressions introduced with new fast character classes
Unsorted entries in PLIST files have generated a pkglint warning for at
least 12 years. Somewhat more recently, pkglint has learned to sort
PLIST files automatically. Since pkglint 5.4.23, the sorting is only
done in obvious, simple cases. These have been applied by running:
pkglint -Cnone,PLIST -Wnone,plist-sort -r -F
pkgsrc changes: add doxygen dependency for building docs.
this is unusual as doxygen is heavy, but fish is meant to
be beginner-friendly shell, so documentation is important.
remove now unneeded patch, that getcwd is called with a size
argument now.
# fish 2.7.1 (released December 23, 2017)
This release of fish fixes an issue where iTerm 2 on macOS would display a warning about paste bracketing being left on when starting a new fish session (#4521).
If you are upgrading from version 2.6.0 or before, please also review the release notes for 2.7.0 and 2.7b1 (included below).
--
# fish 2.7.0 (released November 23, 2017)
There are no major changes between 2.7b1 and 2.7.0. If you are upgrading from version 2.6.0 or before, please also review the release notes for 2.7b1 (included below).
Xcode builds and macOS packages could not be produced with 2.7b1, but this is fixed in 2.7.0.
--
# fish 2.7b1 (released October 31, 2017)
## Notable improvements
- A new `cdh` (change directory using recent history) command provides a more friendly alternative to prevd/nextd and pushd/popd (#2847).
- A new `argparse` command is available to allow fish script to parse arguments with the same behavior as builtin commands. This also includes the `fish_opt` helper command. (#4190).
- Invalid array indexes are now silently ignored (#826, #4127).
- Improvements to the debugging facility, including a prompt specific to the debugger (`fish_breakpoint_prompt`) and a `status is-breakpoint` subcommand (#1310).
- `string` supports new `lower` and `upper` subcommands, for altering the case of strings (#4080). The case changing is not locale-aware yet.
- `string escape` has a new `--style=xxx` flag where `xxx` can be `script`, `var`, or `url` (#4150), and can be reversed with `string unescape` (#3543).
- History can now be split into sessions with the `fish_history` variable, or not saved to disk at all (#102).
- Read history is now controlled by the `fish_history` variable rather than the `--mode-name` flag (#1504).
- `command` now supports an `--all` flag to report all directories with the command. `which` is no longer a runtime dependency (#2778).
- fish can run commands before starting an interactive session using the new `--init-command`/`-C` options (#4164).
- `set` has a new `--show` option to show lots of information about variables (#4265).
## Other significant changes
- The `COLUMNS` and `LINES` environment variables are now correctly set the first time `fish_prompt` is run (#4141).
- `complete`'s `--no-files` option works as intended (#112).
- `echo -h` now correctly echoes `-h` in line with other shells (#4120).
- The `export` compatibility function now returns zero on success, rather than always returning 1 (#4435).
- Stop converting empty elements in MANPATH to "." (#4158). The behavior being changed was introduced in fish 2.6.0.
- `count -h` and `count --help` now return 1 rather than produce command help output (#4189).
- An attempt to `read` which stops because too much data is available still defines the variables given as parameters (#4180).
- A regression in fish 2.4.0 which prevented `pushd +1` from working has been fixed (#4091).
- A regression in fish 2.6.0 where multiple `read` commands in non-interactive scripts were broken has been fixed (#4206).
- A regression in fish 2.6.0 involving universal variables with side-effects at startup such as `set -U fish_escape_delay_ms 10` has been fixed (#4196).
- Added completions for:
- `as` (#4130)
- `cdh` (#2847)
- `dhcpd` (#4115)
- `ezjail-admin` (#4324)
- Fabric's `fab` (#4153)
- `grub-file` (#4119)
- `grub-install` (#4119)
- `jest` (#4142)
- `kdeconnect-cli`
- `magneto` (#4043, #4108)
- `mdadm` (#4198)
- `passwd` (#4209)
- `pip` and `pipenv` (#4448)
- `s3cmd` (#4332)
- `sbt` (#4347)
- `snap` (#4215)
- Sublime Text 3's `subl` (#4277)
- Lots of improvements to completions.
- Updated Chinese and French translations.
Fish shell-like syntax highlighting for Zsh. This package provides
syntax highlighing for the shell zsh. It enables highlighing of
commands whilst they are typed at a zsh prompt into an interactive
terminal. This helps in reviewing commands before running them,
particularly in catching syntax errors.
zsh-completions aims at gathering/developing new completion scripts
that are not available in Zsh yet. The scripts may be contributed to
the Zsh project when stable enough.
don't mess with the declaration of tparm_solaris_kludge unnecessarily.
uwe thinks the non-variadic tparm is wrong (so might be broken for
solaris curses), but I'm not sure how to correct it.
PR pkg/52649
bump PKGREVISION
pkgsrc changes:
- Use PRINT_PLIST_AWK to aid future upgrades.
- Support the "static" option on Darwin and SunOS.
Upstream changes from 5.3.1 to 5.4:
The 'exec' and 'command' precommand modifiers, and options to them, are
now parsed after parameter expansion. Previously, both the modifier and
any options to it were parsed between alias expansion and parameter
expansion (see zshexpn(1)), so they could neither be quoted nor be the
result of parameter expansion. Examples: 's=command; $s -V ls' and
'\command -V ls' now work as expected.
Functions executed by ZLE widgets no longer have their standard input
closed, but redirected from /dev/null instead. That still guards
against user defined widgets inadvertently reading from the tty device.
There is an option WARN_NESTED_VAR, a companion to the existing
WARN_CREATE_GLOBAL that causes a warning if a function updates a
variable from an enclosing scope without using typeset -g. It can be
turned on for an individual function with "functions -W".
zmodload now has an option -s to be silent on a failure to find a module
but still print other errors.
R56b is a bugfix-only release everyone should upgrade to:
- [tg] Reference the FAQ webpage
- [panpo, Riviera] Fix documentation bug wrt. Esc+Ctrl-L
- [tg, Larry Hynes] Fix '0' movement in vi mode
- [tg] Replace broken libcs' offsetof macro with MirBSD's
R56 is a bugfix release with some experimental fixes:
- [tg, Seb] Do not apply alias name restrictions to hash/tilde tracking
- [tg] Restore '.', ':' and '[' in alias names ('[[' is still forbidden)
- [tg] Fix accidentally defanged $PATHSEP test
- [tg] On ^C (INTR and QUIT edchars), shove edit line into history
- [iSKUNK, tg] Begin porting to z/OS using EBCDIC encoding, incomplete
- [tg] Redo fast character classes code, adding POSIX and other helpers
- [tg] bind parses backslash-escaped '^' (and '\') as escaped
- [tg] Building with -DMKSH_ASSUME_UTF8=0 no longer causes a known failure in
the testsuite
- [tg] New test.sh option -U to pass a UTF-8 locale to use in the tests
- [tg] re_format(7) BSD: [[ $x = *[[:\<:]]foo[[:\>:]]* ]]
- [tg, iSKUNK] Use Config in check.pl only if it exists
- [tg] New matching code for bracket expressions, full POSIX (8bit)
- [komh] Exclude FAT/HPFS/NTFS-unsafe tests on OS/2 (and Cygwin/MSYS)
- [tg] Update to Unicode 10.0.0
- [tg, selk] Make readonly idempotent
- [tg, multiplexd] When truncating the persistent history, do not change the
underlying file, do all operations on the locked one; do not stop using the
history at all if it has been truncated
- [tg, J?rg] Turn off UTF-8 mode upon turning on POSIX mode
- [Martijn Dekker, Geoff Clare, many on the Austin list, tg] In POSIX mode,
make the exec builtin force a $PATH search plus execve
- [tg] Fix GCC 7, Coverity Scan warnings
- [tg, Michal Hlavinka] Track background process PIDs even interactive
- [tg] Always expose mksh's hexdump shell function; speed it up by working on
the input in chunks; use character classes to make it EBCDIC safe
- [tg] Revamp dot.mkshrc default editor selection mechanism
The tcsh package Makefile is included directly by the static-tcsh
and standalone-tcsh Makefiles. Modify some of the variables that
really need to be package-specific to be set with ?= in
tcsh/Makefile and document the package Makefiles that directly
include it.
Set PKGREVISION directly in static-tcsh and standalone-tcsh now
that they can have independent PKGREVISION values.
Bump the PKGREVISION of static-tcsh due to the MAINTAINER now
correctly being listed as agc@ due to this change.
Notable fixes and improvements:
- Jobs running in the background can now be removed from the list
of jobs with the new disown builtin, which behaves like the same
command in other shells.
- Command substitutions now have access to the terminal, like in
other shells. This allows tools like fzf to work properly.
- In cases where the operating system does not report the size of
the terminal, the COLUMNS and LINES environment variables are
used; if they are unset, a default of 80x24 is assumed.
- New French and improved German translations.
- fish no longer depends on the which external command.
For full release notes see:
http://www.fishshell.com/release_notes.html
2002-07-25
Bug: fix globbing of broken symlinks.
2002-07-31
Bug: readline doesn't handle EIO either.
2002-08-15
Bug: variables that are sometimes exported (i.e. $prompt and
$version) need to be made exportable if they are inherited from the
environment.
Portability: don't call sigaction() for SIGKILL or SIGSTOP; don't
hand a garbage signal mask to sigaction() (thanks Jeremy
Fitzhardinge). Also, remove use of SA_INTERRUPT (SUSv3, BSD,
etc. have SA_RESTART with the inverted meaning).
2002-08-20
Bug: don't call ealloc(0) on systems where getgroups() doesn't
return egid (thanks Chris Siebenmann).
2002-11-27
Bug: history dumps core if more colons than substitutions (thanks
Callum Gibson); history fails to avoid itself if it's the only
command; history writes and reads outside allocated memory.
Configuration: upgrade to autoconf-2.56 and automake-1.7.1.
2003-07-17
Testing: remove test for large file support, as it causes
indigestion on file systems that don't support sparse files (thanks
Scott Schwartz).
2003-07-22
Release: rc-1.7.1.
2003-09-24
Tidiness: minor improvements to input.c.
2014-02-26
Bug: fix for CVE-2014-1936 from Jakub Wilk.
2014-06-29
Documentation: update email and web addresses.
2014-08-31
Feature: support quoting for filename completion in GNU readline.
2014-09-01
Bug: quoting of glob characters was broken (thanks Christian
Neukirchen); fix the "sneaky parens" bug properly (thanks Wolfgang
Zekoll).
Feature: allow $"x as a synonym for $^x
Release: rc-1.7.2.
2015-04-03
Packaging: the rc.spec file was very out-of-date.
2015-04-04
Portability: the comment from 1999-08-19 may well have been true at
the time, but the final version of the C99 standard called varargs
copying macro va_copy().
2015-04-07
Portability: look in -ltinfo for tgetent.
Packaging: various autoconf / automake updates and tweaks.
2015-04-14
Bug: in initinput(), the call ugchar(EOF) used the ungetcount member
of the top Input structure without initializing it. Thanks to Jeff
Johnson for finding this, Robert Scheck for reporting it, and Uli
Drepper for implementing MALLOC_PERTURB_, a cheap way to find uses of
uninitialized memory.
2015-04-18
Licensing: tweaked to match exactly the "zlib with acknowledgement"
license which is used by nunit and is already approved by various
distros.
2015-04-20
Release: rc-1.7.3.
2015-05-12
Licensing: due to GPL compatibility concerns, the license is changed
again to the "zlib" license. (N.B. This license change was agreed and
approved by Byron Rakitzis, who is the copyright holder.)
Testing: swap arguments to mktemp to be kinder to NetBSD (thanks Piotr
Meyer).
2015-05-13
Release: rc-1.7.4.
Reviewed by: joerg@
Upstream changes:
Release Notes for fish 2.5.0 (released February 3, 2017)
The Home, End, Insert, Delete, Page Up and Page Down keys work in Vi-style key bindings (#3731).
Platform Changes
Starting with version 2.5, fish requires a more up-to-date version of C++, specifically C++11 (from 2011). This affects some older platforms:
Linux
For users building from source, GCC's g++ 4.8 or later, or LLVM's clang 3.3 or later, are known to work. Older platforms may require a newer compiler installed. Unfortunately, because of the complexity of the toolchain, binary packages are no longer published by the fish-shell developers for the following platforms:
Red Hat Enterprise Linux and CentOS 5 & 6 for 64-bit builds
Ubuntu 12.04 (EoLTS April 2017)
Debian 7 (EoLTS May 2018)
Installing newer version of fish on these systems will require building from source.
OS X SnowLeopard
Starting with version 2.5, fish requires a C++11 standard library on OS X 10.6 ("SnowLeopard"). If this library is not installed, you will see this error: dyld: Library not loaded: /usr/lib/libc++.1.dylib MacPorts is the easiest way to obtain this library. After installing the SnowLeopard MacPorts release from the install page, run: sudo port -v install libcxx Now fish should launch successfully. (Please open an issue if it does not.) This is only necessary on 10.6. OS X 10.7 and later include the required library by default.
Other significant changes
Attempting to exit with running processes in the background produces a warning, then signals them to terminate if a second attempt to exit is made. This brings the behaviour for running background processes into line with stopped processes. (#3497)
random can now have start, stop and step values specified, or the new choice subcommand can be used to pick an argument from a list (#3619).
A new key bindings preset, fish_hybrid_key_bindings, including all the Emacs-style and Vi-style bindings, which behaves like fish_vi_key_bindings in fish 2.3.0 (#3556).
function now returns an error when called with invalid options, rather than defining the function anyway (#3574). This was a regression present in fish 2.3 and 2.4.0.
fish no longer prints a warning when it identifies a running instance of an old version (2.1.0 and earlier). Changes to universal variables may not propagate between these old versions and 2.5b1.
Improved compatiblity with Android (#3585), MSYS/mingw (#2360), Solaris (#3456, #3340)
Like other shells, the test builting now returns an error for numeric operations on invalid integers (#3346, #3581).
complete no longer recognises --authoritative and --unauthoritative options, and they are marked as obsolete.
status accepts subcommands, and should be used like status is-interactive. The old options continue to be supported for the foreseeable future (#3526), although only one subcommand or option can be specified at a time.
Selection mode (used with "begin-selection") no longer selects a character the cursor does not move over (#3684).
List indexes are handled better, and a bit more liberally in some cases (echo $PATH[1 .. 3] is now valid) (#3579).
The fish_mode_prompt function is now simply a stub around fish_default_mode_prompt, which allows the mode prompt to be included more easily in customised prompt functions (#3641).
Notable fixes and improvements
alias, run without options or arguments, lists all defined aliases, and aliases now include a description in the function signature that identifies them.
complete accepts empty strings as descriptions (#3557).
command accepts -q/--quiet in combination with --search (#3591), providing a simple way of checking whether a command exists in scripts.
Abbreviations can now be renamed with abbr --rename OLD_KEY NEW_KEY (#3610).
The command synopses printed by --help options work better with copying and pasting (#2673).
help launches the browser specified by the $fish_help_browser variable if it is set (#3131).
History merging could lose items under certain circumstances and is now fixed (#3496).
The $status variable is now set to 123 when a syntactically invalid command is entered (#3616).
Exiting fish now signals all background processes to terminate, not just stopped jobs (#3497).
A new prompt_hostname function which prints a hostname suitable for use in prompts (#3482).
The __fish_man_page function (bound to Alt-h by default) now tries to recognize subcommands (e.g. git add will now open the "git-add" man page) (#3678).
A new function edit_command_buffer (bound to Alt-e & Alt-v by default) to edit the command buffer in an external editor (#1215, #3627).
set_color now supports italics (--italics), dim (--dim) and reverse (--reverse) modes (#3650).
Filesystems with very slow locking (eg incorrectly-configured NFS) will no longer slow fish down (#685).
Improved completions for apt (#3695), fusermount (#3642), make (#3628), netctl-auto (#3378), nmcli (#3648), pygmentize (#3378), and tar (#3719).
Added completions for:
VBoxHeadless (#3378)
VBoxSDL (#3378)
base64 (#3378)
caffeinate (#3524)
dconf (#3638)
dig (#3495)
dpkg-reconfigure (#3521 & #3522)
feh (#3378)
launchctl (#3682)
lxc (#3554 & #3564),
mddiagnose (#3524)
mdfind (#3524)
mdimport (#3524)
mdls (#3524)
mdutil (#3524)
mkvextract (#3492)
nvram (#3524)
objdump (#3378)
sysbench (#3491)
tmutil (#3524)
Release Notes for fish 2.4.0 (released November 8, 2016)
Significant changes
The clipboard integration has been revamped with explicit bindings. The killring commands no longer copy from, or paste to, the X11 clipboard - use the new copy (C-x) and paste (C-v) bindings instead. The clipboard is now available on OS X as well as systems using X11 (e.g. Linux). (#3061)
history uses subcommands (history delete) rather than options (history --delete) for its actions (#3367). You can no longer specify multiple actions via flags (e.g., history --delete --save something).
New history options have been added, including --max=n to limit the number of history entries, --show-time option to show timestamps (#3175, #3244), and --null to null terminate history entries in the search output.
history search is now case-insensitive by default (which also affects history delete) (#3236).
history delete now correctly handles multiline commands (#31).
Vi-style bindings no longer include all of the default emacs-style bindings; instead, they share some definitions (#3068).
If there is no locale set in the environment, various known system configuration files will be checked for a default. If no locale can be found, en_US-UTF.8 will be used (#277).
A number followed by a caret (e.g. 5^) is no longer treated as a redirection (#1873).
The $version special variable can be overwritten, so that it can be used for other purposes if required.
Notable fixes and improvements
The fish_realpath builtin has been renamed to realpath and made compatible with GNU realpath when run without arguments (#3400). It is used only for systems without a realpath or grealpath utility (#3374).
Improved color handling on terminals/consoles with 8-16 colors, particularly the use of bright named color (#3176, #3260).
fish_indent can now read from files given as arguments, rather than just standard input (#3037).
Fuzzy tab completions behave in a less surprising manner (#3090, #3211).
jobs should only print its header line once (#3127).
Wildcards in redirections are highlighted appropriately (#2789).
Suggestions will be offered more often, like after removing characters (#3069).
history --merge now correctly interleaves items in chronological order (#2312).
Options for fish_indent have been aligned with the other binaries - in particular, -d now means --debug. The --dump option has been renamed to --dump-parse-tree (#3191).
The display of bindings in the Web-based configuration has been greatly improved (#3325), as has the rendering of prompts (#2924).
fish should no longer hang using 100% CPU in the C locale (#3214).
A bug in FreeBSD 11 & 12, Dragonfly BSD & illumos prevented fish from working correctly on these platforms under UTF-8 locales; fish now avoids the buggy behaviour (#3050).
Prompts which show git repository information (via __fish_git_prompt) are faster in large repositories (#3294) and slow filesystems (#3083).
fish 2.3.0 reintroduced a problem where the greeting was printed even when using read; this has been corrected again (#3261).
Vi mode changes the cursor depending on the current mode (#3215).
Command lines with escaped space characters at the end tab-complete correctly (#2447).
Added completions for:
arcanist (#3256)
connmanctl (#3419)
figlet (#3378)
mdbook (#3378)
ninja (#3415)
p4, the Perforce client (#3314)
pygmentize (#3378)
ranger (#3378)
Improved completions for aura (#3297), abbr (#3267), brew (#3309), chown (#3380, #3383),cygport (#3392), git (#3274, #3226, #3225, #3094, #3087, #3035, #3021, #2982, #3230), kill & pkill (#3200), screen (#3271), wget (#3470), and xz (#3378).
Distributors, packagers and developers will notice that the build process produces more succinct output by default; use make V=1 to get verbose output (#3248).
Improved compatibility with minor platforms including musl (#2988), Cygwin (#2993), Android (#3441, #3442), Haiku (#3322) and Solaris.
Automatic cursor changes are now only enabled on the subset of XTerm versions known to support them, resolving a problem where older versions printed garbage to the terminal before and after every prompt (#3499).
Improved the title set in Apple Terminal.app.
Added completions for defaults and improved completions for diskutil (#3478).
Release Notes for fish 2.3.1 (released July 3, 2016)
This is a functionality and bugfix release. This release does not contain all the changes to fish since the last release, but fixes a number of issues directly affecting users at present and includes a small number of new features.
Significant changes
A new fish_key_reader binary for decoding interactive keypresses (#2991).
fish_mode_prompt has been updated to reflect the changes in the way the Vi input mode is set up (#3067), making this more reliable.
fish_config can now properly be launched from the OS X app bundle (#3140).
Notable fixes and improvements
Extra lines were sometimes inserted into the output under Windows (Cygwin and Microsoft Windows Subsystem for Linux) due to TTY timestamps not being updated (#2859).
The string builtin's match mode now handles the combination of -rnv (match, invert and count) correctly (#3098).
Improvements to TTY special character handling (#3064), locale handling (#3124) and terminal environment variable handling (#3060).
Work towards handling the terminal modes for external commands launched from initialisation files (#2980).
Ease the upgrade path from fish 2.2.0 and before by warning users to restart fish if the string builtin is not available (#3057).
type -a now syntax-colorizes function source output.
Added completions for alsamixer, godoc, gofmt, goimports, gorename, lscpu, mkdir, modinfo, netctl-auto, poweroff, termite, udisksctl and xz (#3123).
Improved completions for apt (#3097), aura (#3102),git (#3114), npm (#3158), string and suspend (#3154).
Release Notes for fish 2.3.0 (released May 20, 2016)
Significant Changes
A new string builtin to handle… strings! This builtin will measure, split, search and replace text strings, including using regular expressions. It can also be used to turn lists into plain strings using join. string can be used in place of sed, grep, tr, cut, and awk in many situations. (#2296)
After seeing an escape character wait up to 300ms for an additional character. This is consistent with readline (e.g. bash) and can be configured via the fish_escape_delay_ms variable. This allows using escape as the Meta modifier. (#1356)
Add new directories for vendor functions and configuration snippets (#2498)
A new fish_realpath builtin and associated function to allow the use of realpath even on those platforms that don't ship an appropriate command. (#2932)
Alt-# toggles the current command line between commented and uncommented states, making it easy to save a command in history without executing it.
The fish_vi_mode function is now deprecated in favour of fish_vi_key_bindings
Backward-incompatible changes
Unmatched globs will now cause an error, except when used with for, set or count (#2719, #2394)
and and or will now bind to the closest if or while, allowing compound conditions without begin and end (#1428)
set -ql now searches up to function scope for variables (#2502)
status -f will now behave the same when run as the main script or using source (#2643)
source no longer puts the file name in $argv if no arguments are given (#139)
Other Notable Fixes and Improvements
Fish no longer silences errors in config.fish (#2702)
Move the history file to $XDG_DATA_HOME/fish (or ~/.local/share if it has not been set)
Directory autosuggestions will now descend as far as possible if there is only one child directory (#2531)
Add support for bright colors (#1464)
Allow Ctrl-J (\cj) to be bound separately from Ctrl-M (\cm) (#217)
psub now has a "-s"/"-suffix" option to name the temporary file with that suffix
Enable 24-bit colors on select terminals (#2495)
Support for SVN status in the prompt (#2582)
Mercurial and SVN support have been added to the Classic + Git (now Classic + VCS) prompt (via the new __fish_vcs_prompt function) (#2592)
export now handles variables with a "=" in the value (#2403)
Avoid confusing the terminal line driver with non-printing characters in fish_title(#2453)
New completions for:
alsactl
Archlinux’s asp, makepkg
Atom’s apm (#2390)
entr - the "Event Notify Test Runner" (#2265)
Fedora’s dnf (#2638)
OSX diskutil (#2738)
pkgng (#2395)
pulseaudio’s pacmd and pactl
rmmod (#3007)
rust’s rustc and cargo (#2409)
sysctl (#2214)
systemd’s machinectl (#2158), busctl (#2144), systemd-nspawn, systemd-analyze, localectl, timedatectl
and more
Fish no longer has a function called sgrep, freeing it for user customization (#2245)
A rewrite of the completions for cd, fixing a few bugs (#2299, #2300, #562)
Linux VTs now run in a simplified mode to avoid issues (#2311)
The vi-bindings now inherit from the emacs bindings
Fish will also execute fish_user_key_bindings when in vi-mode
funced will now also check $VISUAL (#2268)
A new suspend function (#2269)
Subcommand completion now works better with split /usr (#2141)
The command-not-found-handler can now be overridden by defining a function called __fish_command_not_found_handler in config.fish (#2331)
A few fixes to the Sorin theme
PWD shortening in the prompt can now be configured via the fish_prompt_pwd_dir_length variable, set to the length per path component (#2473)
fish now ships a skeleton file for /etc/fish/config.fish that only contains some documentation, the included code has been moved to the corresponding file in /usr (#2799)
Release Notes for fish 2.2.0 (released July 12, 2015)
Significant Changes
Abbreviations: the new `abbr` command allows for interactively-expanded abbreviations, allowing quick access to frequently-used commands (#731).
Vi mode: run `fish_vi_mode` to switch fish into the key bindings and prompt familiar to users of the Vi editor (#65).
New inline and interactive pager, which will be familiar to users of zsh (#291).
Underlying architectural changes: the `fishd` universal variable server has been removed as it was a source of many bugs and security problems. Notably, old fish sessions will not be able to communicate universal variable changes with new fish sessions. For best results, restart all running instances of `fish`.
The web-based configuration tool has been redesigned, featuring a prompt theme chooser and other improvements.
New German, Brazilian Portuguese, and Chinese translations.
Backward-incompatible changes
These are kept to a minimum, but either change undocumented features or are too hard to use in their existing forms. These changes may break existing scripts.
`commandline` no longer interprets functions "in reverse", instead behaving as expected (#1567).
The previously-undocumented `CMD_DURATION` variable is now set for all commands and contains the execution time of the last command in milliseconds (#1585). It is no longer exported to other commands (#1896).
`if` / `else` conditional statements now return values consistent with the Single Unix Specification, like other shells (#1443).
A new "top-level" local scope has been added, allowing local variables declared on the commandline to be visible to subsequent commands. (#206)
Other notable fixes and improvements
New documentation design (#1662), which requires a Doxygen version 1.8.7 or newer to build.
Fish now defines a default directory for other packages to provide completions. By default this is `/usr/share/fish/vendor-completions.d`; on systems with `pkgconfig` installed this path is discoverable with `pkg-config --variable completionsdir fish`.
A new parser removes many bugs; all existing syntax should keep working.
New `fish_preexec` and `fish_postexec` events are fired before and after job execution respectively (#1549).
Unmatched wildcards no longer prevent a job from running. Wildcards used interactively will still print an error, but the job will proceed and the wildcard will expand to zero arguments (#1482).
The `.` command is deprecated and the `source` command is preferred (#310).
`bind` supports "bind modes", which allows bindings to be set for a particular named mode, to support the implementation of Vi mode.
A new `export` alias, which behaves like other shells (#1833).
`command` has a new `--search` option to print the name of the disk file that would be executed, like other shells' `command -v` (#1540).
`commandline` has a new `--paging-mode` option to support the new pager.
`complete` has a new `--wraps` option, which allows a command to (recursively) inherit the completions of a wrapped command (#393), and `complete -e` now correctly erases completions (#380).
Completions are now generated from manual pages by default on the first run of fish (#997).
`fish_indent` can now produce colorized (`--ansi`) and HTML (`--html`) output (#1827).
`functions --erase` now prevents autoloaded functions from being reloaded in the current session.
`history` has a new `--merge` option, to incorporate history from other sessions into the current session (#825).
`jobs` returns 1 if there are no active jobs (#1484).
`read` has several new options:
`--array` to break input into an array (#1540)
`--null` to break lines on NUL characters rather than newlines (#1694)
`--nchars` to read a specific number of characters (#1616)
`--right-prompt` to display a right-hand-side prompt during interactive read (#1698).
`type` has a new `-q` option to suppress output (#1540 and, like other shells, `type -a` now prints all matches for a command (#261).
Pressing F1 now shows the manual page for the current command (#1063).
`fish_title` functions have access to the arguments of the currently running argument as `$argv[1]` (#1542).
The OS command-not-found handler is used on Arch Linux (#1925), nixOS (#1852), openSUSE and Fedora (#1280).
`Alt`+`.` searches backwards in the token history, mapping to the same behavior as inserting the last argument of the previous command, like other shells (#89).
The `SHLVL` environment variable is incremented correctly (#1634 & #1693).
Added completions for `adb` (#1165 & #1211), `apt` (#2018), `aura` (#1292), `composer` (#1607), `cygport` (#1841), `dropbox` (#1533), `elixir` (#1167), `fossil`, `heroku` (#1790), `iex` (#1167), `kitchen` (#2000), `nix` (#1167), `node`/`npm` (#1566), `opam` (#1615), `setfacl` (#1752), `tmuxinator` (#1863), and `yast2` (#1739).
Improved completions for `brew` (#1090 & #1810), `bundler` (#1779), `cd` (#1135), `emerge` (#1840),`git` (#1680, #1834 & #1951), `man` (#960), `modprobe` (#1124), `pacman` (#1292), `rpm` (#1236), `rsync` (#1872), `scp` (#1145), `ssh` (#1234), `sshfs` (#1268), `systemctl` (#1462, #1950 & #1972), `tmux` (#1853), `vagrant` (#1748), `yum` (#1269), and `zypper` (#1787).
- Get rid of useless Makefile.common and pointless variables since there is
no longer a zsh-current package.
- Remove non-standard per-OS non-checksummed patch file in FILESDIR.
Integrate it correctly in the normal way.
- Ensure our patched configure.ac is actually regenerated.
- Use REPLACE_INTERPRETER instead of homegrown subst replacements.
- Remove esoteric and fragile configuration variables, a bunch of legacy OS
based options, and simply depend correctly on terminfo and curses.
- Remove custom test targets and requirements for root access, the test suite
works fine as a non-root user and can be done in the normal way.
- Use options.mk
- Set maintainer to pkgsrc-users, uebayasi resigned.
Fixes build on at least SunOS. Tested on SunOS, Darwin, NetBSD (with and
without the "static" option), and Linux.
R55 is mostly a feature release with summary bugfixes:
* [komh] Fix OS/2 search_access() and UNC path logic
* [tg] Undocument printf(1) to avoid user confusion
* [Jean Delvare, tg] Fix printf builtin -R option
* [tg] Make ${var@x}, unknown x, fail (thanks izabera)
* [tg] ${var=x} must evaluate x in scalar context (10x Martijn Dekker)
* [tg] Fixup relation between lksh and mksh, reduce delta
* [tg] Improve manpage display; add OS/2 $PATH FAQ
* [Jean Delvare] Fix bugs in manpage
* [tg] Review tilde expansion, removing ?odd use of KEEPASN? and introduce
POSIX ?declaration utility? concept; wait isn?t one
* [tg] Add \builtin utility, declaration utility forwarder
* [tg] Make $'\xz' expand to xz, not \0
* [tg] Use fixed string pooling (requires the above change in host mksh)
* [tg] POSIX declaration commands can have varassign and redirections
* [Martijn Dekker] Add typeset -g, replacing homegrown ?global?
* [Harvey-OS] Disable NOPROSPECTOFWORK, APEX is reportedly fixed now
* [tg] Display ulimit -a output with flags; improve Haiku
* [tg] Drop old let] hack, use \builtin internally
* [tg] Fix padding in Lb64encode in dot.mkshrc
* [tg] Move FAQ content to a separate, new FAQ section in the manpage
* [tg] Add new standard variable PATHSEP (?:?, ?;? on OS/2)
* [Martijn Dekker] Fix LINENO in eval and alias
* [komh] Fix ?\builtin? on OS/2
* [tg] Improve (internal) character classes code for speed
* [tg] Fix: the underscore is no drive letter
* [tg] No longer hard-disable persistent history support in lksh
* [tg] Introduce build flag -T for enabling ?textmode? on OS/2 (supporting
CR+LF line endings, but incompatible with mksh proper)
* [tg] Merge mksh-os2
* [tg] Permit changing $OS2_SHELL during a running shell
* [tg] Fix multibyte handling in ^R (Emacs search-history)
* [tg] Allow ?typeset -p arrname[2]? to work
* [tg] Make some error messages more consistent
* [tg, komh] Disable UTF-8 detection code for OS/2 as unrealistic
* [tg, sdaoden] Limit alias name chars to POSIX plus non-leading ?-?
* [tg, Martijn Dekker] Expand aliases at COMSUB parse time
* [tg] Make ?typeset -f? output alias-resistent
* [tg, Martijn Dekker] Permit ?eval break? and ?eval continue?
* [tg] Make -masm=intel safe on i386
* [tg] Disambiguate $((?)) vs. $((?)?) in ?typeset -f? output
* [Jean Delvare] Clarify the effect of exit and return in a subshell
* [tg] Simplify compile-time asserts and make them actually compile-time
* [tg] Fix ^O in Emacs mode if the line was modified (LP#1675842)
* [tg] Address Coverity Scan? stuff? now that it builds again
* [Martijn Dekker, tg] Add test -v
* [tg] Document set -o posix/sh completely
R54 is a bugfix release with moderate new features:
* [tg] Simplify and improve code and manual page
* [tg] Try GCC 5?s new -malign-data=abi
* [tg] Allow interrupting builtin cat even on fast devices (LP#1616692)
* [tg] Update to Unicode 9.0.0
* [Andreas Buschka] Correct English spelling
* [tg] Handle set -e-related error propagation in || and && constructs
correctly
* [tg] Initialise memory for RNG even when not targeting Valgrind
* [tg] Shrink binary size
* [Brian Callahan] Improve support for the contemporary pcc compiler
* [tg] Fix side effects with lazy evaluation; spotted by ormaaj
* [tg] New flags -c (columnise), -l, -N for the print builtin
* [Larry Hynes] Fix English, spelling mistakes, typos in the manpage
* [tg, ormaah] Return 128+SIGALRM if read -t times out, like GNU bash
* [Martijn Dekker] Install both manpages from Build.sh
* [Martijn Dekker] Document case changes are ASCII-only
* [Ronald G. Minnich, Elbing Miss, ?lvaro Jurado, tg] Begin porting to
Harvey-OS and APEX (similar to Plan 9 and APE)
* [KO Myung-Hun] More infrastructure for the OS/2 (EMX, KLIBC) port
R53a is a snapshot/feature release:
* [lintian] Fix spelling
* [tg] Unbreak multi-line command history broken by history flush
* [tg] Fix redefining POSIX functions that were Korn functions before
* [tg, TNF] Fix bounds checks in Vi editing mode
* [tg] Handle combining characters at end of string or output correctly
* [tg] Fix ${!#} ${!?} ${!-} (POSIX, prompted by izabera)
* [tg] Fix shf.c-internal buffer overread on printing digits
* [J?rg] Fix a typo in the testsuite
* [arekm] Increase default edit line size (unless MKSH_SMALL)
* [tg] Improve description of Emacs mode keybindings, especially ^U
* [tg, arekm, jilles] Abort read builtin in case of read(2) errors
* [tg, izabera, carstenh] Fix most of the ambiguous corner cases related to $
{[pfx]var[op[word]]} (${@:-1} still unsupported)
* [carstenh] Contribute some more testsuite coverage
* [tg] WDS_TPUTS now emits QCHAR newline reentrant-safe
* [tg] Fix var=<< implementation (LP#1380389)
* [tg, FreeBSD] Make XSI test(1) extensions behave as if they were POSIX
* [tg, izabera] Add $(<<<x) and $(<<EOF?) implementation
* [tg] Lower minimum screen size accepted as ?sane? from the OS to 4?2
* [tg, Torsten Sillke] Simplify tilde-expanded parameters
* [tg, Torsten Sillke] Fix default PS1 for substring matches
* [tg] Apply defer-builtin-with-arguments logic to realpath builtin
* [tg] Rework string pooling (own vs. compiler?s) (LP#1580348)
* [tg] Feature: print -A, prints arguments as characters
* [tg, izabera] Replace <<< and >>> as ROL and ROR operators with their new ^
< and ^> spelling as per this proposal
* [tg, slagtc] Clear-to-EOL under tmux to work around its anti-feature
* [tg, p120ph37] Remove support for using file descriptors with more than a
single digit, in preparation for named file descriptors
* [tg] Correct, but simplify (at the potential cost of more tty I/O than
strictly necessary, though never redundant and (probably) not more than
before when it was miscalculated), line clearing and redrawing
* [slagtc, tg] Implement new evaluate-region editing command Esc+Ctrl-E
* [tg] Prefer external rename utility over the recovery builtin
* [tg] Remove redundant full-line redraws
* [tg, Natureshadow] Fix errorlevel of ?.? (?dot? special builtin) when the
sourced script does not run any commands, for POSIX compliance
* [tg] Refactor op tokens and edchars to shave off some more bytes
* [tg] Fix some bugs in the manpage and some occasional/minor code bugs
* [tg, Brian Callahan] Mark tests requiring new perl as !need-pass
* [tg, slagtc] Add $KSH_MATCH and, to make it usable, ${foo@/bar/baz}
* [tg, Score_Under] Fix bogus patch from OpenBSD: only NULL the global source
in unwind when actually reclaiming its Area
* [izabera] Mention in the manpage that integer bases go up to 36
* [Natureshadow] Fix /= operator broken during refactoring
R52c is a bugfix-only release:
* [tg] Shave 200 bytes off .text by revisiting string pooling
* [tg, J?rg] Fix manpage for ditroff on Schillix
* [tg, wbx] Use sed 1q instead of unportable head(1)
* [tg] Implement underrun debugging tool for area-based memory allocator
* [tg] Fix history underrun when first interactive command is entered
* [tg, bef0rd] Do not misinterpret ?${0/}? as ?${0//?, fixes segfault
* [tg, St?phane Chazelas] Fix display problems with special parameters
* [tg, St?phane Chazelas] Catch attempt to trim $* and $@ with ?, fixes
segfault (Todd Miller did this in 2004 for ${x[*]} already, so just sync)
* [Martijn Dekker] Fix ?command -p? with -Vv to behave as POSIX requires
* [tg, jilles, Oleg Bulatov] Fix recusive parser with active heredocs
* [tg] Flush even syntax-failing or interrupted commands to history
* [tg, fmunozs] Fix invalid memory access for ?'\0'? in arithmetics
* [tg] Explicitly reserve SIGEXIT and SIGERR for ksh
* [tg, izabera] Catch missing here documents at EOF even under ?set -n?
* [kre, tg] Document Austin#1015 handling (not considered a violation)
* [tg, fmunozs] Fix buffer overread for empty nameref targets
* [tg] Fix warnings pointed out by latest Debian gcc-snapshot
* [tg, Martijn Dekker] Document upcoming set +o changes
* [Martijn Dekker] Expand testsuite for command/whence
R52b is a strongly recommended bugfix-only release:
* [tg] Recognise ksh93 compiled scripts and LZIP compressed files as binary
(i.e. to not run as mksh plaintext script)
* [tg] Document that we will implement locale tracking later
* [tg] Add EEXIST to failback strerror(3)
* [jilles] Make set -C; :>foo race-free
* [tg] Don?t use unset in portable build script
* [tg] Plug warning on GNU/kFreeBSD, GNU/Hurd
* [tg] Document read -a resets the integer base
* [J?rg] Fix manpage: time is not a builtin but a reserved word
* [J?rg, tg] Make exit (and return) eat -1
* [tg] parse ?$( (( ? ) ? ) ? )? correctly (LP#1532621), Jan Palus
* [tg] reduce memory footprint by free(3)ing more aggressively
* [tg] fix buffer overrun (LP#1533394), bugreport by izabera
* [tg] correctly handle nested ADELIM parsing (LP#1453827), Teckids
* [tg] permit ?read -A/-a arr[idx]? as long as only one element is read; fix
corruption of array indic?s with this construct (LP#1533396), izabera
* [tg] Sanitise OS-provided signal number in even more places
* [tg] As requested by J?rg, be clear manpage advice is for mksh
* [tg] Revert (as it was a regression) POSIX bugfix from R52/2005 related to
accent gravis-style command substitution until POSIX decides either way
* [tg] Handle export et al. after command (Austin#351)
* [tg] Catch EPIPE in built-in cat and return as SIGPIPE (LP#1532621)
* [tg] Fix errno in print/echo builtin; optimise that and unbksl
* [tg] Update documentation, point out POSIX violation (Austin#1015)
R52 is a strongly recommended bugfix release:
* [_0bitcount] Move moving external link from mksh(1) to the #ksh channel
homepage linked therein
* [tg] Make setenv ?set -u?-safe and fix when invoked with no args
* [tg] Make ?typeset -f? output reentrant if name is a reserved word
* [oksh] Zero-pad seconds in ?time? output to align columns
* [tg] Check signals and errorlevels from OS to be within bounds
* [komh, tg] Quote and document ?;? as PATH separator in some places
* [oksh, tg] Simplify code to call afree() even if arg is NULL
* [tg] Fix tree-printing and reentrancy of multiple here documents
* [tg] Work around LP#1030581 by permitting exactly one space after
* [tg, oksh] Code quality work, cleanups
* [tg] New code for here documents/strings with several bugfixes
* [tg] Stop using issetugid(2) for ?p checks, wrong tool for the job
* [tg] Reintroduce some -o posix changes lost in 2005, plus fixes
* [tg] Make ?source? into a built-in command
* [tg] Drop ?stop? alias, lksh(1) functionality to auto-unalias
* [tg] Fix \u0000 ignored in $'?' and print
* [tg] Improve portability of Build.sh
* [Jilles Tjoelker] Improve portability of testsuite
* [tg] Fix tilde expansion for some substitutions (izabera, Chet, Geoff)
* [tg] Improve reparsing of ((?) |?) as ( (?) |?)
* [Martijn Dekker] Fix test(1) not returning evaluation errors
* [tg] Fix ${*:+x} constructs (carstenh)
* [tg] Make (( ? )) into a compound command (ormaaj)
* [tg] Repair a few parameter substitution expansion mistakes
Fix "storage size of buf is not known" likely caused by it being defined
to be something with sizeof().
add LDFLAGS -lm to all operating systems (I see undefined reference to
frexpl/ldexpl), remove duplicate from other operating systems.
bump PKGREVISION sinze L_tmpnam will be changed for the few who can build
the package.
from upstream, ref.
8e6dfd5332
Unfortunately the AsciiOnly reversion causes a SEGV because
*ch is used to index in the command array, and now contains
INVALID_BYTE. Reproduce error with:
env -i ./tcsh
<meta>b
Bump PKGREVISION.
---------------------------
2016-12-21 Peter Stephenson <p.w.stephenson@ntlworld.com>
* unposted: Config/version.mk, Etc/FAQ.yo, NEWS, README:
release 5.3.1:
2016-12-18 Baptiste Daroussin <bapt@FreeBSD.org>
* 40210: Completion/Unix/Command/_sysctl: Add support modern
FreeBSD and drop support for FreeBSD < 5
2016-12-18 Baptiste Daroussin <bapt@gandi.net>
* 40209: Completion/BSD/Command/_chflags: Fix typo in chflags
completion
2016-12-16 Daniel Shahaf <d.s@daniel.shahaf.name>
* 40149: Functions/VCS_Info/Backends/VCS_INFO_get_data_git:
vcs_info git: Avoid a fork.
* 40203: Test/B03print.ztst: Resolve 'printf --' question from
grandparent commit (thanks Chet).
2016-12-15 Barton E. Schaefer <schaefer@zsh.org>
* 40198: Test/V10private.ztst: output of B02typeset differs when
(( UID == 0 )) so do not attempt to redo that test in that case
2016-12-14 Barton E. Schaefer <schaefer@zsh.org>
* 40179: Src/builtin.c: fix handling of "printf -" and "printf --"
* unposted: Test/B03print.ztst: regression for 40179 / 37467
2016-12-12 Peter Stephenson <p.w.stephenson@ntlworld.com>
* unposted: Config/version.mk: update to 5.3-dev-0 to avoid
clash with installed 5.3.
changes:
patch 06:
Out-of-range negative offsets to popd can cause the shell to crash attempting
to free an invalid memory block.
patch 07:
When performing filename completion, bash dequotes the directory name being
completed, which can result in match failures and potential unwanted
expansion.
patch 08:
Under certain circumstances, bash will evaluate arithmetic expressions as
part of reading an expression token even when evaluation is suppressed. This
happens while evaluating a conditional expression and skipping over the
failed branch of the expression.
patch 09:
Depending on compiler optimizations and behavior, the `read' builtin may not
save partial input when a timeout occurs.
patch 10:
Depending on compiler optimizations and behavior, the `read' builtin may not
save partial input when a timeout occurs.
patch 11:
Subshells begun to run command and process substitutions may attempt to
set the terminal's process group to an incorrect value if they receive
a fatal signal. This depends on the behavior of the process that starts
the shell.
MASTER_SITES= site1 \
site2
style continuation lines to be simple repeated
MASTER_SITES+= site1
MASTER_SITES+= site2
lines. As previewed on tech-pkg. With thanks to rillig for fixing pkglint
accordingly.
Changelog:
Changes from 5.2 to 5.3
-----------------------
It is possible to enable character width support for Unicode 9 by
configuring with `--enable-unicode9'; this compiles in some additional
tables. At some point this support may move into a module, in which
case the configure option will be changed to cause the module to be
permanently loaded. This option is not useful unless your terminal also
supports Unicode 9.
The new word modifier ':P' computes the physical path of the argument.
It is different from the existing ':a' modifier which always resolves
'/before/here/../after' to '/before/after', and differs from the
existing ':A' modifier which resolves symlinks only after 'here/..' is
removed, even when /before/here is itself a symbolic link. It is
recommended to review uses of ':A' and, if appropriate, convert them
to ':P' as soon as compatibility with 5.2 is no longer a requirement.
The output of "typeset -p" uses "export" commands or the "-g" option
for parameters that are not local to the current scope. Previously,
all output was in the form of "typeset" commands, never using "-g".
vi-repeat-change can repeat user-defined widgets if the widget calls
zle -f vichange.
The parameter $registers now makes the contents of vi register buffers
available to user-defined widgets.
New vi-up-case and vi-down-case builtin widgets bound to gU/gu (or U/u
in visual mode) for doing case conversion.
A new select-word-match function provides vim-style text objects with
configurable word boundaries using the existing match-words-by-style
mechanism.
Support for the conditional expression [[ -v var ]] to test if a
variable is set for compatibility with other shells.
The print and printf builtins have a new option -v to assign the output
to a variable. This is for bash compatibility but with the additional
feature that, for an array, a separate element is used each time the
format is reused.
New x: syntax in completion match specifications make it possible to
disable match specifications hardcoded in completion functions.
- Fix type of read in prompt confirmation (eg. rmstar) (David Kaspar)
- Fix out of bounds read (Brooks Davis)
- Don't play pointer tricks that are undefined in modern c (Brooks Davis)
- Use `` instead $() for solaris, bleh.
This is a terse description of the new features added to bash-4.4 since
the release of bash-4.3. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
1. New Features in Bash
a. There is now a settable configuration #define that will cause the shell
to exit if the shell is running setuid without the -p option and setuid
to the real uid fails.
b. Command and process substitutions now turn off the `-v' option when
executing, as other shells seem to do.
c. The default value for the `checkhash' shell option may now be set at
compile time with a #define.
d. The `mapfile' builtin now has a -d option to use an arbitrary character
as the record delimiter, and a -t option to strip the delimiter as
supplied with -d.
e. The maximum number of nested recursive calls to `eval' is now settable in
config-top.h; the default is no limit.
f. The `-p' option to declare and similar builtins will display attributes for
named variables even when those variables have not been assigned values
(which are technically unset).
g. The maximum number of nested recursive calls to `source' is now settable
in config-top.h; the default is no limit.
h. All builtin commands recognize the `--help' option and print a usage
summary.
i. Bash does not allow function names containing `/' and `=' to be exported.
j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
k. The shell now allows `time ; othercommand' to time null commands.
l. There is a new `--enable-function-import' configuration option to allow
importing shell functions from the environment; import is enabled by
default.
m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
had been executed.
n. GLOBIGNORE, the pattern substitution word expansion, and programmable
completion match filtering now honor the value of the `nocasematch' option.
o. There is a new ${parameter@spec} family of operators to transform the
value of `parameter'.
p. Bash no longer attempts to perform compound assignment if a variable on the
rhs of an assignment statement argument to `declare' has the form of a
compound assignment (e.g., w='(word)' ; declare foo=$w); compound
assignments are accepted if the variable was already declared as an array,
but with a warning.
q. The declare builtin no longer displays array variables using the compound
assignment syntax with quotes; that will generate warnings when re-used as
input, and isn't necessary.
r. Executing the rhs of && and || will no longer cause the shell to fork if
it's not necessary.
s. The `local' builtin takes a new argument: `-', which will cause it to save
and the single-letter shell options and restore their previous values at
function return.
t. `complete' and `compgen' have a new `-o nosort' option, which forces
readline to not sort the completion matches.
u. Bash now allows waiting for the most recent process substitution, since it
appears as $!.
v. The `unset' builtin now unsets a scalar variable if it is subscripted with
a `0', analogous to the ${var[0]} expansion.
w. `set -i' is no longer valid, as in other shells.
x. BASH_SUBSHELL is now updated for process substitution and group commands
in pipelines, and is available with the same value when running any exit
trap.
y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or
not bash is being run in a GNU Emacs shell window.
z. Bash now treats SIGINT received when running a non-builtin command in a
loop the way it has traditionally treated running a builtin command:
running any trap handler and breaking out of the loop.
aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
cause matching filenames to be ignored when searching for commands.
bb. Aliases whose value ends in a shell metacharacter now expand in a way to
allow them to be `pasted' to the next token, which can potentially change
the meaning of a command (e.g., turning `&' into `&&').
cc. `make install' now installs the example loadable builtins and a set of
bash headers to use when developing new loadable builtins.
dd. `enable -f' now attempts to call functions named BUILTIN_builtin_load when
loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows
loadable builtins to run initialization and cleanup code.
ee. There is a new BASH_LOADABLES_PATH variable containing a list of directories
where the `enable -f' command looks for shared objects containing loadable
builtins.
ff. The `complete_fullquote' option to `shopt' changes filename completion to
quote all shell metacharacters in filenames and directory names.
gg. The `kill' builtin now has a `-L' option, equivalent to `-l', for
compatibility with Linux standalone versions of kill.
hh. BASH_COMPAT and FUNCNEST can be inherited and set from the shell's initial
environment.
ii. inherit_errexit: a new `shopt' option that, when set, causes command
substitutions to inherit the -e option. By default, those subshells disable
-e. It's enabled as part of turning on posix mode.
jj. New prompt string: PS0. Expanded and displayed by interactive shells after
reading a complete command but before executing it.
kk. Interactive shells now behave as if SIGTSTP/SIGTTIN/SIGTTOU are set to
SIG_DFL when the shell is started, so they are set to SIG_DFL in child
processes.
ll. Posix-mode shells now allow double quotes to quote the history expansion
character.
mm. OLDPWD can be inherited from the environment if it names a directory.
nn. Shells running as root no longer inherit PS4 from the environment, closing
a security hole involving PS4 expansion performing command substitution.
oo. If executing an implicit `cd' when the `autocd' option is set, bash will
now invoke a function named `cd' if one exists before executing the `cd'
builtin.
pp. Value conversions (arithmetic expansions, case modification, etc.) now
happen when assigning elements of an array using compound assignment.
qq. There is a new option settable in config-top.h that makes multiple
directory arguments to `cd' a fatal error.
rr. Bash now uses mktemp() when creating internal temporary files; it produces
a warning at build time on many Linux systems.
2. New Features in Readline
a. The history truncation code now uses the same error recovery mechansim as
the history writing code, and restores the old version of the history file
on error. The error recovery mechanism handles symlinked history files.
b. There is a new bindable variable, `enable-bracketed-paste', which enables
support for a terminal's bracketed paste mode.
c. The editing mode indicators can now be strings and are user-settable
(new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
variables). Mode strings can contain invisible character sequences.
Setting mode strings to null strings restores the defaults.
d. Prompt expansion adds the mode string to the last line of a multi-line
prompt (one with embedded newlines).
e. There is a new bindable variable, `colored-completion-prefix', which, if
set, causes the common prefix of a set of possible completions to be
displayed in color.
f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
mode yank-pop.
g. The redisplay code underwent several efficiency improvements for multibyte
locales.
h. The insert-char function attempts to batch-insert all pending typeahead
that maps to self-insert, as long as it is coming from the terminal.
i. rl_callback_sigcleanup: a new application function that can clean up and
unset any state set by readline's callback mode. Intended to be used
after a signal.
j. If an incremental search string has its last character removed with DEL, the
resulting empty search string no longer matches the previous line.
k. If readline reads a history file that begins with `#' (or the value of
the history comment character) and has enabled history timestamps, the
history entries are assumed to be delimited by timestamps. This allows
multi-line history entries.
l. Readline now throws an error if it parses a key binding without a
terminating `:' or whitespace.
m. The default binding for ^W in vi mode now uses word boundaries specified
by Posix (vi-unix-word-rubout is bindable command name).
n. rl_clear_visible_line: new application-callable function; clears all
screen lines occupied by the current visible readline line.
o. rl_tty_set_echoing: application-callable function that controls whether
or not readline thinks it is echoing terminal output.
p. Handle >| and strings of digits preceding and following redirection
specifications as single tokens when tokenizing the line for history
expansion.
q. Fixed a bug with displaying completions when the prefix display length
is greater than the length of the completions to be displayed.
r. The :p history modifier now applies to the entire line, so any expansion
specifying :p causes the line to be printed instead of expanded.
s. New application-callable function: rl_pending_signal(): returns the signal
number of any signal readline has caught but not yet handled.
t. New application-settable variable: rl_persistent_signal_handlers: if set
to a non-zero value, readline will enable the readline-6.2 signal handler
behavior in callback mode: handlers are installed when
rl_callback_handler_install is called and removed removed when a complete
line has been read.
xonsh is a Python-ish, BASHwards-looking shell language and command prompt. The
language is a superset of Python 3.4+ with additional shell primitives. xonsh
(pronounced conch) is meant for the daily use of experts and novices alike.
(and __EXTENSIONS__ for strict STDC). Also needs -lm.
Fix testing to work prior to [stage-]install. No revbump needed.
okay'd by jperkin@
NB there are still some corner cases not working on some SunOS, but
on illumos SunOS 5.11 this actually goes a real long way over stock sh/ksh!
Changelog:
posh (0.12.5) unstable; urgency=medium
* Patch from John Salmon to correct fencepost error in PWD
initialization. closes: #777427.
* Suppress linemarker generation when building signal table, as
gcc 5 gets crazy. closes: #778069.
* Blindly assume that signal handlers return void.
* Switch to dh.
-- Clint Adams <clint@debian.org> Sun, 07 Jun 2015 14:54:36 -0400
pkgsrc-users.
Also added copyright notices and installation of the license to make the
package compilant with it's license.
Changelog:
Changes that improve compatibility w/ the Sixth Edition (V6) UNIX
Thompson shell are marked w/ a `C:' in the details below.
-------------------------------------------------------------------------------
[osh-current] (development):
* Work In Progress ( see http://v6shell.org/src/current/ )
-------------------------------------------------------------------------------
[osh-20160108] (latest):
README:
* Updated supported systems to include FreeBSD 10.2,
Mac OS X 10.11 (El Capitan), NetBSD 7.0, OpenBSD 5.[78],
and Debian 8.2 (jessie).
Makefile:
* Changed `-W' to `-Wextra' (same warning, newer name). From gcc(1) -
This option used to be called -W. The older name is still supported,
but the newer name is more descriptive.
DEDICATIONS:
* Updated the URL for dmr's home page at Bell Labs.
*.h:
* Added a sh6-related comment to the top of the header files
since they are used by sh6 and its external utilities.
examples/dot.oshrc:
* Redirected diagnostics from leaks(1) (Mac OS X) to /dev/null.
-------------------------------------------------------------------------------
[osh-20150115]:
if.c, osh.c, strtoint.[hc], util.c:
* Changed the strtoint() function to convert string into a
long instead of an int, and ensured that numbers which might
be considered to have an octal form (valid or invalid) are
not treated as if they are decimal integers. For example:
`if 0[0-9] -eq [0-9]' and `if [0-9] -eq 0[0-9]' and similar
are always false, resulting in an error.
if.c, util.c:
* Changed how the built-in & external if(1) commands call
the strtoint() function.
err.h, strtoint.c:
* Changed the "not an integer" diagnostic for the strtoint()
function to "bad integer".
err.h, if.c, util.c:
* Changed the "not a digit" diagnostic for the built-in & external
if(1) commands to "bad digit".
err.h:
* Changed the order of the definitions for diagnostics to make finding
the "... expected" ones for if(1) a bit easier.
-------------------------------------------------------------------------------
[osh-20141024]:
README:
* Added OS X 10.10 (Yosemite) to supported systems.
* Added Debian 7.7 (wheezy) to supported systems.
examples/*.osh.login:
* Changed /usr/X11 to /opt/X11 in *PATH.
examples/dot.oshrc:
* Updated the sh6i alias to make it trap and untrap the 1 (HUP),
2 (INT), 3 (QUIT), 13 (PIPE), 14 (ALRM), 15 (TERM), 18 (TSTP),
21 (TTIN), and 22 (TTOU) signals accordingly for better behavior.
-------------------------------------------------------------------------------
[osh-20140820]:
* See CHANGES6 .
-------------------------------------------------------------------------------
[osh-20140410]:
Makefile:
* Changed MOXARCH to OSXCFLAGS & OSXLDFLAGS to play better w/ MacPorts.
Makefile.config:
* Added comment to celebrate 12 years of osh via osh-current.
osh.1:
* Added missing (+) to version in Special commands.
osh.c:
* Enable `.' and `source' special built-in command execution
to succeed when the user invokes the shell as `osh -c string'.
EG:
% osh -c '. file [arg1 ...]' [arg1 ...]
or:
% osh -c 'source file [arg1 ...]' [arg1 ...]
.
-------------------------------------------------------------------------------
[osh-20131109]:
osh.1:
* Changed `LICENSE' to LICENSE to match the other manual pages.
examples/FILEPREP:
* Changed `sigign' invocation to `trap'.
examples/dot.oshrc:
* Added two useful pwd-related aliases: `ocpwd' and `opwd'
* Added a `now' and a `sysinfo' alias.
-------------------------------------------------------------------------------
[osh-20130331]:
*sh.[ch]:
* Removed the deprecated $n and $s parameters.
Now, the user can `set' and `unset' n and s as shell variables.
The following command line is a simple way to replace
all instances of $n w/ $# and $s w/ $? in file:
% <file(rm -f file;sed 's/$n/$#/g;s/$s/$?/g'>file)
.
osh:
* Added code to print diagnostics w/ line numbers when possible.
When reporting error(s), if a diagnostic is to be printed, the
shell gets the line number of the file where the error happened,
adjusts the diagnostic (adding the name of the file and the line
number if the standard input from which the shell reads and
interprets commands lines is seekable), and prints it. EG:
% echo R* ; osh R* ; head -1 R*
README
osh: README: 1: syntax error
Welcome to Osh (V6Shell) - osh-20130331 !
.
* Renamed the `sigign' special built-in command to `trap'
to make osh signal-trapping behavior more sh-like. Granted,
trap is a misnomer since osh only ignores signals for now.
osh.1:
* Removed the documentation for the $n and $s parameters.
* Changed the documentation for `sigign' to `trap' as needed.
examples/*:
* Made stty(1) invocation conditional in .../etc.osh.login .
* Escaped $1 when setting hcount alias in .../dot.oshrc .
-------------------------------------------------------------------------------
[osh-20120604]:
* New file: Makefile.config (included from Makefile)
* New files: strtoint.[ch] (string to integer converter)
* New files: tests/* (regression test suite for osh/sh6)
Makefile:
* Added a "check" target to run the tests w/ osh and sh6.
* Added a "check-newlog" target to generate new test logs
for the osh and sh6 tests.
defs.h:
* Limited maximum PATHMAX definition to 1024.
pexec.c:
* Changed errno to ENAMETOOLONG for each `path too long' error.
osh:
C: Added missing `Command line overflow' diagnostic.
* Added $# (as a synonym for $n) parameter.
* Added $? (as a synonym for $s) parameter.
* Deprecated $n and $s parameters in favor of $# and $?.
$n and $s parameters will be removed after this release.
* Added simple shell variables. This allows the user to `set' and
`unset' shell variables. For compatibility, these variables are
limited to uppercase and lowercase ASCII alpha names that are
one character in length. For example: $A $B $C and $a $b $c
and so forth.
* Changed quoting to allow $ substitution within double (") quotes.
For example: "$$", "$*", "$1", and so forth. This makes parameter
and variable substitution much more flexible.
* Added `.' as a synonym for `source'.
* Enabled PATH search when opening file for `.' and `source'.
* Changed `setenv' built-in command usage and behavior. Now, name
requires value argument. Updated osh.1 manual page accordingly.
if:
* Added new operators to the built-in `if' command for osh
and to the external `if' command for sh6. Updated the if.1
manual page accordingly. The new operators include: <, >,
-eq, -ne, -gt, -ge, -lt, -le
osh.1:
* Flagged $n and $s parameters as deprecated.
* Added `set' and `unset' documentation to the
"Special commands" subsection.
* Added a new "Variable substitution (+)" subsection.
* Documented `.' as a synonym for `source', and added relevant
PATH search documentation.
* Simplified "SECURITY" section a bit.
* Updated "Quoting" subsection to describe double (") quotes handling.
examples/*:
* Made various changes to reflect current and future osh behavior.
-------------------------------------------------------------------------------
[osh-20120102]:
mkconfig:
* Changed _XOPEN_SOURCE definition from 600 to 600L .
err.h:
* Added DEBUG_ALIAS, DEBUG_GLOB, and DEBUG_PROC definitions
(undefined by default) for printf debugging in osh.c and
util.c if/when needed.
osh.c:
* Changed exit status for alias and unalias so that they exit w/ a
false (1) status when there are no aliases to print, set, or unset.
Otherwise, they exit w/ a true (0) status when there is no error.
* Added 'version' as special built-in command.
osh.1:
* Adjusted $v description in "Parameter substitution" subsection.
* Added version description to "Special commands" subsection.
* Added uname(1) to "SEE ALSO" section.
examples/dot.oshrc:
* Replaced the 'version' alias w/ alias 'v1' 'version'
to invoke the 'version' special built-in command.
-------------------------------------------------------------------------------
[osh-20111129-p1]:
examples/dot.oshrc:
* Re-added missing ';s/ \$//' that git ident removed from version alias.
This removes trailing ' $' as shown in example 1 and 2 below:
% : example 1 ; version
osh-20111129 (NetBSD 5.1 amd64) $
% : example 2 ; version
osh-20111129-p1 (NetBSD 5.1 amd64)
-------------------------------------------------------------------------------
[osh-20111129]:
mkconfig, v.c:
* Added useful build system info from `uname -srm'.
examples/dot.*:
* Removed code to replace osh w/ sh6 when invoked as
`osh [-i | -l] sh6'. Use sh6i alias instead.
* Changed sh6i alias for sake of simplicity.
* Removed sh6l alias.
* Changed from using kill(1) to kill current ssh-agent process
to using ssh-agent(1) and its `-k' flag instead.
* Added handy new v and version aliases. For example:
% v ; : Same as doing % echo $v
osh-20111129
% version
osh-20111129 (NetBSD 5.1 amd64)
-------------------------------------------------------------------------------
[osh-20111027]:
* New file: DEDICATIONS (in memory of Dennis M. Ritchie (dmr))
AUTHORS:
* Added reference to DEDICATIONS file.
LICENSE:
* Added two more OpenBSD license references.
mkconfig:
* Fixed a problem w/ the mkconfig script on OpenBSD, where which(1)
used to send a "newgrp: Command not found." diagnostic to standard
output, not standard error. It looks like the noted OpenBSD which(1)
problem has since been fixed though.
osh:
* Fixed a globbing problem caused by an unsigned-integer overflow.
* Added $# (as a synonym for $n) and $* parameters.
* Added a new, command-aliasing feature.
osh.1:
* Added `alias' and `unalias' documentation to the
"Special commands" subsection.
* Added a new "Aliases (+)" subsection.
* Added a new "Metacharacters" subsection.
*.1:
* Changed the visual style of the manual pages, regarding bold, italic,
and `literal' text. The intent was to make for easier reading.
if:
* Added `:' as if(1) special command. It is useful when debugging
scripts and helps when documenting them.
examples/dot.*:
* Documented by example how to turn alias arguments into a no-op.
* Added ssh-agent support. This allows the same ssh-agent process
to be used for shared ssh key(s) across multiple concurrent
login sessions. It also kills the ssh-agent process on
logout when appropriate.
NEWS:
Changes from 5.1.1 to 5.2
-------------------------
The new module zsh/param/private can be loaded to allow the shell
to define parameters that are private to a function scope (i.e. are
not propagated to nested functions called within this function).
The parameter flag ${(P)...} is now more useful when it appears in
a nested expansion. For example,
typeset -A assoc=(one un two deux three trois)
name=assoc
print ${${(P)name}[one]}
now prints "un". In previous versions of the shell the value of the
substitution was fully expanded on return from ${(P)name}, making
associative array subscripting difficult. As a side effect, flags
for formatting appearing in the inner substitution now affect the
substitution of the name (into "assoc" in this case), which is not
normally useful: flags that should apply to the value must be in the
outer substitution.
The GLOB_STAR_SHORT option allows the pattern **/* to be shortened to
just ** if no / follows. so **.c searches recursively for a file whose
name has the suffix ".c".
The effect of the WARN_CREATE_GLOBAL option has been significantly
extended, so expect it to cause additional warning messages about
parameters created globally within function scope.
README:
Incompatibilities between 5.1 and 5.2
-------------------------------------
The behaviour of the parameter flag (P) has changed when it appears
in a nested parameter group, in order to make it more useful in
such cases. A (P) in the outermost parameter group behaves as
before. See NEWS for more.
Existing SHA1 digests verified, all found to be the same on the
machine holding the existing distfiles (morden). Existing SHA1
digests retained for now as an audit trail.
Changelog:
Changes from 5.1 to 5.1.1
-------------------------
5.1.1 is primarily a bug fix release; however, a few minor features were
added.
The ZLE variables YANK_ACTIVE, YANK_START and YANK_END have been added
and are useful for managing highlighting.
The zsh-specific pattern match range tests have been supplemented with
[:INCOMPLETE:] and [:INVALID:] to help detect the state of partially
read multibyte character strings.
their time compiling, and 50% spinning in shell scripts. If you'd rather
spend your power bill on useful gcc cycles though, you might desire to use a
different shell for running build scripts - like pdksh, which is conveniently
available at bootstrap time.
But what if pdksh does this to you?
pdksh -c 'f=`pdksh -c set | wc -l`; f=$((f+1)); while ((f < 100000)); do f=$((f+1)); eval "v_${f}=0"; echo "$f"; done'|tail -1
13106
segmentation fault (core dumped) pdksh -c
Well that's annoying, isn't it.
% echo $(((13106*10+7)/8))
16383
... that's a magical number. Coincidence? Well, no.
tp->nfree = 8*nsize/10; /* table can get 80% full */
This particularly ugly overflow happens because tp->size is a short. When
texpand() does:
p = &ntblp[hash(tblp->name) & (tp->size-1)];
tp->size-1 will, given enough variables (80% of 2^15), type coerce into a
sign-extended 32-bit value of:
info registers $ecx
ecx 0xffff7fff -32769
That hash() function does more or less what you guess, it's a 32 bit unsigned
value. The chances of the final pointer pointing inside the valid allocated
block of memory are very low indeed.
The least-change solution is to change tp->size to a 32 bit value. I've left
it signed because that matches, for example, the size parameter passed to
texpand(). But really this code would be more correct with a liberal
sprinkling of "unsigned", and perhaps a bit of "size_t".
This change allows ffmpeg's configure script, as interpreted by pdksh, to
produce more usable output than a core file.
Bump PKGREVISION for code change.
OmniOS is an Illumos distro which falls under the SunOS variant for us.
Include mk/bsd.prefs.mk before the shells/tcsh/Makefile so the
OS_VARIANT variable is available for testing.
Reviewed by agc@ wiz@
pkgsrc changes:
removed patch:
patch-Completion_Unix_Command__du
patch-Completion_Unix_Command__sort
patch-Src_builtin.c
patch-Test_B03print.ztst
quote from zsh-5.1/ChangeLog:
* 36120: Completion/Unix/Command/_sort: Fix syntax error
* 35467: Completion/Unix/Command/_du: complete files for non-GNU du
* 35412: Src/builtin.c, Test/B03print.ztst: fix for - flag
when formating strings with printf that was broken in 34841
separate a patch ( $ mv patches/patch-ac files/patch-ac )
zsh-5.1/NEWS:
Changes from 5.0.8 to 5.1
-------------------------
The builtins declare, export, local, readonly and typeset
now have corresponding reserved words. When used in
this form, the builtin syntax is extended so that assignments
following the reserved word are treated similarly to
assignments that appear at the start of the command line.
For example,
local scalar=`echo one word` array=(several words)
creates a local "scalar" containing the text "one word"
and an array "array" containing the words "several"
"words".
- The print builtin has new options -x and -X to expand tabs.
- Several new command completions and numerous updates to others.
- Options to "fc" to segregate internal and shared history.
- All emulations including "sh" use multibyte by default; several
repairs to multibyte handling.
- ZLE supports "bracketed paste" mode to avoid interpreting pasted
newlines as accept-line. Pastes can be highlighted for visibility
and to make it more obvious whether accept-line has occurred.
- Improved (though still not perfect) POSIX compatibility for getopts
builtin when POSIX_BUILTINS is set.
- New setopt APPEND_CREATE for POSIX-compatible NO_CLOBBER behavior.
- Completion of date values now displays in a calendar format when
the complist module is available. Controllable by zstyle.
- New parameter UNDO_LIMIT_NO for more control over ZLE undo repeat.
- Several repairs/improvements to the contributed narrow-to-region
ZLE function.
- Many changes to child-process and signal handling to eliminate race
conditions and avoid deadlocks on descriptor and memory management.
- New builtin sysopen in zsh/system module for detailed control of
file descriptor modes.
zsh-5.1/README:
Incompatibilites between 5.0.8 and 5.1
--------------------------------------
The default behaviour when text is pasted into an X Windows terminal has
changed significantly (unless you are using a very old terminal emulator
that doesn't support this mode). Now, the new "bracketed paste mode"
treats all the pasted text as literal characters. This means, in
particular, that a newline is simply inserted as a visible newline; you
need to hit Return on the keyboard to execute the pasted text in one go.
See the description of zle_bracketed_paste in the zshparams manual for
more. "unset zle_bracketed_paste" restores the previous behaviour.
As noted in NEWS, the builtins declare, export, float, integer, local,
readonly and typeset now have corresponding reserved words that provide
true assignment semantics instead of an approximation by means of normal
command line arguments. It is hoped that this additional consistency
provides a more natural interface. However, compatbility with older
versions of zsh can be obtained by turning off the reserved word
interface, exposing the builtin interface:
disable -r declare export float integer local readonly typeset
This is also necessary in the unusual eventuality that the builtins are
to be overridden by shell functions, since reserved words take
precedence over functions.
- non-GNU du wouldn't complete filenames (taken from upstream)
- sort completion threw a syntax error on NetBSD (reported upstream)
Bump PKGREVISION to 1.
[tg] OpenBSD sync: handle integer base out of band like ksh93 does
[tg] Protect standard code (predefined aliases, internal code, aliases and functions in dot.mkshrc) from being overridden by aliases and, in some cases, shell functions (i.e. permit overriding but ignore it)
[tg] Implement GNU bash's enable for dot.mkshrc using magic aliases to redirect the builtins to external utilities; this differs from GNU bash in that enable takes precedence over functions
[tg] Move unaliasing an identifier when defining a POSIX-style function with the same name into lksh, as compatibility kludge
[tg] Korn shell style functions now have locally scoped shell options
[tg, iSKUNK] Change some ASCII-isms to be EBCDIC-aware or pluggable
[tg, Ypnose] Mention lksh build instructions on manpage and website
[tg] Overhaul signal handling; support new POSIX NSIG_MAX, add sysconf(_SC_NSIG) as a later TODO item
[tg] Fix signal bounds (1 <= signum < NSIG)
[tg] Improve manual pages, especially wrt. standards compliance
[tg, iSKUNK] Initial EBCDIC work for dot.mkshrc
[tg, iSKUNK] Add list of z/OS signals to Build.sh
[tg] Work around the sh(1) backslash-newline problem by moving the code triggering it out of *.opt and into the consumers
[colona] Bind another well-known ANSI Del key in the Emacs mode
[tg] Fix ${foo/*/x} pattern checks, spotted by izabera
[carstenh] Fix error output of cd function in dot.mkshrc
[tg] read partial returns in -N and timeout cases
[tg] Fix $LINENO inside PS1; spotted by carstenh
[tg] Ensure correct padding of at least 2 spaces in print_columns
[tg] Note issues with nested complex parameter expansions and follow-up bugfixes to expect
[OpenBSD] Some language fixes in documentation; comments
[tg] Reimplement multi-line command history (Debian #783978) + fixes
[Martijn Dekker] Fix command -v for "shell reserved words"
[tg] In dot.mkshrc make use of latest feature: local options
[tg] Fix ""$@ to emit a word
[tg] Change cat(1) hack to look first and not ignore builtin
[KO Myung-Hun] Begin porting mksh to OS/2
[komh, tg] Some generic minor bugfixes from OS/2 porting
[tg] Document mknod(8) isn’t normally part of mksh(1)
[tg] Quote arguments to : in build/test scripts as well
[tg] Add cat(1) hack for printf(1)-as-builtin: always prefer external
[tg] Explicitly use binary mode for any and all file I/O in stock mksh
[Ilya Zakharevich] Use termio, not termios(4), on OS/2
[tg] Set edchars to sane BSD defaults if any are NUL
[tg] Implement support for PC scancodes in Vi and Emacs editing mode
[komh] OS/2 uses ; as PATH separator plus support drive letters
{perl>=5.16.6,p5-ExtUtils-ParseXS>=3.15}:../../devel/p5-ExtUtils-ParseXS
since pkgsrc enforces the newest perl version anyway, so they
should always pick perl, but sometimes (pkg_add) don't due to the
design of the {,} syntax.
No effective change for the above reason.
Ok joerg
Changelog:
2014-09-26 Herbert Xu <herbert@gondor.apana.org.au>
* Small optimisation of command -pv change.
* Set command -p path to /usr/sbin:/usr/bin:/sbin:/bin.
* Change "characters" for printf precision to "bytes".
* Release 0.5.8.
2014-09-26 Jonathan Nieder <jrnieder@gmail.com>
* Clarify "trap '' signals" syntax in manual page.
2014-09-26 Adam Buchbinder <adam.buchbinder@gmail.com>
* Clarify that 0 and EXIT are both acceptable for exit traps.
2014-09-26 Harald van Dijk <harald@gigawatt.nl>
* command: allow combining -p with -v.
* getjob: Fix off-by-one error for multiple of four job numbers
2013-08-23 Herbert Xu <herbert@gondor.apana.org.au>
* Propagate EXP_QPAT in subevalvar.
* Initialise OPTIND after importing environment.
* Fixed argument parsing crash in test.
2013-03-12 Peter Rosin <peda@lysator.liu.se>
* Add newline when tracing in poplocalvars.
2013-01-10 Jérémie Courrèges-Anglas <jca+dash@wxcvbn.org>
* Markup fixes in manual for mandoc 1.12.1.
2012-12-03 Harald van Dijk <harald@gigawatt.nl>
* Use PRIdMAX instead of %j in printf.
2012-07-20 Kimo Rosenbaum <kimor79@yahoo.com>
* Fix typo for wait in manual.
2012-06-09 Christoph Mathys <eraserix@gmail.com>
* Add support for ulimit -r.
2012-03-11 Jim Meyering <meyering@redhat.com>
* Avoid overflow for very long variable name.
$ perl -le 'print "v"x(2**31+1) ."=1"' | dash
2012-02-25 Herbert Xu <herbert@gondor.apana.org.au>
* Sanitise environment variable names on entry.
2011-08-17 David S. Miller <davem@davemloft.net>
* Allow building without LINEO support.
* Add top-level autogen.sh.
2011-07-26 Harald van Dijk <harald@gigawatt.nl>
* Avoid imaxdiv when only one of the results is wanted.
2010-07-09 maximilian attems <max@stro.at>
* Fix klibc DEBUG compilation.
2011-07-09 Herbert Xu <herbert@gondor.apana.org.au>
* Merge SKIPFUNC/SKIPFILE and only clear SKIPFUNC when leaving dotcmd.
* Include bugfix,
ac26fafa03/
Changelog:
Changes from 5.0.7 to 5.0.8
---------------------------
- Global aliases can be created for syntactic tokens such as command
separators (";", "&", "|", "&&", "||"), redirection operators, etc.
Use at your own risk! The POSIX_ALIASES option is interpreted more
strictly to prevent expansion of these and other alias names containing
quotes, glob metacharacters, parameter references, etc.
- There have been various further improvements to builtin handling
with the POSIX_BUILTINS option (off by default) for compatibility with
the POSIX standard.
- 'whence -v' is now more informative, and 'whence -S' shows you
how a full chain of symbolic links resolves to a command.
- The 'p' parameter flag now allows an argument to be specified
as a reference to a variable, e.g. ${(ps.$sep.)foo} to split $foo
on a string given by $sep.
- The option FORCE_FLOAT now forces variables, not just constants,
to floating point in arithmetic expressions.
- The type of an assignment in arithmetic expressions, e.g. the
type seen by the variable res in $(( res = a = b )), is now
more logical and C-like.
- The default binding of 'u' in vi command mode has changed to undo
multiple changes when invoked repeatedly. '^R' is now bound to redo
changes. To revert to toggling of the last edit use:
bindkey -a u vi-undo-change
- Compatibility with Vim has been improved for vi editing mode. Most
notably, Vim style text objects are supported and the region can be
manipulated with vi commands in the same manner as Vim's visual mode.
- Elements of the watch variable may now be patterns.
- The logic for retrying history locking has been improved.
- Some rationalisations have been made to the zsh/db/gdbm module that
should make it more useful and predictable in operation.
Upstream changes:
R50f is a required security and bugfix release:
[tg] Add a patch marker for vendor patch versioning to mksh.1
[tg] SECURITY: make unset HISTFILE actually work
[tg] Document some more issues with the current history code
[tg] Remove some unused code
[tg] RCSID-only sync with OpenBSD, for bogus and irrelevant changes
[tg] Also disable field splitting for alias 'local=\typeset'
[tg] Fix read -n-1 to not be identical to read -N-1
[tg] Several fixes and improvements to lksh(1) and mksh(1) manpages
[tg] More code (int size_t), comment and testsuite fixes
[tg] Make dot.mkshrc more robust (LP#1441853)
[tg] Fix issues with IFS='\' read, found by edualbus
[enh, tg] Fix integer overflows related to file descriptor parsing, found by Pawel Wylecial (LP#1440685); reduce memory usage for I/O redirs
[tg] Document in the manpage how to set ±U according to the current locale settings via LANG/LC_* parameters (cf. Debian #782225)
[igli, tg] Some code cleanup and restructuring
[tg, oksh] Handle number parsing and storing more carefully
R50e is a required bugfix release:
[tg] Add more tests detailing behaviour difference from GNU bash
[tg] Introduce a memory leak for x=<< fixing use of freed memory instead, bug tracked as LP#1380389 still live
[tg] Add x+=<< parallel to x=<<
[tg, ormaaj, jilles] POSIX "command" loses builtin special-ness
[tg] Fix LP#1381965 and LP#1381993 (more field splitting)
[jilles] Update location of FreeBSD testsuite for test(1)
[Martin Natano] Remove dead NULL elements from Emacs keybindings
[tg, Stéphane Chazelas, Geoff Clare] Change several testcases for $*/$@ expansion with/without quotes to expected-fail, with even more to come ☹
[tg] Fix miscalculating required memory for encoding the double-quoted parts of a here document or here string delimiter, leading to a buffer overflow; discovered by zacts from IRC
[RT] Rename a function conflicting with a MacRelix system header
[tg] Use size_t (and ssize_t) consistently, stop using ptrdiff_t; fixes some arithmetics and S/390 bugs
[tg] Remove old workarounds for Clang 3.2 scan-build
[tg] Remove all Clang/Coverity assertions, making room for new checks
[tg] Fix NSIG generation on Debian sid gcc-snapshot
[tg] Make a testcase not fail in a corner case
[tg] Fix issues detected by GCC’s new sanitisers: data type of a value to be shifted constantly must be unsigned (what not, in C…); shebang check array accesses are always unsigned char
[tg] Be even more explicit wrt. POSIX in the manpage
[tg] Fix shebang / file magic decoding
[tg] More int → bool conversion
[tg] Let Build.sh be run by GNU bash 1.12.1 (Slackware 1.01)
[Stéphane Chazelas, tg] Fix here string parsing issue
[tg] Point out more future changes in the manpage
[tg] Call setgid(2), setegid(2), setuid(2) before seteuid(2)
[tg] Fix spurious empty line after ENOENT “whence -v”, found by Ypnose
[tg] Optimise dot.mkshrc and modernise it a bit
[tg] Use MAXPATHLEN from <sys/param.h> for PATH_MAX fallback
[tg] Some code cleanup and warnings fixes
[tg] Add options -a argv0 and -c to exec
[jsg] Prevent use-after-free when hitting multiple errors unwinding
[tg] Fix use of $* and $@ in scalar context: within [[ … ]] and after case (spotted by Stéphane Chazelas) and in here documents (spotted by tg@); fix here document expansion
[tg] Unbreak when $@ shares double quotes with others
[tg] Fix set -x in PS4 expansion infinite loop
---------------- (from debian/changelog)
posh (0.12.4) unstable; urgency=medium
* Correct misspelling of "--". closes: #774004.
* Patch from Chris Lamb to make the build reproducible.
closes: #777395.
* Patch from John Salmon to use memmove instead of memcpy in
debunk(). closes: #777493.
-- Clint Adams <clint@debian.org> Sun, 26 Apr 2015 14:20:19 -0400