mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 00:41:15 -03:00
New -n flag for string join. (#8774)
* New -n flag for string join command. This is an argument that excludes empty result items. Fixes #8351 * New documentation for string-join. The new argument --no-empty was added at string-join manpage. * New completions for the new -n flag for string join. * Remove the documentation of the new -n flag of string join0 The reason to remove this new argument in the join0 is that this flag basically doesn't make any difference in the join0. * Refactor the validation for the string join. The string join command was using the length of the argument, this commit changes the validation to use the empty function. * Revert #4b56ab452 The reason for the revert is thath the build broke on the ubuntu in the Github actions. * Revert #e72e239a1 The reason the compilation on GitHub broke is that the test was weird, it didn't even run it, Common CI systems are typically very very resource-constrained. * Resolve conflicts in the string-join.rst. * Resolve conflicts in the "string-join.rst". commit #1242d0fd7 not fixed all conflicts.
This commit is contained in:
@@ -23,6 +23,7 @@ complete -f -c string -n 'test (count (commandline -opc)) -ge 2; and string matc
|
||||
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a join
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a join0
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] join' -s n -l no-empty -d "Empty strings excluded"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a trim
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] trim" -s l -l left -d "Trim only leading chars"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] trim" -s r -l right -d "Trim only trailing chars"
|
||||
|
||||
Reference in New Issue
Block a user