Changeset 1c481ee in mainline for uspace/app/bdsh/util.h


Ignore:
Timestamp:
2019-03-09T15:40:05Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
587867a
Parents:
c56a3eb
git-author:
Matthieu Riolo <matthieu.riolo@…> (2019-03-02 15:55:07)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-03-09 15:40:05)
Message:

This commit fixes #684 and adds autocompletion for subdirectories in search_path. The original implementation of find_command()
will find cmd inside the working directory even without
the prefix './'. However, those cmds would have not been visible in
the auto completion. This commit prevents this from happening.

The problem can be traced back to vfs_absolutize() which treats paths
without the './' prefix as relative paths. The changes made unsures
that only relative or absolute pathes will be passed to vfs_absolutize()

This commit also fixes the problem, that subdirectories inside the
search_path would not be autocomplete. BDSH would execute such paths.
The reason being is that such paths was interpreted as relative paths.
Now BDSH makes a distinction between relatives paths or paths inside
search_path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/util.h

    rc56a3eb r1c481ee  
    3131
    3232#include "scli.h"
     33#include <stdbool.h>
    3334
    3435/* Utility functions */
    3536extern unsigned int cli_count_args(char **);
    3637extern unsigned int cli_set_prompt(cliuser_t *usr);
     38extern bool is_path(const char *cmd);
    3739
    3840#endif
Note: See TracChangeset for help on using the changeset viewer.