The `status` command currently silently allows incompatible flags (i.e.,
subcommands). Too, using flags to specify subcommands misleads the user
into thinking they can specify multiple subcommands.
We recently modified the `history` command to deprecate using flags for
subcommands. This change does the same for the `status` command.
Fixes#3509
SysBench is a modular, cross-platform and multi-threaded benchmark tool for
evaluating OS parameters that are important for a system running a database
under intensive load
The dpkg-reconfigure command is used on Debian and Ubuntu based systems to reconfigure packages.
According to the relevant manpage's the commited completion file should be complete.
Use $USER, prompt_hostname, string
Update to use correct color names such as magenta over purple.
Use bright color variants instead of bold in some cases.
While working on making the history command support case-sensitive and
insensitive searches I noticed that entering "all" when interactively
deleting history entries resulted in an error. That's because the
history builtin currently only supports `--exact` so we need to loop
over the matching entries and delete them one at a time.
Fixes#3448
My previous change to avoid creating a *.pyc file when running
create_manpage_completions.py was wrong because I put the
`sys.dont_write_bytecode = True` on the wrong line. Rather than simply
move that statement make the simpler, cleaner, fix that removes the need
for `eval` where that program is invoked.
The Linux kernel only splits on the first whitespace in the shebang line
(unlike BSD which splits on all whitespace). Which means there can be
only one argument after the path to the program.
Producing man pages is done infrequently (basically just at `make test`
and `make install`) so there isn't any point in writing compiled
byte-code versions of the python modules.
After implementing `builtin fish_realpath` it was noticed that it did
not behave like GNU `realpath` without options. Which is super annoying
since that was the whole point of implementing the command. Major
failure on my part since I wrote the unit tests to match the behavior of
the existing `wrealpath()` function that I simply exposed as a builtin
command. Rather than actually verifying it behaved in a manner
compatible with GNU realpath.
Also, while the decision to call the builtin `fish_realpath` seemed to
make sense at the time of the original commit further reflection has
shown that to be a silly, idiosyncratic, thing to have done. So rename
it to simply `realpath`.
Fixes 3400
This adds a flag to the `history search` command to limit the number of
matching entries to the first "n". The default is unlimited. This is
mostly useful in conjunction with aliases (i.e., functions) that are
intended to report the "n" most recent matching history entries without
piping the result through the user's pager.
Fixes#3244
Don't wrap fish_indent at all if the version in $PATH matches
$FISH_VERSION.
When we do wrap it, resolve the path once, and use that via alias
machinery instead of doing an eval each time.
In both cases, `type fish_indent` can tell us what it's actually going
to do now.
clarity aside, it's faster if we only eval the one time.
eval is not only evil, but slow.
> for h in $history[1..100]; echo $h | fish_indent --no-indent; end
before: CMD_DURATION = 1005
if fish_indent is kosher in PATH: 549
if not, using alias: 687
these modern terminals both compose a nicer title if we don't try to provide a custom one (no path in title twice, "fish" in title twice) - and the user can configure which components they'd like in their terminal inside the terminal preferences.
Also make test "$VTE_VERSION" -ge .. work once I commit `test` strtoi
fix - the trick is to add a zero before it so the numeric comparison
works even if it's empty.
Fixes#107
This deprecates the use of long options for history sub-commands (e.g.,
`history --delete`) in favor of proper sub-commands (e.g., `history
delete`). It also eliminates the short options for those sub-commands.
Also change option processing to allow options anywhere on the command
line to match how the vast majority of fish builtins handle flags.
Replace --with-time with --show-time.
Fixes#3367
* Use 'grealpath' if installed for realpath fallback
See discussion in #3370
* fish_realpath: filter out dangerous options
Per feedback do not use aliases to declare wrapped functions.
chown completion chown currently uses cat /etc/group to fetch the list of group names. In Cygwin there's no /etc/group file any more (user and group names are fetched directly from the OS), so when a user tries to tab-complete the group name they get an error message:
ASchulma@LZ77E1AASCHULMA ~/d/fish> chown ASchulma🐱 /etc/group: No such file or directory
This change fixes that by using getent group (via __fish_complete_groups) by preference to get the group names, and falling back to /etc/group. This is more portable.
This has the same name and path as ubuntu's, but takes less arguments.
So we need to actually find if the distro thinks it is suse, and then
use it.
Fixes#3366.
Adds a color reset thing, to ensure fish tries to use hard colors during
testing.
Also, work on a discrepancy (not introduced by my changes, afaik) when
with some combinations of color settings, and usage of --bold, caused super
flakey color paninting in the pager. Downwards movements that trigger
scrolling vs. upwards movement in the pager would only apply bold to
selections when moving upwards. The bold state of the command completions in
the pager was flipping flops on and off, depending on if there is a description
on the preceding line.
Implement a lame fix by reseting the color to normal and applying a
different style on the rightmost ')' which seems to be what was influencing it.
Makes fish use terminfo for coloring the newline glich char.
The previous solution would not erase the previous bindings if
fish_vi_key_bindings was called with a mode argument. So if the user
switched to vi with a different initial mode, they'd keep their previous
bindings also.
Supersedes e89057b.
Some of these were defined in the shared bindings, some (like \cy yank)
were just literally duplicate in the same files.
This should _not_ change anything. In particular this does not remove
hardcoding of sequences (because terminfo might be wrong or the term
might need smkx).
Found with
```
function bind
set -l binds (builtin bind)
builtin bind $argv
set -l newbinds (builtin bind)
if set -q argv[1]; and not test "$argv[1]" = "--erase"
if test "$binds" = "$newbinds"
echo "Duplicate: " (string escape -- $argv)
end
end
end
```
The vi-bindings function would unconditionally erase all bindings,
making it impossible to call it last. This would disable the
mode-indicator (and in future also the cursor).
Make it so any argument to fish_vi_key_bindings stops it from erasing
bindings.
It would also be possible to demand an argument to erase (or to erase as
a separate step). but the usual case seems to be _switching_ to a set of bindings.
This didn't work on platforms where tput exists but can never accept
terminfo names. This includes the current versions of FreeBSD - it
used to do both, now it doesn't. So, fall back to the old termcap names
by (tput smso; or tput so). Add check for the tput program before we
even try.
The extra things `eval` does are all for code that runs
interactively. Because we just define a function, we don't need it.
This improves alias' performance by about 20-25% (0.783608s to 0.585585s
on about 500 aliases) and avoids triggering #3345.
This can be prohibitively slow on large repositories (minutes!).
While regrettable, no user is going to like waiting that long.
Work towards #3342, rerun of #3230.
Many thanks to @gladhorn for the idea!