Support reference type in terminal mode.