fish-shell/src/redirection.h

33 lines
577 B
C++
Raw Normal View History

#ifndef FISH_REDIRECTION_H
#define FISH_REDIRECTION_H
2023-02-04 18:21:42 +08:00
#if INCLUDE_RUST_HEADERS
2023-02-04 18:21:42 +08:00
#include "redirection.rs.h"
2023-02-04 18:21:42 +08:00
#else
2023-02-04 18:21:42 +08:00
// Hacks to allow us to compile without Rust headers.
2023-02-04 18:21:42 +08:00
enum class RedirectionMode {
overwrite,
append,
input,
fd,
noclob,
};
2023-02-04 18:21:42 +08:00
struct Dup2Action;
class Dup2List;
struct RedirectionSpec;
struct RedirectionSpecListFfi;
2023-02-04 18:21:42 +08:00
#endif
2023-02-04 18:21:42 +08:00
using redirection_mode_t = RedirectionMode;
using redirection_spec_t = RedirectionSpec;
using redirection_spec_list_t = RedirectionSpecListFfi;
2023-02-04 18:21:42 +08:00
using dup2_action_t = Dup2Action;
using dup2_list_t = Dup2List;
#endif