J
Joakim Hove
[I am sorry if this post is a contradiction in terms - i.e. if there
is no such thing as stdio in the C standard?]
Hello,
I am reading a filename from the user - the loop is typically like
this:
1. Read a directory from the user.
2. Read several filenames from the user.
The filenames read in 2. above will typically (but not necessarily) be
located in the directory entered under point 1., so to make it more
streamlined for the user I would like something like
Give name of file with.. => /some/path/given/first/_
I.e. the path /some/path/given/first/ should be printed first, and
then user can continue editing. I have the following two requirements:
1. When the user has completed the input buffer should contain the
full path to some file. [This I can manage by initalising the input
buffer.]
2. If some file is located in another location, the user should be
able to delete parts of the path, so the final result can be .e.g. /
some/other/path/file.txt
I have looked into gnu readline - but it does not seem it provides
this functionality. Any tips gretly appreciated.
Joakim Hove
is no such thing as stdio in the C standard?]
Hello,
I am reading a filename from the user - the loop is typically like
this:
1. Read a directory from the user.
2. Read several filenames from the user.
The filenames read in 2. above will typically (but not necessarily) be
located in the directory entered under point 1., so to make it more
streamlined for the user I would like something like
Give name of file with.. => /some/path/given/first/_
I.e. the path /some/path/given/first/ should be printed first, and
then user can continue editing. I have the following two requirements:
1. When the user has completed the input buffer should contain the
full path to some file. [This I can manage by initalising the input
buffer.]
2. If some file is located in another location, the user should be
able to delete parts of the path, so the final result can be .e.g. /
some/other/path/file.txt
I have looked into gnu readline - but it does not seem it provides
this functionality. Any tips gretly appreciated.
Joakim Hove