mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
parent
013506dfd5
commit
b2b327fec4
1 changed files with 3 additions and 3 deletions
|
@ -1762,7 +1762,7 @@ int builtin_function(parser_t &parser, io_streams_t &streams, const wcstring_lis
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The random builtin. For generating random numbers.
|
/// The random builtin generates random numbers.
|
||||||
static int builtin_random(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
|
static int builtin_random(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
|
||||||
static int seeded = 0;
|
static int seeded = 0;
|
||||||
static struct drand48_data seed_buffer;
|
static struct drand48_data seed_buffer;
|
||||||
|
@ -2864,7 +2864,7 @@ static int builtin_history(parser_t &parser, io_streams_t &streams, wchar_t **ar
|
||||||
// from webconfig.py.
|
// from webconfig.py.
|
||||||
if (!history) history = &history_t::history_with_name(L"fish");
|
if (!history) history = &history_t::history_with_name(L"fish");
|
||||||
|
|
||||||
while ((opt = w.wgetopt_long_only(argc, argv, L"pdscvlt", long_options, &opt_index)) != EOF) {
|
while ((opt = w.wgetopt_long_only(argc, argv, L"pdscvlmht", long_options, &opt_index)) != EOF) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'p': {
|
case 'p': {
|
||||||
search_prefix = true;
|
search_prefix = true;
|
||||||
|
@ -2917,7 +2917,7 @@ static int builtin_history(parser_t &parser, io_streams_t &streams, wchar_t **ar
|
||||||
// Everything after is an argument.
|
// Everything after is an argument.
|
||||||
const wcstring_list_t args(argv + w.woptind, argv + argc);
|
const wcstring_list_t args(argv + w.woptind, argv + argc);
|
||||||
|
|
||||||
if (args.empty()) {
|
if (argc == 1) {
|
||||||
for (int i = 1; // 0 is the current input
|
for (int i = 1; // 0 is the current input
|
||||||
!history->item_at_index(i).empty(); ++i) {
|
!history->item_at_index(i).empty(); ++i) {
|
||||||
if (!format_history_record(history->item_at_index(i), with_time, &streams.out)) {
|
if (!format_history_record(history->item_at_index(i), with_time, &streams.out)) {
|
||||||
|
|
Loading…
Reference in a new issue